diff options
Diffstat (limited to 'lib/chef/provider/remote_file')
-rw-r--r-- | lib/chef/provider/remote_file/cache_control_data.rb | 12 | ||||
-rw-r--r-- | lib/chef/provider/remote_file/content.rb | 8 | ||||
-rw-r--r-- | lib/chef/provider/remote_file/ftp.rb | 20 | ||||
-rw-r--r-- | lib/chef/provider/remote_file/http.rb | 12 | ||||
-rw-r--r-- | lib/chef/provider/remote_file/local_file.rb | 6 | ||||
-rw-r--r-- | lib/chef/provider/remote_file/network_file.rb | 6 |
6 files changed, 32 insertions, 32 deletions
diff --git a/lib/chef/provider/remote_file/cache_control_data.rb b/lib/chef/provider/remote_file/cache_control_data.rb index 3f39dac625..85b723ece4 100644 --- a/lib/chef/provider/remote_file/cache_control_data.rb +++ b/lib/chef/provider/remote_file/cache_control_data.rb @@ -19,11 +19,11 @@ # limitations under the License. # -require 'stringio' -require 'chef/file_cache' -require 'chef/json_compat' -require 'chef/digester' -require 'chef/exceptions' +require "stringio" +require "chef/file_cache" +require "chef/json_compat" +require "chef/digester" +require "chef/exceptions" class Chef class Provider @@ -172,7 +172,7 @@ class Chef # Scrub and truncate in accordance with the goals of keeping the name # human-readable but within the bounds of local file system # path length limits - uri.gsub(/\W/, '_')[0..63] + uri.gsub(/\W/, "_")[0..63] end def sanitized_cache_file_basename diff --git a/lib/chef/provider/remote_file/content.rb b/lib/chef/provider/remote_file/content.rb index e9d85b4087..02c0cff457 100644 --- a/lib/chef/provider/remote_file/content.rb +++ b/lib/chef/provider/remote_file/content.rb @@ -17,10 +17,10 @@ # limitations under the License. # -require 'uri' -require 'tempfile' -require 'chef/file_content_management/content_base' -require 'chef/mixin/uris' +require "uri" +require "tempfile" +require "chef/file_content_management/content_base" +require "chef/mixin/uris" class Chef class Provider diff --git a/lib/chef/provider/remote_file/ftp.rb b/lib/chef/provider/remote_file/ftp.rb index 3f78286aa3..a81126f27f 100644 --- a/lib/chef/provider/remote_file/ftp.rb +++ b/lib/chef/provider/remote_file/ftp.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require 'uri' -require 'tempfile' -require 'net/ftp' -require 'chef/provider/remote_file' -require 'chef/file_content_management/tempfile' +require "uri" +require "tempfile" +require "net/ftp" +require "chef/provider/remote_file" +require "chef/file_content_management/tempfile" class Chef class Provider @@ -59,7 +59,7 @@ class Chef if uri.userinfo URI.unescape(uri.user) else - 'anonymous' + "anonymous" end end @@ -94,11 +94,11 @@ class Chef private def with_proxy_env - saved_socks_env = ENV['SOCKS_SERVER'] - ENV['SOCKS_SERVER'] = proxy_uri(@uri).to_s + saved_socks_env = ENV["SOCKS_SERVER"] + ENV["SOCKS_SERVER"] = proxy_uri(@uri).to_s yield ensure - ENV['SOCKS_SERVER'] = saved_socks_env + ENV["SOCKS_SERVER"] = saved_socks_env end def with_connection @@ -162,7 +162,7 @@ class Chef end def parse_path - path = uri.path.sub(%r{\A/}, '%2F') # re-encode the beginning slash because uri library decodes it. + path = uri.path.sub(%r{\A/}, "%2F") # re-encode the beginning slash because uri library decodes it. directories = path.split(%r{/}, -1) directories.each {|d| d.gsub!(/%([0-9A-Fa-f][0-9A-Fa-f])/) { [$1].pack("H2") } diff --git a/lib/chef/provider/remote_file/http.rb b/lib/chef/provider/remote_file/http.rb index e1f1cb2da7..218d7ef223 100644 --- a/lib/chef/provider/remote_file/http.rb +++ b/lib/chef/provider/remote_file/http.rb @@ -17,10 +17,10 @@ # limitations under the License. # -require 'chef/http/simple' -require 'chef/digester' -require 'chef/provider/remote_file' -require 'chef/provider/remote_file/cache_control_data' +require "chef/http/simple" +require "chef/digester" +require "chef/provider/remote_file" +require "chef/provider/remote_file/cache_control_data" class Chef class Provider @@ -87,11 +87,11 @@ class Chef end def last_modified_time_from(response) - response['last_modified'] || response['date'] + response["last_modified"] || response["date"] end def etag_from(response) - response['etag'] + response["etag"] end def http_client_opts diff --git a/lib/chef/provider/remote_file/local_file.rb b/lib/chef/provider/remote_file/local_file.rb index 026206b64e..2e99886a00 100644 --- a/lib/chef/provider/remote_file/local_file.rb +++ b/lib/chef/provider/remote_file/local_file.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require 'uri' -require 'tempfile' -require 'chef/provider/remote_file' +require "uri" +require "tempfile" +require "chef/provider/remote_file" class Chef class Provider diff --git a/lib/chef/provider/remote_file/network_file.rb b/lib/chef/provider/remote_file/network_file.rb index 093a388d2a..7c066cb052 100644 --- a/lib/chef/provider/remote_file/network_file.rb +++ b/lib/chef/provider/remote_file/network_file.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require 'uri' -require 'tempfile' -require 'chef/provider/remote_file' +require "uri" +require "tempfile" +require "chef/provider/remote_file" class Chef class Provider |