fog 0.2.28 → 0.2.30

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fog (0.2.28)
4
+ fog (0.2.30)
5
5
  builder
6
6
  excon (>= 0.2.0)
7
7
  formatador (>= 0.0.15)
@@ -99,6 +99,7 @@ You should try out the (varying) support fog has for:
99
99
 
100
100
  Enjoy, and let me know what I can do to continue improving fog!
101
101
 
102
+ * See what already uses fog and add your own stuff to {the list}[http://wiki.github.com/geemus/fog/in-the-wild].
102
103
  * Work for {twitter}[http://twitter.com]? I'd love to reclaim the unused {@fog}[http://twitter.com/fog] account!
103
104
  * Follow {@geemus}[http://twitter.com/geemus] on Twitter.
104
105
  * See upcoming work in the {tracker}[http://www.pivotaltracker.com/projects/54635].
@@ -7,8 +7,8 @@ Gem::Specification.new do |s|
7
7
  ## If your rubyforge_project name is different, then edit it and comment out
8
8
  ## the sub! line in the Rakefile
9
9
  s.name = 'fog'
10
- s.version = '0.2.28'
11
- s.date = '2010-08-20'
10
+ s.version = '0.2.30'
11
+ s.date = '2010-09-01'
12
12
  s.rubyforge_project = 'fog'
13
13
 
14
14
  ## Make sure your summary is short. The description may be as long
data/lib/fog.rb CHANGED
@@ -41,7 +41,7 @@ require 'fog/vcloud'
41
41
  module Fog
42
42
 
43
43
  unless const_defined?(:VERSION)
44
- VERSION = '0.2.28'
44
+ VERSION = '0.2.30'
45
45
  end
46
46
 
47
47
  module Mock
@@ -152,6 +152,7 @@
152
152
  @aws_access_key_id = options[:aws_access_key_id]
153
153
  @aws_secret_access_key = options[:aws_secret_access_key]
154
154
  @hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
155
+ options[:region] ||= 'us-east-1'
155
156
  @host = options[:host] || case options[:region]
156
157
  when 'ap-southeast-1'
157
158
  'ec2.ap-southeast-1.amazonaws.com'
@@ -162,7 +163,7 @@
162
163
  when 'us-west-1'
163
164
  'ec2.us-west-1.amazonaws.com'
164
165
  else
165
- 'ec2.amazonaws.com'
166
+ raise ArgumentError, "Unknown region: #{options[:region].inspect}"
166
167
  end
167
168
  @port = options[:port] || 443
168
169
  @scheme = options[:scheme] || 'https'
@@ -49,6 +49,7 @@ module Fog
49
49
  @aws_access_key_id = options[:aws_access_key_id]
50
50
  @aws_secret_access_key = options[:aws_secret_access_key]
51
51
  @hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
52
+ options[:region] ||= 'us-east-1'
52
53
  @host = options[:host] || case options[:region]
53
54
  when 'ap-southeast-1'
54
55
  'elasticloadbalancing.ap-southeast-1.amazonaws.com'
@@ -59,7 +60,7 @@ module Fog
59
60
  when 'us-west-1'
60
61
  'elasticloadbalancing.us-west-1.amazonaws.com'
61
62
  else
62
- 'elasticloadbalancing.amazonaws.com'
63
+ raise ArgumentError, "Unknown region: #{options[:region].inspect}"
63
64
  end
64
65
  @port = options[:port] || 443
65
66
  @scheme = options[:scheme] || 'https'
@@ -33,9 +33,9 @@ module Fog
33
33
  listener_instance_port.push(listener['InstancePort'])
34
34
  end
35
35
 
36
- params.merge!(AWS.indexed_param('Listeners.member.%.Protocol', listener_protocol, 1))
37
- params.merge!(AWS.indexed_param('Listeners.member.%.LoadBalancerPort', listener_lb_port, 1))
38
- params.merge!(AWS.indexed_param('Listeners.member.%.InstancePort', listener_instance_port, 1))
36
+ params.merge!(AWS.indexed_param('Listeners.member.%d.Protocol', listener_protocol, 1))
37
+ params.merge!(AWS.indexed_param('Listeners.member.%d.LoadBalancerPort', listener_lb_port, 1))
38
+ params.merge!(AWS.indexed_param('Listeners.member.%d.InstancePort', listener_instance_port, 1))
39
39
 
40
40
  request({
41
41
  'Action' => 'CreateLoadBalancer',
@@ -20,7 +20,7 @@ module Fog
20
20
  # * 'Instances'<~Array> - array of hashes describing instances currently enabled
21
21
  # * 'InstanceId'<~String>
22
22
  def deregister_instances_from_load_balancer(instance_ids, lb_name)
23
- params = AWS.indexed_param('Instances.member.%.InstanceId', [*instance_ids], 1)
23
+ params = AWS.indexed_param('Instances.member.%d.InstanceId', [*instance_ids], 1)
24
24
  request({
25
25
  'Action' => 'DeregisterInstancesFromLoadBalancer',
26
26
  'LoadBalancerName' => lb_name,
@@ -23,7 +23,7 @@ module Fog
23
23
  # * 'InstanceId'<~String>
24
24
  # * 'ReasonCode'<~String>
25
25
  def describe_instance_health(lb_name, instance_ids = [])
26
- params = AWS.indexed_param('Instances.member.%.InstanceId', [*instance_ids], 1)
26
+ params = AWS.indexed_param('Instances.member.%d.InstanceId', [*instance_ids], 1)
27
27
  request({
28
28
  'Action' => 'DescribeInstanceHealth',
29
29
  'LoadBalancerName' => lb_name,
@@ -20,7 +20,7 @@ module Fog
20
20
  # * 'Instances'<~Array> - array of hashes describing instances currently enabled
21
21
  # * 'InstanceId'<~String>
22
22
  def register_instances_with_load_balancer(instance_ids, lb_name)
23
- params = AWS.indexed_param('Instances.member.%.InstanceId', [*instance_ids], 1)
23
+ params = AWS.indexed_param('Instances.member.%d.InstanceId', [*instance_ids], 1)
24
24
  request({
25
25
  'Action' => 'RegisterInstancesWithLoadBalancer',
26
26
  'LoadBalancerName' => lb_name,
@@ -125,13 +125,16 @@ module Fog
125
125
  @aws_access_key_id = options[:aws_access_key_id]
126
126
  @aws_secret_access_key = options[:aws_secret_access_key]
127
127
  @hmac = Fog::HMAC.new('sha1', @aws_secret_access_key)
128
+ options[:region] ||= 'us-east-1'
128
129
  @host = options[:host] || case options[:region]
130
+ when 'us-east-1'
131
+ 's3.amazonaws.com'
129
132
  when 'ap-southeast-1'
130
133
  's3-ap-southeast-1.amazonaws.com'
131
134
  when 'us-west-1'
132
135
  's3-us-west-1.amazonaws.com'
133
136
  else
134
- 's3.amazonaws.com'
137
+ raise ArgumentError, "Unknown region: #{options[:region].inspect}"
135
138
  end
136
139
  @port = options[:port] || 443
137
140
  @scheme = options[:scheme] || 'https'
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 28
9
- version: 0.2.28
8
+ - 30
9
+ version: 0.2.30
10
10
  platform: ruby
11
11
  authors:
12
12
  - geemus (Wesley Beary)
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-08-20 00:00:00 -07:00
17
+ date: 2010-09-01 00:00:00 -07:00
18
18
  default_executable: fog
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency