lostisland / faraday

Simple, but flexible HTTP client library, with support for multiple backends.
https://lostisland.github.io/faraday
MIT License
5.71k stars 972 forks source link

Always assume the existence of `URI::Generic#find_proxy` #1502

Closed yykamei closed 1 year ago

yykamei commented 1 year ago

Description

Previously, the method #proxy_from_env checked the existence of URI::Generic#find_proxy by using respond_to?(:find_proxy); this method was introduced in Ruby 2.0.0.

Since the latest Faraday requires Ruby 2.6, as specified in faraday.gemspec, there is no need for #proxy_from_env to handle the case where URI::Generic#find_proxy doesn't exist.

Additional Notes

I recommend reviewing this pull request changes with "Hide whitespace."

Screenshot 2023-05-18 at 12 31 28