sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Accessing Ruby libraries

    Scheduled Pinned Locked Moved Developers' Forum
    1 Posts 1 Posters 111 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • RichMorinR Offline
      RichMorin
      last edited by

      I'd like to use Cucumber to run tests on SketchUp plugin code. In pursuit of this, I've been playing with setting up a DRb server in a plugin. This failed, at first, because SU doesn't provide the DRb library. So, I tried adding my local (Mac OS X 10.5.8) libraries to "$:". This crashed, as described in http://pastie.org/675716.

      So, I'm really looking for two kinds of help. I'd like to know whether and how I can add libraries to SU. I'd also be happy to get comments and suggestions on how to approach the general problem of linking Cucumber and SketchUp.

      While I'm stuck on DRb, I've been thinking about passing files back and forth, using rename() to ensure that I don't try to read a file before it's ready. Basically, Cucumber (C) and SketchUp (S) would interact as follows:

      πŸ˜„ create x.tst.tmp, output test code, close file
      πŸ˜„ rename x.tst.tmp to x.tst
      S: detect x.tst, read test code
      S: rename x.tst to x.tst.old
      S: eval the test code
      S: create x.res.tmp, output results, close file
      S: rename x.res.tmp to x.res
      πŸ˜„ detect x.res, read results
      πŸ˜„ rename x.res to x.res.old
      πŸ˜„ handle results

      Does this seem like a reasonable approach?

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Buy SketchPlus
      Buy SUbD
      Buy WrapR
      Buy eBook
      Buy Modelur
      Buy Vertex Tools
      Buy SketchCuisine
      Buy FormFonts

      Advertisement