Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Support bundler 1.3 and ruby 2.0 in feature helpers

All specs and features pass with ruby 2.0 and bundler 1.3.5
  • Loading branch information...
commit 289e966a3f51917ce789d5a6dde1be2e8d1ddee5 1 parent 8ac9854
@sahilm sahilm authored
View
2  .gitignore
@@ -9,3 +9,5 @@ ext/Rakefile
.bundle
TAGS
*.gem
+tags
+.ruby-version
View
6 Gemfile
@@ -1,12 +1,12 @@
-source :gemcutter
+source 'https://rubygems.org'
gemspec
gem 'cucumber', '~> 1.0.0'
gem 'rspec', '~> 2.8'
gem 'rake'
gem "spork", :path => File.expand_path("../", __FILE__)
-if RUBY_VERSION =~ /^1\.9/
- gem 'ruby-debug19'
+if RUBY_VERSION =~ /^2\.0|^1\.9/
+ gem 'debugger'
else
gem 'ruby-debug'
end
View
28 Gemfile.lock
@@ -3,15 +3,9 @@ PATH
specs:
spork (1.0.0rc3)
-PATH
- remote: .
- specs:
- spork (1.0.0rc3)
-
GEM
- remote: http://rubygems.org/
+ remote: https://rubygems.org/
specs:
- archive-tar-minitar (0.5.2)
builder (3.0.0)
columnize (0.3.6)
cucumber (1.0.6)
@@ -20,12 +14,16 @@ GEM
gherkin (~> 2.4.18)
json (>= 1.4.6)
term-ansicolor (>= 1.0.6)
+ debugger (1.6.0)
+ columnize (>= 0.3.1)
+ debugger-linecache (~> 1.2.0)
+ debugger-ruby_core_source (~> 1.2.1)
+ debugger-linecache (1.2.0)
+ debugger-ruby_core_source (1.2.3)
diff-lcs (1.1.3)
gherkin (2.4.21)
json (>= 1.4.6)
json (1.6.5)
- linecache19 (0.5.12)
- ruby_core_source (>= 0.1.4)
rake (0.9.2.2)
rspec (2.8.0)
rspec-core (~> 2.8.0)
@@ -35,16 +33,6 @@ GEM
rspec-expectations (2.8.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.8.0)
- ruby-debug-base19 (0.11.25)
- columnize (>= 0.3.1)
- linecache19 (>= 0.5.11)
- ruby_core_source (>= 0.1.4)
- ruby-debug19 (0.11.6)
- columnize (>= 0.3.1)
- linecache19 (>= 0.5.11)
- ruby-debug-base19 (>= 0.11.19)
- ruby_core_source (0.1.5)
- archive-tar-minitar (>= 0.5.2)
term-ansicolor (1.0.7)
PLATFORMS
@@ -52,7 +40,7 @@ PLATFORMS
DEPENDENCIES
cucumber (~> 1.0.0)
+ debugger
rake
rspec (~> 2.8)
- ruby-debug19
spork!
View
2  Rakefile
@@ -16,7 +16,7 @@ end
task :default => :spec
-require 'rake/rdoctask'
+require 'rdoc/task'
Rake::RDocTask.new do |rdoc|
if File.exist?('VERSION.yml')
require 'yaml'
View
6 features/support/bundler_helpers.rb
@@ -2,8 +2,10 @@ module BundlerHelpers
extend self
def install_bundle(dir)
Dir.chdir(dir) do
- command = "env RUBYOPT= BUNDLE_GEMFILE=Gemfile bundle install"
- system(command)
+ command = "bundle install --gemfile=#{Dir.pwd}/Gemfile --path=#{Dir.pwd}/.bundle"
+ Bundler.with_clean_env do
+ system(command)
+ end
$?.exitstatus
end
end
View
12 features/support/spork_world.rb
@@ -53,7 +53,11 @@ def run(command)
stderr_file = Tempfile.new('spork')
stderr_file.close
in_current_dir do
- @last_stdout = `env RUBYOPT= bundle exec #{command} 2> #{stderr_file.path}`
+ gemfile = ENV['BUNDLE_GEMFILE']
+ Bundler.with_clean_env do
+ ENV['BUNDLE_GEMFILE'] = gemfile
+ @last_stdout = `bundle exec #{command} 2> #{stderr_file.path}`
+ end
@last_exit_status = $?.exitstatus
end
@last_stderr = IO.read(stderr_file.path)
@@ -61,7 +65,11 @@ def run(command)
def run_in_background(command)
in_current_dir do
- @background_job = BackgroundJob.run("env RUBYOPT= bundle exec " + command)
+ gemfile = ENV['BUNDLE_GEMFILE']
+ Bundler.with_clean_env do
+ ENV['BUNDLE_GEMFILE'] = gemfile
+ @background_job = BackgroundJob.run("bundle exec " + command)
+ end
end
@background_jobs << @background_job
@background_job
Please sign in to comment.
Something went wrong with that request. Please try again.