1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00

Merge pull request #654 from kuahyeow/uri_decode_obsolete

Replace URI.decode as obsolete, and removed in Ruby 3.0
This commit is contained in:
Wesley Beary 2022-09-07 09:16:28 -05:00 committed by GitHub
commit 754786923d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -14,7 +14,7 @@ module Fog
when 'GroupName', 'PolicyName'
@response[name] = value
when 'PolicyDocument'
@response['Policy'][name] = if decoded_string = URI.decode(value)
@response['Policy'][name] = if decoded_string = URI.decode_www_form_component(value)
Fog::JSON.decode(decoded_string) rescue value
else
value

View file

@ -12,7 +12,7 @@ module Fog
when 'RoleName', 'PolicyName'
@response['Policy'][name] = value
when 'PolicyDocument'
@response['Policy'][name] = if decoded_string = URI.decode(value)
@response['Policy'][name] = if decoded_string = URI.decode_www_form_component(value)
Fog::JSON.decode(decoded_string) rescue value
else
value

View file

@ -14,7 +14,7 @@ module Fog
when 'UserName', 'PolicyName'
@response['Policy'][name] = value
when 'PolicyDocument'
@response['Policy'][name] = if decoded_string = URI.decode(value)
@response['Policy'][name] = if decoded_string = URI.decode_www_form_component(value)
Fog::JSON.decode(decoded_string) rescue value
else
value

View file

@ -18,7 +18,7 @@ module Fog
when 'IsDefaultVersion'
@version[name] = (value == 'true')
when 'Document'
@version[name] = if decoded_string = URI.decode(value)
@version[name] = if decoded_string = URI.decode_www_form_component(value)
Fog::JSON.decode(decoded_string) rescue value
else
value