-
Notifications
You must be signed in to change notification settings - Fork 74
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
URI.encode is obsoleted and not available in the latest Ruby versions #57
Comments
URI.escape is also obsolete and it is used in lib/woocommerce_api.rb:100 |
I have the same problem. @tannakartikey are you working on a PR? |
No, I'm not. Feel free to handle if you want. Thanks.
…On Sat, 17 Feb, 2024, 03:42 Ricardo Villagrana, ***@***.***> wrote:
I have the same problem.
@tannakartikey <https://github.com/tannakartikey> are you working on a PR?
—
Reply to this email directly, view it on GitHub
<#57 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADHFEB5WUQQ7JRIB3TK24LYT7KT3AVCNFSM53RNDMHKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJUHE2DAOBQGM4A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I have this problem as well. This module is broken as long as arguments are beeing passed to endpoint (which is set in querystring). See #61, this uses the updated method in URI module. Both solutions work, but please include and release, as this module is not usable anymore due to depreciation in Ruby (since 2020). |
The obsolete method
URI.encode
is used in the code which is throwing the error while using the gem with the latest Ruby versions e.g.ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x86_64-linux]
.wc-api-ruby/lib/woocommerce_api.rb
Line 100 in 6433671
The method was marked as obsolete many years back in 2009 with ruby/ruby@238b979
It can be replaced with the
CGI.escape
method.More details: https://bugs.ruby-lang.org/issues/17309
There are many more discussions around the topic on https://bugs.ruby-lang.org/
I have monkeypatched the method in my Rails app until the patch is available on this gem.
The text was updated successfully, but these errors were encountered: