You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm generally very wary of APIs that add to string. Wrest looks really useful, but it seems adding to_uri doesnt seem like its really not needed. I see how it could be preferred by some people, but if you could allow a way to opt out of including core_ext/string that would be really nice.
Thanks
The text was updated successfully, but these errors were encountered:
I've found that when doing a lot of work with uris the String helper is handy. I do understand your concern, so here's a fix I've added in 716f791 to make the to_uri helper method opt-out. If you're in a Rails app you'll have to do this before plugins/gems are loaded.
module Wrest
NoStringExtensions = true
end
require 'lib/wrest'
Cool, thanks for the patch. That seems ok. One possible improvement on this strategy would be to create a lib/wrest_no_ext.rb that includes these lines of code:
module Wrest
NoStringExtensions = true
end
require 'wrest'
Then I can easily opt out via my Bundler Gemfile (or by requiring it wrest_no_ext specifically).
gem "wrest", :require => "wrest_no_ext"
Would be nice to be able to opt out of the Hash ext as well.
I'm generally very wary of APIs that add to string. Wrest looks really useful, but it seems adding to_uri doesnt seem like its really not needed. I see how it could be preferred by some people, but if you could allow a way to opt out of including core_ext/string that would be really nice.
Thanks
The text was updated successfully, but these errors were encountered: