Skip to content

Commit

Permalink
chore: RuboCop configuration regenerated
Browse files Browse the repository at this point in the history
  • Loading branch information
olleolleolle committed Feb 27, 2019
1 parent f3cf995 commit afd5e63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 44 deletions.
41 changes: 2 additions & 39 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -450,15 +450,14 @@ 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
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'
Expand Down Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions lib/faraday/adapter/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def empty?
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] ||= [])
Expand Down Expand Up @@ -150,10 +150,10 @@ def matches?(request_host, request_uri, request_headers, request_body)
# 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)
Expand Down

0 comments on commit afd5e63

Please sign in to comment.