lib/api_auth/headers.rb in api-auth-2.2.0 vs lib/api_auth/headers.rb in api-auth-2.2.1

- old
+ new

@@ -32,10 +32,12 @@ ActionControllerRequest.new(request) when /HTTPI::Request/ HttpiRequest.new(request) when /Faraday::Request/ FaradayRequest.new(request) + when /HTTP::Request/ + HttpRequest.new(request) end return new_request if new_request return RackRequest.new(request) if request.is_a?(Rack::Request) raise UnknownHTTPRequest, "#{request.class} is not yet supported." @@ -48,12 +50,10 @@ end def canonical_string(override_method = nil) request_method = override_method || @request.http_method - if request_method.nil? - raise ArgumentError, 'unable to determine the http method from the request, please supply an override' - end + raise ArgumentError, 'unable to determine the http method from the request, please supply an override' if request_method.nil? [request_method.upcase, @request.content_type, @request.content_md5, parse_uri(@request.original_uri || @request.request_uri),