From d99e306a41b1402209d320cb7119b12a3bbb962f Mon Sep 17 00:00:00 2001 From: Thom May Date: Wed, 2 Dec 2015 12:19:33 +0000 Subject: Convert all uses of Chef::REST to Chef::ServerAPI In the process, stop auto-expanding JSON in the HTTP client, and let individual classes control that themselves. Fixes #2737, Fixes #3518 --- lib/chef/knife/cookbook_site_download.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/chef/knife/cookbook_site_download.rb') diff --git a/lib/chef/knife/cookbook_site_download.rb b/lib/chef/knife/cookbook_site_download.rb index 3e586e6542..72608f3a30 100644 --- a/lib/chef/knife/cookbook_site_download.rb +++ b/lib/chef/knife/cookbook_site_download.rb @@ -63,7 +63,7 @@ class Chef def current_cookbook_data @current_cookbook_data ||= begin - noauth_rest.get_rest "#{cookbooks_api_url}/#{@name_args[0]}" + noauth_rest.get "#{cookbooks_api_url}/#{@name_args[0]}" end end @@ -79,14 +79,14 @@ class Chef specific_cookbook_version_url end - noauth_rest.get_rest uri + noauth_rest.get uri end end def download_cookbook ui.info "Downloading #{@name_args[0]} from Supermarket at version #{version} to #{download_location}" noauth_rest.sign_on_redirect = false - tf = noauth_rest.get_rest desired_cookbook_data["file"], true + tf = noauth_rest.get desired_cookbook_data["file"], true ::FileUtils.cp tf.path, download_location ui.info "Cookbook saved: #{download_location}" -- cgit v1.2.1