mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Provide aws-sdk with working URI.encode method
The S3 class is calling URI.encode which is removed in Ruby 3. By
providing a URI module within the S3 class makes the S3 code call that
module instead.
(cherry picked from commit 2e6d8c1216)
This commit is contained in:
committed by
Matt-Yorkley
parent
6dac65ace5
commit
46edea50d6
20
config/initializers/aws_sdk.rb
Normal file
20
config/initializers/aws_sdk.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
# frozen_string_literal: false
|
||||
|
||||
if AWS::VERSION == "1.67.0"
|
||||
module AWS
|
||||
module Core
|
||||
module Signers
|
||||
# @api private
|
||||
class S3
|
||||
module URI
|
||||
def self.escape(string)
|
||||
::URI::RFC2396_Parser.new.escape(string)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
Rails.logger.warn "The aws-sdk patch needs updating or removing."
|
||||
end
|
||||
Reference in New Issue
Block a user