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'
|
when 'GroupName', 'PolicyName'
|
||||||
@response[name] = value
|
@response[name] = value
|
||||||
when 'PolicyDocument'
|
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
|
Fog::JSON.decode(decoded_string) rescue value
|
||||||
else
|
else
|
||||||
value
|
value
|
||||||
|
|
|
@ -12,7 +12,7 @@ module Fog
|
||||||
when 'RoleName', 'PolicyName'
|
when 'RoleName', 'PolicyName'
|
||||||
@response['Policy'][name] = value
|
@response['Policy'][name] = value
|
||||||
when 'PolicyDocument'
|
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
|
Fog::JSON.decode(decoded_string) rescue value
|
||||||
else
|
else
|
||||||
value
|
value
|
||||||
|
|
|
@ -14,7 +14,7 @@ module Fog
|
||||||
when 'UserName', 'PolicyName'
|
when 'UserName', 'PolicyName'
|
||||||
@response['Policy'][name] = value
|
@response['Policy'][name] = value
|
||||||
when 'PolicyDocument'
|
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
|
Fog::JSON.decode(decoded_string) rescue value
|
||||||
else
|
else
|
||||||
value
|
value
|
||||||
|
|
|
@ -18,7 +18,7 @@ module Fog
|
||||||
when 'IsDefaultVersion'
|
when 'IsDefaultVersion'
|
||||||
@version[name] = (value == 'true')
|
@version[name] = (value == 'true')
|
||||||
when 'Document'
|
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
|
Fog::JSON.decode(decoded_string) rescue value
|
||||||
else
|
else
|
||||||
value
|
value
|
||||||
|
|
Loading…
Reference in a new issue