Permalink
Browse files

Correct Rakefile for subshells and when gem is not installed

  • Loading branch information...
1 parent a22579d commit ffbde5f03e6a549bacd6b14a222c4ee83b2de354 @raggi committed Jul 27, 2010
Showing with 10 additions and 1 deletion.
  1. +10 −1 Rakefile
View
11 Rakefile
@@ -8,7 +8,16 @@ task :install => [:gem] do
sh "gem install hanna*.gem"
end
-ENV['RUBYOPT'] = (ENV['RUBYOPT']||'') + ' -Ilib'
+# We do the following so that RDoc will pick up our plugin now, and also in
+# any subshells.
+path = File.expand_path('../lib', __FILE__)
+$LOAD_PATH.unshift path
+ENV['RUBYLIB'] = begin
+ libs = ENV['RUBYLIB'] || ''
+ libs = libs.split(File::PATH_SEPARATOR)
+ libs << path
+ libs.join(File::PATH_SEPARATOR)
+end
gemspec = eval(File.read('hanna.gemspec'))

0 comments on commit ffbde5f

Please sign in to comment.