summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook_uploader.rb
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2015-12-02 12:19:33 +0000
committerThom May <thom@chef.io>2016-01-11 15:40:42 +0000
commitd99e306a41b1402209d320cb7119b12a3bbb962f (patch)
treef65940702826deb991e6198967d3e9e96cb2857a /lib/chef/cookbook_uploader.rb
parent1b71aeb423b009f6d1a44215c89e9976957b47e9 (diff)
downloadchef-d99e306a41b1402209d320cb7119b12a3bbb962f.tar.gz
Convert all uses of Chef::REST to Chef::ServerAPItm/no_more_rest
In the process, stop auto-expanding JSON in the HTTP client, and let individual classes control that themselves. Fixes #2737, Fixes #3518
Diffstat (limited to 'lib/chef/cookbook_uploader.rb')
-rw-r--r--lib/chef/cookbook_uploader.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/cookbook_uploader.rb b/lib/chef/cookbook_uploader.rb
index f24ce2cd56..64a8a4e168 100644
--- a/lib/chef/cookbook_uploader.rb
+++ b/lib/chef/cookbook_uploader.rb
@@ -9,6 +9,7 @@ require 'chef/cookbook/syntax_check'
require 'chef/cookbook/file_system_file_vendor'
require 'chef/util/threaded_job_queue'
require 'chef/sandbox'
+require 'chef/server_api'
class Chef
class CookbookUploader
@@ -31,7 +32,7 @@ class Chef
# uploading the cookbook. This allows frozen CookbookVersion
# documents on the server to be overwritten (otherwise a 409 is
# returned by the server)
- # * :rest A Chef::REST object that you have configured the way you like it.
+ # * :rest A Chef::ServerAPI object that you have configured the way you like it.
# If you don't provide this, one will be created using the values
# in Chef::Config.
# * :concurrency An integer that decided how many threads will be used to
@@ -39,7 +40,7 @@ class Chef
def initialize(cookbooks, opts={})
@opts = opts
@cookbooks = Array(cookbooks)
- @rest = opts[:rest] || Chef::REST.new(Chef::Config[:chef_server_url])
+ @rest = opts[:rest] || Chef::ServerAPI.new(Chef::Config[:chef_server_url])
@concurrency = opts[:concurrency] || 10
@policy_mode = opts[:policy_mode] || false
end