summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook_uploader.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@getchef.com>2015-02-06 09:43:09 -0800
committerdanielsdeleo <dan@getchef.com>2015-02-11 10:52:49 -0800
commit6c9f246b04c23906dd5297d178a423c96bc7b369 (patch)
treeb12595c7931c0c9a8d9962ec9e6469f7483998aa /lib/chef/cookbook_uploader.rb
parent677ca0d7e3366ea9b3b6a912c8c6c28d543e2046 (diff)
downloadchef-6c9f246b04c23906dd5297d178a423c96bc7b369.tar.gz
Temporarily implement deprecation warnings as errors
This is an intermediate step where we're cleaning up all internal code to convert cookbook version objects to JSON in the new way.
Diffstat (limited to 'lib/chef/cookbook_uploader.rb')
-rw-r--r--lib/chef/cookbook_uploader.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/chef/cookbook_uploader.rb b/lib/chef/cookbook_uploader.rb
index 2d8bf5bc7e..826b362a3d 100644
--- a/lib/chef/cookbook_uploader.rb
+++ b/lib/chef/cookbook_uploader.rb
@@ -92,9 +92,12 @@ class Chef
# files are uploaded, so save the manifest
cookbooks.each do |cb|
- save_url = opts[:force] ? cb.force_save_url : cb.save_url
+
+ manifest = Chef::CookbookManifest.new(cb)
+
+ save_url = opts[:force] ? manifest.force_save_url : manifest.save_url
begin
- rest.put(save_url, cb)
+ rest.put(save_url, manifest)
rescue Net::HTTPServerException => e
case e.response.code
when "409"