diff options
author | John Keiser <john@johnkeiser.com> | 2016-04-18 14:14:09 -0700 |
---|---|---|
committer | John Keiser <john@johnkeiser.com> | 2016-04-18 14:38:17 -0700 |
commit | 9d3a630f17b5059e4180f0873b7f7e4a5b70e0c1 (patch) | |
tree | 71ea77365c8fd7da1aa0b0a9e35c4f4a5fa7ca70 /tasks | |
parent | 4ac5018092e0dcd4fefa1813cc99ce7cc393b2f2 (diff) | |
download | chef-9d3a630f17b5059e4180f0873b7f7e4a5b70e0c1.tar.gz |
Fix bundle outdated
Diffstat (limited to 'tasks')
-rw-r--r-- | tasks/dependencies.rb | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/tasks/dependencies.rb b/tasks/dependencies.rb index e353dbae87..eb5b20d1bb 100644 --- a/tasks/dependencies.rb +++ b/tasks/dependencies.rb @@ -89,7 +89,7 @@ namespace :dependencies do gemfile_lock_task :update_omnibus_gemfile_lock, dirs: %w{omnibus} gemfile_lock_task :update_acceptance_gemfile_lock, dirs: %w{acceptance}, - other_platforms: false, leave_frozen: false + other_platforms: false, leave_frozen: false gemfile_lock_task :update_kitchen_tests_gemfile_lock, dirs: %w{ kitchen-tests kitchen-tests/test/integration/webapp/serverspec @@ -151,16 +151,18 @@ namespace :dependencies do puts "Checking for outdated gems ..." puts "-------------------------------------------------------------------" # TODO check for outdated windows gems too - bundle_outdated = bundle("outdated", extract_output: true) - puts bundle_outdated - outdated_gems = parse_bundle_outdated(bundle_outdated).map { |line, gem_name| gem_name } - # Weed out the acceptable ones - outdated_gems = outdated_gems.reject { |gem_name| ACCEPTABLE_OUTDATED_GEMS.include?(gem_name) } - if outdated_gems.empty? - puts "" - puts "SUCCESS!" - else - raise "ERROR: outdated gems: #{outdated_gems.join(", ")}. Either fix them or add them to ACCEPTABLE_OUTDATED_GEMS in #{__FILE__}." + with_bundle_unfrozen do + bundle_outdated = bundle("outdated", extract_output: true) + puts bundle_outdated + outdated_gems = parse_bundle_outdated(bundle_outdated).map { |line, gem_name| gem_name } + # Weed out the acceptable ones + outdated_gems = outdated_gems.reject { |gem_name| ACCEPTABLE_OUTDATED_GEMS.include?(gem_name) } + if outdated_gems.empty? + puts "" + puts "SUCCESS!" + else + raise "ERROR: outdated gems: #{outdated_gems.join(", ")}. Either fix them or add them to ACCEPTABLE_OUTDATED_GEMS in #{__FILE__}." + end end end end |