Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Excon adapter with Faraday::Excon gem, and fix autoloading issue with Faraday::NetHttpPersistent #1257

Merged
merged 2 commits into from Apr 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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