summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook_uploader.rb
diff options
context:
space:
mode:
authorMal Graty <mal.graty@googlemail.com>2013-03-01 23:29:04 +0000
committerBryan McLellan <btm@opscode.com>2013-05-24 07:12:44 -0700
commit655444799b7acb90e40161684211352025d008f1 (patch)
treea4763032f8eb37461cd7db906660b61039d8f31d /lib/chef/cookbook_uploader.rb
parent4079a344f2001c1927132e7ed6b63453f459609f (diff)
downloadchef-655444799b7acb90e40161684211352025d008f1.tar.gz
Fixes CHEF-3307
Use metadata name when loading cookbook If a name attribute is loaded from a cookbooks metadata, use this for dependency checks and references as specified in documentation. Ensure real pathname is retained so that manifests can still be generated correctly. In addition we must read the metadata implicitly when cookbooks are loaded to ensure we are using the correct name. Also include a deprecation warning when encountering missing names in metadata as this is a planned breaking change in Chef 12.
Diffstat (limited to 'lib/chef/cookbook_uploader.rb')
-rw-r--r--lib/chef/cookbook_uploader.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/cookbook_uploader.rb b/lib/chef/cookbook_uploader.rb
index 9ba5b2bd8b..456c8b6c07 100644
--- a/lib/chef/cookbook_uploader.rb
+++ b/lib/chef/cookbook_uploader.rb
@@ -159,7 +159,7 @@ class Chef
def validate_cookbooks
cookbooks.each do |cb|
- syntax_checker = Chef::Cookbook::SyntaxCheck.for_cookbook(cb.name, @user_cookbook_path)
+ syntax_checker = Chef::Cookbook::SyntaxCheck.for_cookbook(cb.pathname, @user_cookbook_path)
Chef::Log.info("Validating ruby files")
exit(1) unless syntax_checker.validate_ruby_files
Chef::Log.info("Validating templates")