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

Corrected a couple of syntax errors in the put and get metric cloudwatch requests

This commit is contained in:
Henry Addison 2011-05-17 14:47:44 +01:00
parent 5a1789c182
commit d1d869f2ce
2 changed files with 4 additions and 4 deletions

View file

@ -26,9 +26,9 @@ module Fog
#
def get_metric_statistics(options={})
statistics = options.delete 'Statistics'
options.merge!(AWS.indexed_param('Statistics.member.%d', [*statistics])
options.merge!(AWS.indexed_param('Statistics.member.%d', [*statistics]))
if dimensions = options.delete 'Dimensions'
if dimensions = options.delete('Dimensions')
options.merge!(AWS.indexed_param('Dimensions.member.%d.Name', dimensions.collect {|dimension| dimension['Name']}))
options.merge!(AWS.indexed_param('Dimensions.member.%d.Value', dimensions.collect {|dimension| dimension['Value']}))
end

View file

@ -29,9 +29,9 @@ module Fog
#
def put_metric_data(namespace, metric_data)
statistics = options.delete 'Statistics'
options.merge!(AWS.indexed_param('Statistics.member.%d', [*statistics])
options.merge!(AWS.indexed_param('Statistics.member.%d', [*statistics]))
if dimensions = options.delete 'Dimensions'
if dimensions = options.delete('Dimensions')
options.merge!(AWS.indexed_param('Dimensions.member.%d.Name', dimensions.collect {|dimension| dimension['Name']}))
options.merge!(AWS.indexed_param('Dimensions.member.%d.Value', dimensions.collect {|dimension| dimension['Value']}))
end