diff options
author | Josh Murphy <josh.murphy@cerner.com> | 2013-12-11 15:50:06 -0600 |
---|---|---|
committer | Bryan McLellan <btm@getchef.com> | 2014-03-19 14:39:24 -0700 |
commit | 8d56b90b7093db91c5ad69e025561ff5c3428700 (patch) | |
tree | 7b9da558ff7b5bdb71bb8e636d84377d78d59cd5 /lib | |
parent | 64f490b7181c61175779e800101b70839aa13bc7 (diff) | |
download | chef-8d56b90b7093db91c5ad69e025561ff5c3428700.tar.gz |
CHEF-4851 - Replaced #select with negation for finding missing dependencies with #reject
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/knife/cookbook_upload.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/knife/cookbook_upload.rb b/lib/chef/knife/cookbook_upload.rb index ac846156c0..8482da6022 100644 --- a/lib/chef/knife/cookbook_upload.rb +++ b/lib/chef/knife/cookbook_upload.rb @@ -259,8 +259,8 @@ WARNING def check_for_dependencies!(cookbook) # for all dependencies, check if the version is on the server, or # the version is in the cookbooks being uploaded. If not, exit and warn the user. - missing_dependencies = cookbook.metadata.dependencies.select do |cookbook_name, version| - !(check_server_side_cookbooks(cookbook_name, version) || check_uploading_cookbooks(cookbook_name, version)) + missing_dependencies = cookbook.metadata.dependencies.reject do |cookbook_name, version| + check_server_side_cookbooks(cookbook_name, version) || check_uploading_cookbooks(cookbook_name, version) end unless missing_dependencies.empty? |