lib/aws_recon/collectors/sns.rb in aws_recon-0.2.18 vs lib/aws_recon/collectors/sns.rb in aws_recon-0.2.19

- old
+ new

@@ -16,11 +16,11 @@ # get_topic_attributes struct = OpenStruct.new(@client.get_topic_attributes({ topic_arn: topic.topic_arn }).attributes.to_h) struct.type = 'topic' struct.arn = topic.topic_arn - struct.policy = JSON.parse(CGI.unescape(struct.Policy)) - struct.effective_delivery_policy = JSON.parse(CGI.unescape(struct.EffectiveDeliveryPolicy)) + struct.policy = struct.delete_field('Policy').parse_policy + struct.effective_delivery_policy = struct.delete_field('EffectiveDeliveryPolicy').parse_policy struct.subscriptions = [] # list_subscriptions_by_topic @client.list_subscriptions_by_topic({ topic_arn: topic.topic_arn }).each_with_index do |response, page| log(response.context.operation_name, topic.topic_arn, page)