amazon-ec2 0.7.2 → 0.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.2
1
+ 0.7.3
data/amazon-ec2.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{amazon-ec2}
8
- s.version = "0.7.2"
8
+ s.version = "0.7.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Glenn Rempe"]
12
- s.date = %q{2009-11-14}
12
+ s.date = %q{2009-11-16}
13
13
  s.description = %q{A Ruby library for accessing the Amazon Web Services EC2, ELB, RDS, Cloudwatch, and Autoscaling API's.}
14
14
  s.email = %q{glenn@rempe.us}
15
15
  s.executables = ["ec2-gem-example.rb", "ec2-gem-profile.rb", "ec2sh", "setup.rb"]
@@ -42,8 +42,8 @@ module AWS
42
42
  # @option options [String] :launch_configuration_name (nil) the name of the launch_configuration group
43
43
  # @option options [String] :min_size (nil) minimum size of the group
44
44
  # @option options [String] :max_size (nil) the maximum size of the group
45
- # @option options [String] :load_balancer_names (nil) the names of the load balancers
46
- # @option options [String] :cooldown (nil) the amount of time after a scaling activity complese before any further trigger-related scaling activities can start
45
+ # @option options [optional,Array] :load_balancer_names (nil) the names of the load balancers
46
+ # @option options [optional,String] :cooldown (nil) the amount of time after a scaling activity complese before any further trigger-related scaling activities can start
47
47
  def create_autoscaling_group( options = {} )
48
48
  raise ArgumentError, "No :autoscaling_group_name provided" if options[:autoscaling_group_name].nil? || options[:autoscaling_group_name].empty?
49
49
  raise ArgumentError, "No :availability_zones provided" if options[:availability_zones].nil? || options[:availability_zones].empty?
@@ -58,7 +58,7 @@ module AWS
58
58
  params['AutoScalingGroupName'] = options[:autoscaling_group_name]
59
59
  params['MinSize'] = options[:min_size].to_s
60
60
  params['MaxSize'] = options[:max_size].to_s
61
- params['LoadBalancerNames'] = options[:load_balancer_names] if options[:load_balancer_names]
61
+ params.merge!(pathlist("LoadBalancerNames.member", [options[:load_balancer_names]].flatten)) if options.has_key?(:load_balancer_names)
62
62
  params['CoolDown'] = options[:cooldown] if options[:cooldown]
63
63
 
64
64
  return response_generator(:action => "CreateAutoScalingGroup", :params => params)
@@ -78,11 +78,12 @@ context "autoscaling " do
78
78
  @as.stubs(:make_request).with("CreateAutoScalingGroup", {
79
79
  'AutoScalingGroupName' => 'CloudteamTestAutoscalingGroup1',
80
80
  'AvailabilityZones.member.1' => 'us-east-1a',
81
- 'LoadBalancerNames' => 'TestLoadBalancerName',
81
+ 'LoadBalancerNames.member.1' => 'TestLoadBalancerName',
82
+ 'LoadBalancerNames.member.2' => 'TestLoadBalancerName2',
82
83
  'LaunchConfigurationName' => 'CloudteamTestAutoscaling',
83
84
  'MinSize' => "1", 'MaxSize' => "3"
84
85
  }).returns stub(:body => @create_autoscaling_group_response, :is_a? => true)
85
- response = @as.create_autoscaling_group(:autoscaling_group_name => "CloudteamTestAutoscalingGroup1", :availability_zones => "us-east-1a", :load_balancer_names => "TestLoadBalancerName", :launch_configuration_name => "CloudteamTestAutoscaling", :min_size => 1, :max_size => 3)
86
+ response = @as.create_autoscaling_group(:autoscaling_group_name => "CloudteamTestAutoscalingGroup1", :availability_zones => "us-east-1a", :load_balancer_names => ["TestLoadBalancerName", "TestLoadBalancerName2"], :launch_configuration_name => "CloudteamTestAutoscaling", :min_size => 1, :max_size => 3)
86
87
  response.should.be.an.instance_of Hash
87
88
  end
88
89
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amazon-ec2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Glenn Rempe
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-14 00:00:00 -08:00
12
+ date: 2009-11-16 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency