summaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-12-07 14:58:35 -0800
committerJohn Keiser <john@johnkeiser.com>2015-12-07 16:27:18 -0800
commit5085b5e365f6fb1052b658c107f6f1a322a12fbb (patch)
treedbb35bceeb49457f1aa90eaaf9bf3bdbb06f5e5d /tasks
parentdc98ac77aafe4676a45eb16a991f982d20130ed2 (diff)
downloadchef-5085b5e365f6fb1052b658c107f6f1a322a12fbb.tar.gz
Use latest bundler and rubygemsjk/reenable-bundler-cache
Diffstat (limited to 'tasks')
-rw-r--r--tasks/external_tests.rb14
-rw-r--r--tasks/rspec.rb2
2 files changed, 9 insertions, 7 deletions
diff --git a/tasks/external_tests.rb b/tasks/external_tests.rb
index 856d1c502f..305088646c 100644
--- a/tasks/external_tests.rb
+++ b/tasks/external_tests.rb
@@ -25,12 +25,14 @@ def bundle_exec_with_chef(test_gem, commands)
gemfile.puts("gemspec path: #{gem_path.inspect}")
gemfile.close
Dir.chdir(gem_path) do
- unless system({ 'RUBYOPT' => nil, 'GEMFILE_MOD' => nil }, "bundle install --gemfile #{gemfile_path}")
- raise "Error running bundle install --gemfile #{gemfile_path} in #{gem_path}: #{$?.exitstatus}\nGemfile:\n#{IO.read(gemfile_path)}"
- end
- Array(commands).each do |command|
- unless system({ 'BUNDLE_GEMFILE' => gemfile_path, 'RUBYOPT' => nil, 'GEMFILE_MOD' => nil }, "bundle exec #{command}")
- raise "Error running bundle exec #{command} in #{gem_path} with BUNDLE_GEMFILE=#{gemfile_path}: #{$?.exitstatus}\nGemfile:\n#{IO.read(gemfile_path)}"
+ Bundler.with_clean_env do
+ unless system({ 'RUBYOPT' => nil, 'GEMFILE_MOD' => nil }, "bundle install --gemfile #{gemfile_path}")
+ raise "Error running bundle install --gemfile #{gemfile_path} in #{gem_path}: #{$?.exitstatus}\nGemfile:\n#{IO.read(gemfile_path)}"
+ end
+ Array(commands).each do |command|
+ unless system({ 'BUNDLE_GEMFILE' => gemfile_path, 'RUBYOPT' => nil, 'GEMFILE_MOD' => nil }, "bundle exec #{command}")
+ raise "Error running bundle exec #{command} in #{gem_path} with BUNDLE_GEMFILE=#{gemfile_path}: #{$?.exitstatus}\nGemfile:\n#{IO.read(gemfile_path)}"
+ end
end
end
end
diff --git a/tasks/rspec.rb b/tasks/rspec.rb
index 6e802d3df8..4d74fa0951 100644
--- a/tasks/rspec.rb
+++ b/tasks/rspec.rb
@@ -30,7 +30,7 @@ begin
task :component_specs do
Dir.chdir("chef-config") do
Bundler.with_clean_env do
- sh("bundle install --local")
+ sh("bundle install")
sh("bundle exec rake spec")
end
end