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:
commit
754786923d
4 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue