diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-01-12 09:56:40 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-01-12 09:56:40 -0800 |
commit | 6610ebd39d19c3b8776d69a56a39c3b496b8b29f (patch) | |
tree | a5c282b16f71e3f8be0f3ed99310c82cc41ecd6d /lib/chef/http | |
parent | 812101f11a6c33e49f401ad72598ca6ffb38adc4 (diff) | |
download | chef-6610ebd39d19c3b8776d69a56a39c3b496b8b29f.tar.gz |
really fix copslcg/really-fix-cops
Diffstat (limited to 'lib/chef/http')
-rw-r--r-- | lib/chef/http/http_request.rb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/chef/http/http_request.rb b/lib/chef/http/http_request.rb index 24cd99375d..9e48f6e5e9 100644 --- a/lib/chef/http/http_request.rb +++ b/lib/chef/http/http_request.rb @@ -5,7 +5,7 @@ # Author:: Christopher Brown (<cb@opscode.com>) # Author:: Christopher Walters (<cw@opscode.com>) # Author:: Daniel DeLeo (<dan@opscode.com>) -# Copyright:: Copyright (c) 2009, 2010 Opscode, Inc. +# Copyright:: Copyright (c) 2009, 2010-2016 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -156,19 +156,19 @@ class Chef req_path << "?#{query}" if query @http_request = case method.to_s.downcase - when GET - Net::HTTP::Get.new(req_path, headers) - when POST - Net::HTTP::Post.new(req_path, headers) - when PUT - Net::HTTP::Put.new(req_path, headers) - when DELETE - Net::HTTP::Delete.new(req_path, headers) - when HEAD - Net::HTTP::Head.new(req_path, headers) - else - raise ArgumentError, "You must provide :GET, :PUT, :POST, :DELETE or :HEAD as the method" - end + when GET + Net::HTTP::Get.new(req_path, headers) + when POST + Net::HTTP::Post.new(req_path, headers) + when PUT + Net::HTTP::Put.new(req_path, headers) + when DELETE + Net::HTTP::Delete.new(req_path, headers) + when HEAD + Net::HTTP::Head.new(req_path, headers) + else + raise ArgumentError, "You must provide :GET, :PUT, :POST, :DELETE or :HEAD as the method" + end @http_request.body = request_body if (request_body && @http_request.request_body_permitted?) # Optionally handle HTTP Basic Authentication |