boots
rather than:
require File.join(File.dirname(__FILE__), ‘../spec_helper’)
you can do:
require ‘boots’ boot ‘../spec_helper’
you can also use boots to add expanded relative paths to the beginning of your ruby load_path:
require ‘boots’ load_path ‘../lib’ require ‘init’ require ‘my_app’
NOTE: since boots uses FileUtils.pwd, you probably don’t want to do FileUtils.cd before you use the methods it provides.
A nice alternative which I discovered after writing this little thing is the dirge gem - available on github, gemcutter, et al.
Note on Patches/Pull Requests
-
Fork the project.
-
Make your feature addition or bug fix.
-
Add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Commit, do not mess with rakefile, version, or history. if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull
-
Send me a pull request. Bonus points for topic branches.
Copyright
Copyright © 2009 davidlee. See LICENSE for details.