mirror of
https://github.com/lostisland/faraday.git
synced 2025-11-22 00:08:56 -05:00
Merge pull request #908 from lostisland/fix/stderrputs-rubocop
chore: RuboCop Style/StderrPuts, SemiColon
This commit is contained in:
commit
61baf2b466
@ -1,6 +1,6 @@
|
|||||||
# This configuration was generated by
|
# This configuration was generated by
|
||||||
# `rubocop --auto-gen-config`
|
# `rubocop --auto-gen-config`
|
||||||
# on 2019-03-02 02:57:38 +0900 using RuboCop version 0.65.0.
|
# on 2019-03-02 12:16:32 +0100 using RuboCop version 0.65.0.
|
||||||
# The point is for the user to remove these configuration records
|
# The point is for the user to remove these configuration records
|
||||||
# one by one as the offenses are removed from the code base.
|
# one by one as the offenses are removed from the code base.
|
||||||
# Note that changes in the inspected code, or installation of new
|
# Note that changes in the inspected code, or installation of new
|
||||||
@ -14,7 +14,7 @@ Metrics/AbcSize:
|
|||||||
# Configuration parameters: CountComments, ExcludedMethods.
|
# Configuration parameters: CountComments, ExcludedMethods.
|
||||||
# ExcludedMethods: refine
|
# ExcludedMethods: refine
|
||||||
Metrics/BlockLength:
|
Metrics/BlockLength:
|
||||||
Max: 35
|
Max: 31
|
||||||
|
|
||||||
# Offense count: 5
|
# Offense count: 5
|
||||||
# Configuration parameters: CountComments.
|
# Configuration parameters: CountComments.
|
||||||
@ -33,7 +33,7 @@ Metrics/MethodLength:
|
|||||||
# Offense count: 1
|
# Offense count: 1
|
||||||
# Configuration parameters: CountComments.
|
# Configuration parameters: CountComments.
|
||||||
Metrics/ModuleLength:
|
Metrics/ModuleLength:
|
||||||
Max: 105
|
Max: 101
|
||||||
|
|
||||||
# Offense count: 19
|
# Offense count: 19
|
||||||
Metrics/PerceivedComplexity:
|
Metrics/PerceivedComplexity:
|
||||||
@ -294,14 +294,6 @@ Style/SafeNavigation:
|
|||||||
- 'lib/faraday/connection.rb'
|
- 'lib/faraday/connection.rb'
|
||||||
- 'lib/faraday/options/proxy_options.rb'
|
- 'lib/faraday/options/proxy_options.rb'
|
||||||
|
|
||||||
# Offense count: 5
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
# Configuration parameters: AllowAsExpressionSeparator.
|
|
||||||
Style/Semicolon:
|
|
||||||
Exclude:
|
|
||||||
- 'lib/faraday/adapter/em_http.rb'
|
|
||||||
- 'spec/faraday/rack_builder_spec.rb'
|
|
||||||
|
|
||||||
# Offense count: 9
|
# Offense count: 9
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: AllowIfMethodIsEmpty.
|
# Configuration parameters: AllowIfMethodIsEmpty.
|
||||||
@ -323,12 +315,6 @@ Style/SingleLineMethods:
|
|||||||
Style/SpecialGlobalVars:
|
Style/SpecialGlobalVars:
|
||||||
EnforcedStyle: use_perl_names
|
EnforcedStyle: use_perl_names
|
||||||
|
|
||||||
# Offense count: 1
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
Style/StderrPuts:
|
|
||||||
Exclude:
|
|
||||||
- 'lib/faraday/upload_io.rb'
|
|
||||||
|
|
||||||
# Offense count: 2
|
# Offense count: 2
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
# Configuration parameters: EnforcedStyle.
|
# Configuration parameters: EnforcedStyle.
|
||||||
@ -338,7 +324,7 @@ Style/StringLiteralsInInterpolation:
|
|||||||
- 'lib/faraday/options/env.rb'
|
- 'lib/faraday/options/env.rb'
|
||||||
- 'spec/faraday/utils_spec.rb'
|
- 'spec/faraday/utils_spec.rb'
|
||||||
|
|
||||||
# Offense count: 271
|
# Offense count: 280
|
||||||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
||||||
# URISchemes: http, https
|
# URISchemes: http, https
|
||||||
Metrics/LineLength:
|
Metrics/LineLength:
|
||||||
|
|||||||
@ -235,8 +235,14 @@ module Faraday
|
|||||||
|
|
||||||
def perform_request
|
def perform_request
|
||||||
client = yield
|
client = yield
|
||||||
client.callback { @num_succeeded += 1; check_finished }
|
client.callback do
|
||||||
client.errback { @errors << client.error; check_finished }
|
@num_succeeded += 1
|
||||||
|
check_finished
|
||||||
|
end
|
||||||
|
client.errback do
|
||||||
|
@errors << client.error
|
||||||
|
check_finished
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def check_finished
|
def check_finished
|
||||||
|
|||||||
@ -1,13 +1,10 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
begin
|
require 'stringio'
|
||||||
|
|
||||||
|
# multipart-post gem
|
||||||
require 'composite_io'
|
require 'composite_io'
|
||||||
require 'parts'
|
require 'parts'
|
||||||
require 'stringio'
|
|
||||||
rescue LoadError
|
|
||||||
$stderr.puts 'Install the multipart-post gem.'
|
|
||||||
raise
|
|
||||||
end
|
|
||||||
|
|
||||||
module Faraday
|
module Faraday
|
||||||
# Similar to, but not compatible with [::CompositeReadIO](https://github.com/nicksieger/multipart-post/blob/master/lib/composite_io.rb) provided by [multipart-post](https://github.com/nicksieger/multipart-post).
|
# Similar to, but not compatible with [::CompositeReadIO](https://github.com/nicksieger/multipart-post/blob/master/lib/composite_io.rb) provided by [multipart-post](https://github.com/nicksieger/multipart-post).
|
||||||
|
|||||||
@ -10,11 +10,11 @@ RSpec.describe Faraday::RackBuilder do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class Apple < Handler;
|
class Apple < Handler
|
||||||
end
|
end
|
||||||
class Orange < Handler;
|
class Orange < Handler
|
||||||
end
|
end
|
||||||
class Banana < Handler;
|
class Banana < Handler
|
||||||
end
|
end
|
||||||
|
|
||||||
class Broken < Faraday::Middleware
|
class Broken < Faraday::Middleware
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user