summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook/metadata.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/cookbook/metadata.rb')
-rw-r--r--lib/chef/cookbook/metadata.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/chef/cookbook/metadata.rb b/lib/chef/cookbook/metadata.rb
index 6d82ae4e30..ff12d865c3 100644
--- a/lib/chef/cookbook/metadata.rb
+++ b/lib/chef/cookbook/metadata.rb
@@ -286,6 +286,7 @@ class Chef
constraint = validate_version_constraint(:depends, cookbook, version)
@dependencies[cookbook] = constraint.to_s
end
+
@dependencies[cookbook]
end
@@ -583,6 +584,7 @@ class Chef
def gem_dep_matches?(what, version, *deps)
# always match if we have no chef_version at all
return true unless deps.length > 0
+
# match if we match any of the chef_version lines
deps.any? { |dep| dep.match?(what, version) }
end