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

Add Ruby 2.6 compatibility and tests #636

Merged
merged 2 commits into from
Jan 21, 2019
Merged

Conversation

chtitux
Copy link
Contributor

@chtitux chtitux commented Dec 28, 2018

Add ruby 2.6.0 in Travis CI

Update HTTP status code methods

On ruby/ruby@660740a , some status codes have been updated.

Add aliases so old names can still be used with ruby >= 2.6.

Added aliases are:

  • gateway_time_out?gateway_timeout?
  • request_entity_too_large?payload_too_large?
  • request_time_out?request_timeout?
  • request_uri_too_long?uri_too_long?
  • requested_range_not_satisfiable?range_not_satisfiable?

It solves issues you will have with ruby 2.6.0 like

irb(main):001:0> http_response.request_time_out?
NoMethodError: undefined method `request_time_out?' for #<HTTParty::Response:0x0000563c88932270>
Did you mean?  request_timeout?
from …/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/httparty-0.16.2/lib/httparty/response.rb:101:in `method_missing'

Théophile Helleboid added 2 commits December 28, 2018 09:44
On ruby/ruby@660740a , some status
codes have been updated.
Add aliases so old names can still be used with ruby >= 2.6
@TheSmartnik
Copy link
Collaborator

@chtitux Thanks a lot!

@TheSmartnik TheSmartnik merged commit d84a05b into jnunemaker:master Jan 21, 2019
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.

2 participants