mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-27 21:06:49 +00:00
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.
21 lines
405 B
Ruby
21 lines
405 B
Ruby
# 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
|