lib/template in faster_gem_script-0.1.2 vs lib/template in faster_gem_script-0.1.4

- old
+ new

@@ -1,9 +1,9 @@ gem_name = File.basename(__FILE__) if ARGV.first =~ /^_(.*)_$/ - # special version of the gem--we'll need full rubygems for this + # special version of the gem--we'll need full rubygems for this... require 'rubygems' if Gem::Version.correct? $1 then version = $1 ARGV.shift gem gem_name, version @@ -12,16 +12,18 @@ end end cached = File.dirname(__FILE__) + "/#{gem_name}_bin_location" - # if we haven't cached its location yet... +# if we haven't cached its location yet... unless File.exist? cached File.open(cached, 'w') do |f| + # then setup the cache + puts 'faster_gem_script cacheing bin location (1st time only) ' + __FILE__ require 'rubygems' f.write Gem.bin_path(gem_name, gem_name, ">= 0") end end require 'faster_rubygems' if RUBY_VERSION < '1.9' # gem prelude equivalent - -load File.read(cached) +require 'fast_require' # happiness +load File.read(cached) \ No newline at end of file