Skip to content

Commit

Permalink
Replace Excon adapter with Faraday::Excon gem, and fix autoloading is…
Browse files Browse the repository at this point in the history
…sue with Faraday::NetHttpPersistent (#1257)
  • Loading branch information
iMacTia committed Apr 12, 2021
1 parent 8d379a1 commit 20be816
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 132 deletions.
1 change: 0 additions & 1 deletion Gemfile
Expand Up @@ -21,7 +21,6 @@ group :test, :development do
gem 'coveralls_reborn', require: false
gem 'em-http-request', '>= 1.1', require: 'em-http'
gem 'em-synchrony', '>= 1.0.3', require: %w[em-synchrony em-synchrony/em-http]
gem 'excon', '>= 0.27.4'
gem 'httpclient', '>= 2.2'
gem 'multipart-parser'
gem 'patron', '>= 0.4.2', platforms: :ruby
Expand Down
1 change: 1 addition & 0 deletions faraday.gemspec
Expand Up @@ -15,6 +15,7 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = '>= 2.4'

spec.add_dependency 'faraday-excon', '~> 1.0'
spec.add_dependency 'faraday-net_http', '~> 1.0'
spec.add_dependency 'faraday-net_http_persistent', '~> 1.0'
spec.add_dependency 'multipart-post', '>= 1.2', '< 3'
Expand Down
2 changes: 2 additions & 0 deletions lib/faraday.rb
Expand Up @@ -28,6 +28,8 @@
require 'faraday/param_part'

require 'faraday/net_http'
require 'faraday/net_http_persistent'
require 'faraday/excon'

# This is the main namespace for Faraday.
#
Expand Down
5 changes: 0 additions & 5 deletions lib/faraday/adapter.rb
Expand Up @@ -11,15 +11,10 @@ class Adapter

register_middleware File.expand_path('adapter', __dir__),
test: [:Test, 'test'],
net_http_persistent: [
:NetHttpPersistent,
'net_http_persistent'
],
typhoeus: [:Typhoeus, 'typhoeus'],
patron: [:Patron, 'patron'],
em_synchrony: [:EMSynchrony, 'em_synchrony'],
em_http: [:EMHttp, 'em_http'],
excon: [:Excon, 'excon'],
rack: [:Rack, 'rack'],
httpclient: [:HTTPClient, 'httpclient']

Expand Down
124 changes: 0 additions & 124 deletions lib/faraday/adapter/excon.rb

This file was deleted.

2 changes: 0 additions & 2 deletions lib/faraday/autoload.rb
Expand Up @@ -58,12 +58,10 @@ def all_loaded_constants
class Adapter
extend AutoloadHelper
autoload_all 'faraday/adapter',
NetHttpPersistent: 'net_http_persistent',
EMSynchrony: 'em_synchrony',
EMHttp: 'em_http',
Typhoeus: 'typhoeus',
Patron: 'patron',
Excon: 'excon',
Test: 'test',
Rack: 'rack',
HTTPClient: 'httpclient'
Expand Down

0 comments on commit 20be816

Please sign in to comment.