Closed mattbrictson closed 3 years ago
Thanks! I left off these things out of this PR because they aren't strictly related to Faraday 2.0 compatibility:
But I think those are worthwhile improvements and we should cherry-pick those from #8. As a follow-up PR.
@mattbrictson I began taking some of these steps, so watch this space.
In Faraday 2.0, adapters will be completely opt-in. As a consequence, this adapter can now have a hard dependency on
net_http_persistent
. If a user has opted into adding this adapter to their Gemfile, we know they will be using it.Thus this PR can make the following changes:
dependency "net/http/persistent"
declaration. This existed to support loading dependencies on demand, based on what adapter is being used. Since adapters are now explicitly opt-in, this is no longer needed.faraday-net_http
as an explicit dependency. Thefaraday-net_http_persistent
adapter subclasses the net_http one. Previously the net_http adapter was part of Faraday core. As of 2.0 it is packaged as a separate gem, so we need to declare it as a dependency.faraday-net_http_persistent
. All other dependencies will be included automatically.