lib/aws_recon/collectors/ec2.rb in aws_recon-0.2.27 vs lib/aws_recon/collectors/ec2.rb in aws_recon-0.2.28

- old
+ new

@@ -1,5 +1,10 @@ +# frozen_string_literal: true + +# +# Collect EC2 resources +# class EC2 < Mapper # # Returns an array of resources. # def collect @@ -69,12 +74,10 @@ # don't save non-string user_data if user_data_raw user_data = Base64.decode64(user_data_raw) - if user_data.force_encoding('UTF-8').ascii_only? - struct.user_data = user_data - end + struct.user_data = user_data if user_data.force_encoding('UTF-8').ascii_only? end end resources.push(struct.to_h) end