summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom May <thom@may.lt>2016-01-12 18:19:04 +0000
committerThom May <thom@may.lt>2016-01-12 18:19:04 +0000
commita3344de8596d95352ac5f85f6021ea8c0bddd720 (patch)
tree2e4cf860775914161e15528335777c0545de8d07
parent4e2b723f880447874f1fd560fdcf69c466d3ee90 (diff)
parentedfad5cf06d4460baaab1aa31fbb7317939c8a85 (diff)
downloadchef-a3344de8596d95352ac5f85f6021ea8c0bddd720.tar.gz
Merge pull request #4343 from jordane/jordane/supports-use-platform-parser
use platform parser with metadata supports
-rw-r--r--lib/chef/cookbook/metadata.rb2
-rw-r--r--spec/data/cookbooks/supports-platform-constraints/metadata.rb5
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/chef/cookbook/metadata.rb b/lib/chef/cookbook/metadata.rb
index e9509be38c..0892d85749 100644
--- a/lib/chef/cookbook/metadata.rb
+++ b/lib/chef/cookbook/metadata.rb
@@ -746,7 +746,7 @@ OBSOLETED
end
def validate_version_constraint(caller_name, dep_name, constraint_str)
- Chef::VersionConstraint.new(constraint_str)
+ Chef::VersionConstraint::Platform.new(constraint_str)
rescue Chef::Exceptions::InvalidVersionConstraint => e
Log.debug(e)
diff --git a/spec/data/cookbooks/supports-platform-constraints/metadata.rb b/spec/data/cookbooks/supports-platform-constraints/metadata.rb
new file mode 100644
index 0000000000..3620249d5f
--- /dev/null
+++ b/spec/data/cookbooks/supports-platform-constraints/metadata.rb
@@ -0,0 +1,5 @@
+name 'supports-platform-constraints'
+version '0.1.0'
+
+supports 'centos', '>= 6'
+supports 'freebsd', '> 10.1-fake-p12'