upserve / docker-api

A lightweight Ruby client for the Docker Remote API
MIT License
1.09k stars 287 forks source link

Warning: URI.escape is obsolete (Ruby 2.7.0) #557

Closed hezanathos closed 4 years ago

hezanathos commented 4 years ago

URI.escape is obsolete in Ruby 2.7.0, so using the gem generates warnings.

/usr/local/bundle/gems/docker-api-1.34.2/lib/docker/image.rb:129: warning: URI.escape is obsolete

The problematic line is : https://github.com/swipely/docker-api/blob/master/lib/docker/image.rb#L129

tas50 commented 4 years ago

This fork has the fix for those warnings: https://github.com/chef/docker-api

tlunter commented 4 years ago

There was a pull request opened here with regards to this issue here: https://github.com/swipely/docker-api/pull/551#issuecomment-629844221 but notably swapping from URI.escape and URI.encode to CGI.escape doesn't seem to be a solution that works as a drop in (the tests for these cases fail).

rmoriz commented 4 years ago

@tlunter As far as I can see the test pass and fail for older Rubies just because of a broken travis setup (bundler version)

tlunter commented 4 years ago

Hey folks, can try now with v2.0.0.pre.1. There are some other changes in there that I think many folks would benefit from. Let me know if you see any issues.