fog/fog — pull request #779 by restebanez (2012-03-06 14:18:17+00:00)
Title: [aws][auto_scaling] Bug fixed: configurations.get(launch-configuration) always shows the first element

Below is the proof of the bug, the original code didn't take into account that you can query one or many passing an array.

[agifog] fog
Welcome to fog interactive!
:default provides AWS
>> Fog.mock!
true
>>
?> def as
>> @as ||= Fog::AWS::AutoScaling.new
>> end
nil
>>
?> def compute
>> @compute ||= Fog::Compute::AWS.new
>> end
nil
>>
?> @image = compute.register_image('image', 'image', '/dev/sda1').body
{"requestId"=>"cff532df-ae60-49e6-ba21-ffe46e3d4155", "imageId"=>"ami-6471279a"}
>> @image_id = @image['imageId']
"ami-6471279a"
>>
?> first = as.configurations.create(:id => "first-configuration", :image_id => @image_id, :instance_type => 't1.micro')

>> second = as.configurations.create(:id => "second-configuration", :image_id => @image_id, :instance_type => 't1.micro')

>> as.configurations.get('second-configuration')