lib/terraforming/resource/launch_configuration.rb in terraforming-0.9.1 vs lib/terraforming/resource/launch_configuration.rb in terraforming-0.10.0

- old
+ new

@@ -19,11 +19,10 @@ apply_template(@client, "tf/launch_configuration") end def tfstate launch_configurations.inject({}) do |resources, lc| - attributes = { "name" => lc.launch_configuration_name, "image_id" => lc.image_id, "instance_type" => lc.instance_type, "key_name" => lc.key_name, @@ -70,11 +69,11 @@ root_block_device?(volume) end.length end def ebs_block_device?(block_device) - block_device.virtual_name == nil && block_device.ebs + block_device.virtual_name.nil? && block_device.ebs end def ebs_block_device_count(launch_configuration) launch_configuration.block_device_mappings.select do |volume| ebs_block_device?(volume) && !root_block_device?(volume) @@ -94,12 +93,10 @@ def hash_security_group(name) Zlib.crc32(name) end def launch_configurations - @client.describe_launch_configurations.collect do |r| - r.launch_configurations - end.flatten + @client.describe_launch_configurations.map(&:launch_configurations).flatten end def module_name_of(launch_configuration) normalize_module_name(launch_configuration.launch_configuration_name) end