Monkey patch oauth gem to avoid use of deprecated URI.escape

This commit is contained in:
Tom Hughes 2021-04-22 18:53:27 +01:00
parent 11aec2e0d7
commit ad6c0d3eba

View file

@ -4,6 +4,14 @@ require "oauth/rack/oauth_filter"
Rails.configuration.middleware.use OAuth::Rack::OAuthFilter
module OAuth
module Helper
def escape(value)
value.to_s.gsub(OAuth::RESERVED_CHARACTERS) do |c|
format("%%%02X", c.ord)
end
end
end
module RequestProxy
class RackRequest
def method