summaryrefslogtreecommitdiff
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
parentdc98ac77aafe4676a45eb16a991f982d20130ed2 (diff)
downloadchef-jk/reenable-bundler-cache.tar.gz
Use latest bundler and rubygemsjk/reenable-bundler-cache
-rw-r--r--.travis.yml16
-rw-r--r--tasks/external_tests.rb14
-rw-r--r--tasks/rspec.rb2
3 files changed, 13 insertions, 19 deletions
diff --git a/.travis.yml b/.travis.yml
index f724f09d4c..5049e7d2ad 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,11 +4,8 @@ cache: bundler
sudo: false
# Early warning system to catch if Rubygems breaks something
before_install:
- # the new 2.5.0 rubygems is busted with 1.7.6 bundler, the
- # new 1.10.6 bundler is busted with our rake tasks. the
- # 2.4.5 rubygems with 1.7.6 bundler in travis currently works.
- # see https://github.com/bundler/bundler/issues/3982
-# gem update --system
+ - gem update --system
+ - gem install bundler
branches:
only:
@@ -36,27 +33,21 @@ matrix:
- rvm: rbx
sudo: true
- rvm: 2.2
- cache:
env: "GEMFILE_MOD=\"gem 'chef-zero', github: 'chef/chef-zero'\""
script: bundle exec rake chef_zero_spec
- rvm: 2.2
- cache:
env: "GEMFILE_MOD=\"gem 'cheffish', github: 'chef/cheffish'\""
script: bundle exec rake cheffish_spec
- rvm: 2.2
- cache:
env: "GEMFILE_MOD=\"gem 'chef-provisioning', github: 'chef/chef-provisioning'\""
script: bundle exec rake chef_provisioning_spec
- rvm: 2.2
- cache:
env: "GEMFILE_MOD=\"gem 'chef-provisioning-aws', github: 'chef/chef-provisioning-aws'\""
script: bundle exec rake chef_provisioning_aws_spec
- rvm: 2.2
- cache:
env: "GEMFILE_MOD=\"gem 'chefspec'\""
script: bundle exec rake chefspec_spec
- rvm: 2.2
- cache:
env: "GEMFILE_MOD=\"gem 'chef-sugar'\""
script: bundle exec rake chef_sugar_spec
# Requires vagrant
@@ -65,15 +56,16 @@ matrix:
# env: "GEMFILE_MOD=\"gem 'chef-rewind'\""
# script: bundle exec rake chef_rewind_spec
- rvm: 2.2
- cache:
env: "GEMFILE_MOD=\"gem 'foodcritic', github: 'acrmp/foodcritic', branch: 'v5.0.0'\""
script: bundle exec rake foodcritic_spec
- rvm: 2.2
cache:
+ before_install:
env: "GEMFILE_MOD=\"gem 'halite', github: 'poise/halite'\""
script: bundle exec rake halite_spec
- rvm: 2.2
cache:
+ before_install:
env: "GEMFILE_MOD=\"gem 'poise', github: 'poise/poise'\""
script: bundle exec rake poise_spec
### START TEST KITCHEN ONLY ###
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