summaryrefslogtreecommitdiff
path: root/lib/chef/http/json_input.rb
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-01-13 09:50:23 +0000
committerThom May <thom@chef.io>2016-01-13 09:50:23 +0000
commit0e4b96f3414ef7d9599c70f2661bea8c2037aad5 (patch)
tree5e9b9424ad5b7e320f187ebd020a216bbdb5bf68 /lib/chef/http/json_input.rb
parent556e5f2d78b5c6de2f34d8dd655ee515ff317296 (diff)
downloadchef-tm/string_literals.tar.gz
Use double quotes by defaulttm/string_literals
This is an entirely mechanically generated (rubocop -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
Diffstat (limited to 'lib/chef/http/json_input.rb')
-rw-r--r--lib/chef/http/json_input.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/http/json_input.rb b/lib/chef/http/json_input.rb
index 3296d8821f..3bfca38479 100644
--- a/lib/chef/http/json_input.rb
+++ b/lib/chef/http/json_input.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-require 'chef/json_compat'
+require "chef/json_compat"
class Chef
class HTTP
@@ -33,8 +33,8 @@ class Chef
def handle_request(method, url, headers={}, data=false)
if data && should_encode_as_json?(headers)
- headers.delete_if { |key, _value| key.downcase == 'content-type' }
- headers["Content-Type"] = 'application/json'
+ headers.delete_if { |key, _value| key.downcase == "content-type" }
+ headers["Content-Type"] = "application/json"
json_opts = {}
json_opts[:validate_utf8] = opts[:validate_utf8] if opts.has_key?(:validate_utf8)
data = Chef::JSONCompat.to_json(data, json_opts)