-
Notifications
You must be signed in to change notification settings - Fork 61
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
Fix obsolete uri escape warning #58
base: master
Are you sure you want to change the base?
Fix obsolete uri escape warning #58
Conversation
The `--debugger` option in `.rspec` was misspelled and is also no longer a valid option. The gem also does not currently have a `spec/spec_helper.rb` file. Co-authored-by: Daniel Colson <[email protected]>
3240ba4
to
e3c71d1
Compare
Prior to these changes, `URI.escape` would trigger a warning. Instead, this uses `Addressable::URI.escape` to maintain similar behavior, but without the warning. One difference between the two being how the `#` sign is handled. `URI.escape` escapes this character. `Addressable::URI.escape` does not. See this link for more information: https://stackoverflow.com/a/13059657 Co-authored-by: Daniel Colson <[email protected]>
e3c71d1
to
f433e82
Compare
The existing tests also fail on |
👋 @LarryKlugerDS, any thoughts on this PR? Thanks! |
I'm sorry for the slow response. I have opened DCM-4886 for engineering to review the PR |
Any updates on this? |
Instead of adding another gem, is it possible just to change the call to |
@LarryKlugerDS Any updates on this? |
I don't think this is the correct way of fixing it (adding another gem) - I agree with @MatheusRich 's solution of just using I would love to get this fix out ASAP @LarryKlugerDS so I don't have to run on a fork. |
@joshkinabrew This is what happens when you use URI.encode_www_form_component on a full URL URI.encode_www_form_component('https://www.google.com') will yield the result of Addressable::URI.encode('https://www.google.com') will yield
Also the encoding style is different URI.encode_www_form_component('space space') yields
and Addressable::URI.encode('space space') yields
I agree that it is quite bad to bring extra dependency but I also think this is the fastest fix. Otherwise, it will be quite a big work. |
Prior to these changes,
URI.escape
would trigger a warning. Instead, this usesAddressable::URI.escape
to maintain similar behavior, but without the warning. One difference between the two being how the#
sign is handled.URI.escape
escapes this character.Addressable::URI.escape
does not.See this link for more information:
https://stackoverflow.com/a/13059657
Resolves: #45