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

IAM::get_group_policy returns PolicyDocument Hash

This commit is contained in:
Jose Luis Salas 2013-10-09 21:34:45 +02:00
parent 66d943f41c
commit 4a2e25eacf

View file

@ -7,15 +7,21 @@ module Fog
# http://docs.amazonwebservices.com/IAM/latest/APIReference/API_GetGroupPolicy.html
def reset
@response = {}
@response = { 'Policy' => {} }
end
def end_element(name)
case name
when 'GroupName', 'PolicyName', 'PolicyDocument'
@response[name] = @value
when 'GroupName', 'PolicyName'
@response[name] = value
when 'PolicyDocument'
@response['Policy'][name] = if decoded_string = URI.decode(value)
Fog::JSON.decode(decoded_string) rescue value
else
value
end
when 'RequestId'
@response[name] = @value
@response[name] = value
end
end