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
|
||||
# `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
|
||||
# one by one as the offenses are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
@ -14,7 +14,7 @@ Metrics/AbcSize:
|
||||
# Configuration parameters: CountComments, ExcludedMethods.
|
||||
# ExcludedMethods: refine
|
||||
Metrics/BlockLength:
|
||||
Max: 35
|
||||
Max: 31
|
||||
|
||||
# Offense count: 5
|
||||
# Configuration parameters: CountComments.
|
||||
@ -33,7 +33,7 @@ Metrics/MethodLength:
|
||||
# Offense count: 1
|
||||
# Configuration parameters: CountComments.
|
||||
Metrics/ModuleLength:
|
||||
Max: 105
|
||||
Max: 101
|
||||
|
||||
# Offense count: 19
|
||||
Metrics/PerceivedComplexity:
|
||||
@ -294,14 +294,6 @@ Style/SafeNavigation:
|
||||
- 'lib/faraday/connection.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
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AllowIfMethodIsEmpty.
|
||||
@ -323,12 +315,6 @@ Style/SingleLineMethods:
|
||||
Style/SpecialGlobalVars:
|
||||
EnforcedStyle: use_perl_names
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
Style/StderrPuts:
|
||||
Exclude:
|
||||
- 'lib/faraday/upload_io.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
@ -338,7 +324,7 @@ Style/StringLiteralsInInterpolation:
|
||||
- 'lib/faraday/options/env.rb'
|
||||
- 'spec/faraday/utils_spec.rb'
|
||||
|
||||
# Offense count: 271
|
||||
# Offense count: 280
|
||||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
||||
# URISchemes: http, https
|
||||
Metrics/LineLength:
|
||||
|
||||
@ -235,8 +235,14 @@ module Faraday
|
||||
|
||||
def perform_request
|
||||
client = yield
|
||||
client.callback { @num_succeeded += 1; check_finished }
|
||||
client.errback { @errors << client.error; check_finished }
|
||||
client.callback do
|
||||
@num_succeeded += 1
|
||||
check_finished
|
||||
end
|
||||
client.errback do
|
||||
@errors << client.error
|
||||
check_finished
|
||||
end
|
||||
end
|
||||
|
||||
def check_finished
|
||||
|
||||
@ -1,13 +1,10 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
begin
|
||||
require 'composite_io'
|
||||
require 'parts'
|
||||
require 'stringio'
|
||||
rescue LoadError
|
||||
$stderr.puts 'Install the multipart-post gem.'
|
||||
raise
|
||||
end
|
||||
require 'stringio'
|
||||
|
||||
# multipart-post gem
|
||||
require 'composite_io'
|
||||
require 'parts'
|
||||
|
||||
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).
|
||||
|
||||
@ -10,11 +10,11 @@ RSpec.describe Faraday::RackBuilder do
|
||||
end
|
||||
end
|
||||
|
||||
class Apple < Handler;
|
||||
class Apple < Handler
|
||||
end
|
||||
class Orange < Handler;
|
||||
class Orange < Handler
|
||||
end
|
||||
class Banana < Handler;
|
||||
class Banana < Handler
|
||||
end
|
||||
|
||||
class Broken < Faraday::Middleware
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user