From ad6c0d3ebabdfe985ce91b10e3ae07b68ebd768f Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 22 Apr 2021 18:53:27 +0100 Subject: [PATCH] Monkey patch oauth gem to avoid use of deprecated URI.escape --- config/initializers/oauth.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/initializers/oauth.rb b/config/initializers/oauth.rb index 2e2f45ab8..bad01dd3d 100644 --- a/config/initializers/oauth.rb +++ b/config/initializers/oauth.rb @@ -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 -- 2.45.1