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

Replace deprecated URI.encode with CGI.escape #551

Closed
wants to merge 1 commit into from

Conversation

jasonheecs
Copy link
Contributor

URI.escape and URI.encode are deprecated, this PR replaces the URI.encode method call with CGI.escape

image

@clintoncwolfe
Copy link

My team is looking for this as well, as this is very noisy under ruby 2.7.

@tas50
Copy link
Contributor

tas50 commented Apr 13, 2020

@tlunter any chance we could get a release with this fix pushed to Rubygems. This is going to cause a lot of issues for anyone going to Ruby 2.7.

@ypal
Copy link

ypal commented Apr 16, 2020

👍 on this, upgrading to ruby 2.7 made the output VERY noisy

@tas50
Copy link
Contributor

tas50 commented May 16, 2020

For anyone running into this our fork here has all the URI -> CGI fixes. There's more than just this one:https://github.com/chef/docker-api

@tlunter
Copy link
Contributor

tlunter commented May 17, 2020

@jasonheecs can we replace all URI.encode calls rather than just one?

@tlunter
Copy link
Contributor

tlunter commented May 17, 2020

Actually, it seems like you can't just find and replace since URI.encode won't encode characters like / and : but CGI.escape does. The remaining URI method encode_www_form_component mirrors CGI.escape. The daemons that I tested against on travis seem to not like those characters being encoded like that.

@hezanathos
Copy link

Does it ? It looks like travis failed for a different reason. And it succeded for several ruby versions.

ERROR:  Error installing bundler:

	The last version of bundler (>= 0) to support your Ruby & RubyGems was 1.17.3. Try installing it with `gem install bundler -v 1.17.3`

	bundler requires Ruby version >= 2.3.0. The current ruby version is 2.2.0.

The command "gem install bundler" failed and exited with 1 during .

@tlunter
Copy link
Contributor

tlunter commented Jul 7, 2020

@hezanathos this was on a branch where I replaced all occurrences and not just the one in this PR and adjusted the .travis.yml file to test relevant versions of ruby instead of the current ones which are out of date.

@tlunter
Copy link
Contributor

tlunter commented Jul 21, 2020

Hey folks, I have merged this in and released as 2.0.0.pre.1. Let me know if you see any issues. Thanks @jasonheecs.

@tlunter tlunter closed this Jul 21, 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

6 participants