Created
February 4, 2009 22:18
-
-
Save automatthew/58379 to your computer and use it in GitHub Desktop.
DEPRECATED: dollarspots owns your loadpath
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stop putting "require 'rubygems'" in your project files. Just madly require | |
away, assuming that whatever you need will be found in the load path. | |
Install dollarspots.rb early in your loadpath. It checks the pwd for a file | |
named .dollarspots.rb and loads it if found. Use .dollarspots.rb files locally | |
in projects to jigger with your loadpath such that your reckless requires | |
actually work. Note that this may involve saying "require 'rubygems'". | |
Call ruby with -rdollarspots, or set "rdollarspots" as your RUBYOPT. | |
To get TextMate's RubyMate facilities to work you'll need to edit the RUBYOPT | |
shell variable in the Prefs. | |
JRuby doesn't honor RUBYOPTS, so: | |
export JRUBY_OPTS="-r load_dollarspots" | |
Also remember to install with `jruby ./install.rb` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' # because some people use dyslexic operating systems | |
front = $:.first | |
puts "Copying load_dollarspots.rb to #{front}" | |
FileUtils.cp "./load_dollarspots.rb", "#{front}/" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DollarSpots = 0.2 | |
local = Dir[".dollarspots.rb", "dollarspots.rb"].first | |
load(local) if local | |
home = "#{ENV['HOME']}/.dollarspots.rb" | |
load(home) if File.exist? home |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment