diff options
author | Thom May <thom@chef.io> | 2016-03-03 11:37:44 +0000 |
---|---|---|
committer | Thom May <thom@chef.io> | 2016-03-04 14:47:58 +0000 |
commit | ff539423f067ee83c07dcf73cbf688c6a07f64ae (patch) | |
tree | 5472f234d9df0892df49313f8407b4c003fab1fe /lib/chef/http.rb | |
parent | 788ec4597c9f1517c26d85703bdc79ea01e5ff53 (diff) | |
download | chef-ff539423f067ee83c07dcf73cbf688c6a07f64ae.tar.gz |
Enable progress output to be configuredtm/remote_file_download_progress
Add tests around progress output and tidy up
Diffstat (limited to 'lib/chef/http.rb')
-rw-r--r-- | lib/chef/http.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/chef/http.rb b/lib/chef/http.rb index c90f799cd9..4a3b0bc85e 100644 --- a/lib/chef/http.rb +++ b/lib/chef/http.rb @@ -74,8 +74,6 @@ class Chef attr_reader :redirect_limit attr_reader :options - attr_reader :show_progress - attr_reader :progress_interval attr_reader :middlewares @@ -156,8 +154,7 @@ class Chef raise end - - def streaming_request_with_progress(path, headers={}, &progress_block) + def streaming_request_with_progress(path, headers = {}, &progress_block) url = create_url(path) response, rest_request, return_value = nil, nil, nil tempfile = nil @@ -421,7 +418,7 @@ class Chef end def stream_to_tempfile(url, response, &progress_block) - content_length = response['Content-Length'] + content_length = response["Content-Length"] tf = Tempfile.open("chef-rest") if Chef::Platform.windows? tf.binmode # required for binary files on Windows platforms @@ -458,4 +455,3 @@ class Chef end end - |