From 6610ebd39d19c3b8776d69a56a39c3b496b8b29f Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Tue, 12 Jan 2016 09:56:40 -0800 Subject: really fix cops --- lib/chef/http/http_request.rb | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'lib/chef/http') 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 () # Author:: Christopher Walters () # Author:: Daniel DeLeo () -# 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 -- cgit v1.2.1