fog 0.2.28 → 0.2.30
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/Gemfile.lock +1 -1
- data/README.rdoc +1 -0
- data/fog.gemspec +2 -2
- data/lib/fog.rb +1 -1
- data/lib/fog/aws/ec2.rb +2 -1
- data/lib/fog/aws/elb.rb +2 -1
- data/lib/fog/aws/requests/elb/create_load_balancer.rb +3 -3
- data/lib/fog/aws/requests/elb/deregister_instances_from_load_balancer.rb +1 -1
- data/lib/fog/aws/requests/elb/describe_instance_health.rb +1 -1
- data/lib/fog/aws/requests/elb/register_instances_with_load_balancer.rb +1 -1
- data/lib/fog/aws/s3.rb +4 -1
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/README.rdoc
CHANGED
@@ -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].
|
data/fog.gemspec
CHANGED
@@ -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.
|
11
|
-
s.date = '2010-
|
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
data/lib/fog/aws/ec2.rb
CHANGED
@@ -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
|
-
|
166
|
+
raise ArgumentError, "Unknown region: #{options[:region].inspect}"
|
166
167
|
end
|
167
168
|
@port = options[:port] || 443
|
168
169
|
@scheme = options[:scheme] || 'https'
|
data/lib/fog/aws/elb.rb
CHANGED
@@ -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
|
-
|
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
|
37
|
-
params.merge!(AWS.indexed_param('Listeners.member
|
38
|
-
params.merge!(AWS.indexed_param('Listeners.member
|
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
|
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
|
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
|
23
|
+
params = AWS.indexed_param('Instances.member.%d.InstanceId', [*instance_ids], 1)
|
24
24
|
request({
|
25
25
|
'Action' => 'RegisterInstancesWithLoadBalancer',
|
26
26
|
'LoadBalancerName' => lb_name,
|
data/lib/fog/aws/s3.rb
CHANGED
@@ -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
|
-
|
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
|
-
-
|
9
|
-
version: 0.2.
|
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-
|
17
|
+
date: 2010-09-01 00:00:00 -07:00
|
18
18
|
default_executable: fog
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|