summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook
diff options
context:
space:
mode:
authordanielsdeleo <dan@getchef.com>2014-08-05 17:16:09 -0700
committerdanielsdeleo <dan@getchef.com>2014-08-12 11:03:09 -0700
commit13abfe6b9e2d02eae16934a90009e98e61cef5f4 (patch)
treec333f1983f94bd0500db9186fb75e3d72da7fef7 /lib/chef/cookbook
parentda1b4953fa444bebfb4f71c15849db108eb52462 (diff)
downloadchef-13abfe6b9e2d02eae16934a90009e98e61cef5f4.tar.gz
Fix ruby warning in metadata class
Diffstat (limited to 'lib/chef/cookbook')
-rw-r--r--lib/chef/cookbook/metadata.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/cookbook/metadata.rb b/lib/chef/cookbook/metadata.rb
index c7e542e44b..b3142f36b1 100644
--- a/lib/chef/cookbook/metadata.rb
+++ b/lib/chef/cookbook/metadata.rb
@@ -501,9 +501,9 @@ class Chef
def self.validate_json(json_str)
o = Chef::JSONCompat.from_json(json_str)
metadata = new()
- VERSION_CONSTRAINTS.each do |method_name, hash_key|
- if constraints = o[hash_key]
- constraints.each do |cb_name, constraints|
+ VERSION_CONSTRAINTS.each do |dependency_type, hash_key|
+ if dependency_group = o[hash_key]
+ dependency_group.each do |cb_name, constraints|
metadata.send(method_name, cb_name, *Array(constraints))
end
end