Skip to content

Commit

Permalink
chore: RuboCop Layout/ExtraSpacing
Browse files Browse the repository at this point in the history
  • Loading branch information
olleolleolle committed Feb 27, 2019
1 parent 52833e2 commit 7e6b5c6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 17 deletions.
17 changes: 3 additions & 14 deletions .rubocop_todo.yml
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2019-02-26 21:39:01 +0100 using RuboCop version 0.65.0.
# on 2019-02-27 07:46:41 +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 All @@ -15,15 +15,6 @@ Layout/EndAlignment:
- 'lib/faraday/connection.rb'
- 'test/helper.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
Layout/ExtraSpacing:
Exclude:
- 'lib/faraday/adapter/net_http.rb'
- 'lib/faraday/connection.rb'
- 'test/adapters/test_middleware_test.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
Expand Down Expand Up @@ -63,17 +54,15 @@ Layout/SpaceAroundEqualsInParameterDefault:
Exclude:
- 'lib/faraday/adapter/test.rb'

# Offense count: 12
# Offense count: 10
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment.
Layout/SpaceAroundOperators:
Exclude:
- 'lib/faraday/adapter/net_http.rb'
- 'lib/faraday/request/retry.rb'
- 'script/generate_certs'
- 'spec/faraday/request/url_encoded_spec.rb'
- 'spec/support/helper_methods.rb'
- 'test/adapters/test_middleware_test.rb'
- 'test/shared.rb'

# Offense count: 3
Expand Down Expand Up @@ -913,7 +902,7 @@ Style/YodaCondition:
- 'script/proxy-server'
- 'test/helper.rb'

# Offense count: 272
# Offense count: 271
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Expand Down
2 changes: 1 addition & 1 deletion lib/faraday/adapter/net_http.rb
Expand Up @@ -161,7 +161,7 @@ def configure_request(http, req)
http.open_timeout = req[:open_timeout] if req[:open_timeout]
http.write_timeout = req[:write_timeout] if req[:write_timeout] && http.respond_to?(:write_timeout=)
# Only set if Net::Http supports it, since Ruby 2.5.
http.max_retries = 0 if http.respond_to?(:max_retries=)
http.max_retries = 0 if http.respond_to?(:max_retries=)

@config_block.call(http) if @config_block
end
Expand Down
2 changes: 1 addition & 1 deletion lib/faraday/connection.rb
Expand Up @@ -512,7 +512,7 @@ def build_exclusive_url(url = nil, params = nil, params_encoder = nil)
base = url_prefix
if url and base.path and base.path !~ /\/$/
base = base.dup
base.path = base.path + '/' # ensure trailing slash
base.path = base.path + '/' # ensure trailing slash
end
uri = url ? base + url : base
uri.query = params.to_query(params_encoder || options.params_encoder) if params
Expand Down
2 changes: 1 addition & 1 deletion test/adapters/test_middleware_test.rb
Expand Up @@ -29,7 +29,7 @@ def setup
[404, {'Content-Type' => 'text/html'}]
end
end
@conn = Faraday.new do |builder|
@conn = Faraday.new do |builder|
builder.adapter :test, @stubs
end
@resp = @conn.get('/hello')
Expand Down

0 comments on commit 7e6b5c6

Please sign in to comment.