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

Fix issue with list in mock mode.

This commit is contained in:
Rupak Ganguly 2011-11-23 13:18:22 -05:00
parent a28193d2b8
commit 3121ef15ab

View file

@ -33,8 +33,10 @@ module Fog
key_pairs = []
key_pairs = self.data[:key_pairs].values unless self.data[:key_pairs].nil?
puts "Key Pairs Raw: #{key_pairs.inspect} "
response.status = [200, 203][rand(1)]
response.body = { 'keypairs' => key_pairs.map {|keypair| keypair.reject {|key, value| !['public_key', 'name', 'fingerprint'].include?(key)}} }
response.body = { 'keypairs' => key_pairs.map {|keypair| keypair['keypair'].reject {|key,value| !['public_key', 'name', 'fingerprint'].include?(key)}} }
response
end