chore: RuboCop configuration regenerated

This commit is contained in:
Olle Jonsson 2019-02-27 21:46:20 +01:00
parent f3cf995140
commit afd5e634cc
2 changed files with 7 additions and 44 deletions

View File

@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2019-02-27 21:25:04 +0100 using RuboCop version 0.65.0.
# on 2019-02-27 21:48:38 +0100 using RuboCop version 0.65.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
@ -450,7 +450,7 @@ Style/MutableConstant:
- 'lib/faraday/response/raise_error.rb'
- 'lib/faraday/utils.rb'
# Offense count: 9
# Offense count: 8
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: both, prefix, postfix
@ -458,7 +458,6 @@ Style/NegatedIf:
Exclude:
- 'lib/faraday.rb'
- 'lib/faraday/adapter/em_http.rb'
- 'lib/faraday/adapter/test.rb'
- 'lib/faraday/connection.rb'
- 'lib/faraday/encoders/flat_params_encoder.rb'
- 'lib/faraday/encoders/nested_params_encoder.rb'
@ -583,42 +582,6 @@ Style/RaiseArgs:
- 'lib/faraday/middleware_registry.rb'
- 'test/adapters/integration.rb'
# Offense count: 1
# Cop supports --auto-correct.
Style/RedundantException:
Exclude:
- 'spec/faraday/adapter/patron_spec.rb'
# Offense count: 1
# Cop supports --auto-correct.
Style/RedundantParentheses:
Exclude:
- 'lib/faraday/rack_builder.rb'
# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: AllowMultipleReturnValues.
Style/RedundantReturn:
Exclude:
- 'lib/faraday/adapter/test.rb'
- 'lib/faraday/encoders/flat_params_encoder.rb'
- 'lib/faraday/encoders/nested_params_encoder.rb'
- 'lib/faraday/request/multipart.rb'
- 'lib/faraday/response.rb'
- 'script/generate_certs'
# Offense count: 15
# Cop supports --auto-correct.
Style/RedundantSelf:
Exclude:
- 'lib/faraday/adapter.rb'
- 'lib/faraday/connection.rb'
- 'lib/faraday/dependency_loader.rb'
- 'lib/faraday/options.rb'
- 'lib/faraday/rack_builder.rb'
- 'lib/faraday/utils/headers.rb'
- 'test/adapters/integration.rb'
# Offense count: 10
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.

View File

@ -56,7 +56,7 @@ module Faraday
end
def match(request_method, host, path, headers, body)
return false if !@stack.key?(request_method)
return false unless @stack.key?(request_method)
stack = @stack[request_method]
consumed = (@consumed[request_method] ||= [])
@ -150,10 +150,10 @@ module Faraday
# that will be yielded to consumer block
meta = {}
[(host.nil? || host == request_host) &&
path_match?(request_path, meta) &&
params_match?(request_params) &&
(body.to_s.size.zero? || request_body == body) &&
headers_match?(request_headers), meta]
path_match?(request_path, meta) &&
params_match?(request_params) &&
(body.to_s.size.zero? || request_body == body) &&
headers_match?(request_headers), meta]
end
def path_match?(request_path, meta)