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

Update code to avoid Ruby 2.7.0 warnings #183

Merged
merged 2 commits into from May 5, 2020

Conversation

dgholz
Copy link
Contributor

@dgholz dgholz commented May 4, 2020

When running acme-client with Ruby 2.7.0, I see a few warnings like:

/Users/danielholz/.gem/ruby/2.7.0/gems/acme-client-2.0.6/lib/acme/client/resources/account.rb:8: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/danielholz/.gem/ruby/2.7.0/gems/acme-client-2.0.6/lib/acme/client/resources/account.rb:43: warning: The called method `assign_attributes' is defined here
/Users/danielholz/.gem/ruby/2.7.0/gems/acme-client-2.0.6/lib/acme/client/resources/order.rb:8: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/danielholz/.gem/ruby/2.7.0/gems/acme-client-2.0.6/lib/acme/client/resources/order.rb:49: warning: The called method `assign_attributes' is defined here
/Users/danielholz/.gem/ruby/2.7.0/gems/acme-client-2.0.6/lib/acme/client/resources/authorization.rb:8: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/danielholz/.gem/ruby/2.7.0/gems/acme-client-2.0.6/lib/acme/client/resources/authorization.rb:65: warning: The called method `assign_attributes' is defined here
/Users/danielholz/.gem/ruby/2.7.0/gems/acme-client-2.0.6/lib/acme/client/resources/challenges/base.rb:8: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/danielholz/.gem/ruby/2.7.0/gems/acme-client-2.0.6/lib/acme/client/resources/challenges/base.rb:43: warning: The called method `assign_attributes' is defined here

This PR updates the calls to assign_attributes to explicitly splat the argument.

I also removed the redefinition of OpenSSL::SSL::VERIFY_PEER in the spec helper, since it also printed a warning and didn't seem to affect tests.

There is one warning remaining related to the Faraday middleware; I've opened lostisland/faraday#1153 to address that.

dgholz added 2 commits May 4, 2020 17:04
Can use `def begin() stub_const('OpenSSL::SSL::VERIFY_PEER', OpenSSL::SSL::VERIFY_NONE) end` instead, but it looks like it isn't needed?
@dgholz
Copy link
Contributor Author

dgholz commented May 4, 2020

I also noticed that Acme::Client::CertificateRequest assigns the public key fails when I run the test suite locally (#174)

@unixcharles unixcharles merged commit 3b24f02 into unixcharles:master May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants