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

Merge pull request #409 from cmeiklejohn/fix_simpledb_attribute_test_errors

Fix failures in the simpledb tests.
This commit is contained in:
Wesley Beary 2011-07-11 13:55:54 -07:00
commit 6c2d3f455c

View file

@ -50,15 +50,15 @@ module Fog
def get_attributes(domain_name, item_name, options = {})
unless options.empty? || options['AttributeName']
Formatador.display_line("[yellow][WARN] get_attributes with array attributes param is deprecated, use 'AttributeName' => attributes) instead[/] [light_black](#{caller.first})[/]")
options['AttributeName'] ||= options
options['AttributeName'] ||= options if options.is_a?(Array)
end
option['AttributeName'] ||= []
options['AttributeName'] ||= []
response = Excon::Response.new
if self.data[:domains][domain_name]
object = {}
if options['AttributeName']
if !options['AttributeName'].empty?
for attribute in options['AttributeName']
if self.data[:domains][domain_name][item_name] && self.data[:domains][domain_name][item_name]
if self.data[:domains][domain_name].has_key?(item_name) && self.data[:domains][domain_name][item_name].has_key?(attribute)
object[attribute] = self.data[:domains][domain_name][item_name][attribute]
end
end