From 57cc3b001f1931dcc7bc1f8f7ce9a3e8ea26dc64 Mon Sep 17 00:00:00 2001 From: Michael Zeng Date: Thu, 29 Sep 2011 17:52:56 -0400 Subject: [PATCH] added DeleteAlarms, DescribeAlarms and PutMetricAlarms --- fog.gemspec | 2 +- lib/fog/aws/cloud_watch.rb | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/fog.gemspec b/fog.gemspec index 496defde3..60d8b8c54 100644 --- a/fog.gemspec +++ b/fog.gemspec @@ -7,7 +7,7 @@ Gem::Specification.new do |s| ## the sub! line in the Rakefile s.name = 'fog' s.version = '0.11.0' - s.date = '2011-08-18' + s.date = '2011-09-29' s.rubyforge_project = 'fog' ## Make sure your summary is short. The description may be as long diff --git a/lib/fog/aws/cloud_watch.rb b/lib/fog/aws/cloud_watch.rb index eb90e13ef..e539c7331 100644 --- a/lib/fog/aws/cloud_watch.rb +++ b/lib/fog/aws/cloud_watch.rb @@ -1,5 +1,3 @@ -require File.expand_path(File.join(File.dirname(__FILE__), '..', 'aws')) - module Fog module AWS class CloudWatch < Fog::Service @@ -13,6 +11,9 @@ module Fog request :list_metrics request :get_metric_statistics request :put_metric_data + request :describe_alarms + request :put_metric_alarm + request :delete_alarms model_path 'fog/aws/models/cloud_watch' model :metric @@ -52,7 +53,6 @@ module Fog @aws_secret_access_key = options[:aws_secret_access_key] @hmac = Fog::HMAC.new('sha256', @aws_secret_access_key) - @connection_options = options[:connection_options] || {} options[:region] ||= 'us-east-1' @host = options[:host] || case options[:region] when 'ap-northeast-1' @@ -68,11 +68,10 @@ module Fog else raise ArgumentError, "Unknown region: #{options[:region].inspect}" end - @path = options[:path] || '/' - @persistent = options[:persistent] || false - @port = options[:port] || 443 - @scheme = options[:scheme] || 'https' - @connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", @persistent, @connection_options) + @path = options[:path] || '/' + @port = options[:port] || 443 + @scheme = options[:scheme] || 'https' + @connection = Fog::Connection.new("#{@scheme}://#{@host}:#{@port}#{@path}", options[:persistent]) end def reload