From afd5e634cc9358000156170bf72c4e54021c8818 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Wed, 27 Feb 2019 21:46:20 +0100 Subject: [PATCH] chore: RuboCop configuration regenerated --- .rubocop_todo.yml | 41 ++----------------------------------- lib/faraday/adapter/test.rb | 10 ++++----- 2 files changed, 7 insertions(+), 44 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f6cb01e9..1d36f6c9 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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. diff --git a/lib/faraday/adapter/test.rb b/lib/faraday/adapter/test.rb index a7327aeb..ae8f0672 100644 --- a/lib/faraday/adapter/test.rb +++ b/lib/faraday/adapter/test.rb @@ -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)