diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-05 15:00:00 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-05 15:00:00 -0800 |
commit | 686113531d23f30e9973d659c456ae33eb9cff1f (patch) | |
tree | f225de7251a8b49b8d183dd168bab0a0addbe23f /lib/chef/rest.rb | |
parent | d1cf34b059a16a81e0fc48de52ba29863bb41fe6 (diff) | |
download | chef-686113531d23f30e9973d659c456ae33eb9cff1f.tar.gz |
autofixing whitespace cops
4174 Style/SpaceInsideHashLiteralBraces
1860 Style/SpaceAroundOperators
1336 Style/SpaceInsideBlockBraces
1292 Style/AlignHash
997 Style/SpaceAfterComma
860 Style/SpaceAroundEqualsInParameterDefault
310 Style/EmptyLines
294 Style/IndentationConsistency
267 Style/TrailingWhitespace
238 Style/ExtraSpacing
212 Style/SpaceBeforeBlockBraces
166 Style/MultilineOperationIndentation
144 Style/TrailingBlankLines
120 Style/EmptyLineBetweenDefs
101 Style/IndentationWidth
82 Style/SpaceAroundBlockParameters
40 Style/EmptyLinesAroundMethodBody
29 Style/EmptyLinesAroundAccessModifier
1 Style/RescueEnsureAlignment
Diffstat (limited to 'lib/chef/rest.rb')
-rw-r--r-- | lib/chef/rest.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/chef/rest.rb b/lib/chef/rest.rb index bf444ffe23..a3c5c66b8a 100644 --- a/lib/chef/rest.rb +++ b/lib/chef/rest.rb @@ -57,8 +57,7 @@ class Chef # all subsequent requests. For example, when initialized with a base url # http://localhost:4000, a call to +get_rest+ with 'nodes' will make an # HTTP GET request to http://localhost:4000/nodes - def initialize(url, client_name=Chef::Config[:node_name], signing_key_filename=Chef::Config[:client_key], options={}) - + def initialize(url, client_name = Chef::Config[:node_name], signing_key_filename = Chef::Config[:client_key], options = {}) Chef.log_deprecation("Chef::REST is deprecated. Please use Chef::ServerAPI, or investigate Ridley or ChefAPI.") signing_key_filename = nil if chef_zero_uri?(url) @@ -84,7 +83,6 @@ class Chef # because the order of middlewares is reversed when handling # responses. @middlewares << ValidateContentLength.new(options) - end def signing_key_filename @@ -115,7 +113,7 @@ class Chef # path:: The path to GET # raw:: Whether you want the raw body returned, or JSON inflated. Defaults # to JSON inflated. - def get(path, raw=false, headers={}) + def get(path, raw = false, headers = {}) if raw streaming_request(path, headers) else @@ -136,8 +134,8 @@ class Chef # If you rename the tempfile, it will not be deleted. # Beware that if the server streams infinite content, this method will # stream it until you run out of disk space. - def fetch(path, headers={}) - streaming_request(create_url(path), headers) {|tmp_file| yield tmp_file } + def fetch(path, headers = {}) + streaming_request(create_url(path), headers) { |tmp_file| yield tmp_file } end alias :api_request :request @@ -203,7 +201,7 @@ class Chef @decompressor.decompress_body(body) end - def authentication_headers(method, url, json_body=nil) + def authentication_headers(method, url, json_body = nil) authenticator.authentication_headers(method, url, json_body) end |