Permalink
Browse files

better of way of getting rubygems into things

  • Loading branch information...
1 parent dc5de4f commit e9d13d5d186273eb4c477b461678f947b95c2da8 @davetron5000 committed Jan 21, 2012
Showing with 6 additions and 1 deletion.
  1. +1 −1 features/step_definitions/version_steps.rb
  2. +5 −0 features/support/env.rb
@@ -1,4 +1,4 @@
When /^I successfully run `([^`]*)` with "([^"]*)" in the library path$/ do |command,dir|
- ENV["RUBYOPT"] = "-I" + File.join(Dir.pwd,ARUBA_DIR,'tmp','newgem',dir)
+ ENV["RUBYOPT"] = (ENV["RUBYOPT"] || '') + " -I" + File.join(Dir.pwd,ARUBA_DIR,'tmp','newgem',dir)
step %(I successfully run `#{command}`)
end
View
@@ -9,13 +9,18 @@
@puts = true
@aruba_timeout_seconds = 60
@original_rubylib = ENV['RUBYLIB']
+ @original_rubyopt = ENV['RUBYOPT']
# We want to use, hopefully, the methadone from this codebase and not
# the gem, so we put it in the RUBYLIB
ENV['RUBYLIB'] = File.join(PROJECT_ROOT,'lib') + File::PATH_SEPARATOR + ENV['RUBYLIB'].to_s
+
+ # We need -rubygems here so that 1.8-style rubies work AND travis-ci doesn't barf with it in the shebang line
+ ENV['RUBYOPT'] = (ENV['RUBYOPT'] || '') + ' -rubygems'
end
After do
# Put back how it was
ENV['RUBYLIB'] = @original_rubylib
+ ENV['RUBYOPT'] = @original_rubyopt
end

0 comments on commit e9d13d5

Please sign in to comment.