unixcharles / acme-client

A Ruby client for the letsencrypt's ACME protocol.
MIT License
494 stars 117 forks source link

Fix compatibility with both Ruby 3.0 and Faraday 0.17.x #206

Closed jhawthorn closed 3 years ago

jhawthorn commented 3 years ago

The gemspec claims compatibility with Faraday 0.17.x, but previously the test suite was not passing as the Faraday client built in fetch_directory did not have an adapter configured.

Additionally the test suite did not run under Ruby 3.0 (with any version of Faraday) because of a missing dependency on webrick.

Finally, when Faraday 0.17.x and Ruby 3.0 were used in combination FaradayMiddleware would error on initialization since Faraday 0.17 always passes an options hash, which are no longer compatible with kwargs.. I think it's safest to assume this as an options hash even in Faraday 1+ since that is relying on the ruby2_keywords hack, and that should keep compatibility with all versions.

unixcharles commented 3 years ago

Thanks for the PR

unixcharles commented 3 years ago

It out in 2.0.9