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

Merge branch 'master' of github.com:geemus/fog

This commit is contained in:
geemus 2010-09-01 11:14:57 -07:00
commit 9dbf738b0d
3 changed files with 8 additions and 3 deletions

View file

@ -152,6 +152,7 @@
@aws_access_key_id = options[:aws_access_key_id]
@aws_secret_access_key = options[:aws_secret_access_key]
@hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
options[:region] ||= 'us-east-1'
@host = options[:host] || case options[:region]
when 'ap-southeast-1'
'ec2.ap-southeast-1.amazonaws.com'
@ -162,7 +163,7 @@
when 'us-west-1'
'ec2.us-west-1.amazonaws.com'
else
'ec2.amazonaws.com'
raise ArgumentError, "Unknown region: #{options[:region].inspect}"
end
@port = options[:port] || 443
@scheme = options[:scheme] || 'https'

View file

@ -49,6 +49,7 @@ module Fog
@aws_access_key_id = options[:aws_access_key_id]
@aws_secret_access_key = options[:aws_secret_access_key]
@hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
options[:region] ||= 'us-east-1'
@host = options[:host] || case options[:region]
when 'ap-southeast-1'
'elasticloadbalancing.ap-southeast-1.amazonaws.com'
@ -59,7 +60,7 @@ module Fog
when 'us-west-1'
'elasticloadbalancing.us-west-1.amazonaws.com'
else
'elasticloadbalancing.amazonaws.com'
raise ArgumentError, "Unknown region: #{options[:region].inspect}"
end
@port = options[:port] || 443
@scheme = options[:scheme] || 'https'

View file

@ -125,13 +125,16 @@ module Fog
@aws_access_key_id = options[:aws_access_key_id]
@aws_secret_access_key = options[:aws_secret_access_key]
@hmac = Fog::HMAC.new('sha1', @aws_secret_access_key)
options[:region] ||= 'us-east-1'
@host = options[:host] || case options[:region]
when 'us-east-1'
's3.amazonaws.com'
when 'ap-southeast-1'
's3-ap-southeast-1.amazonaws.com'
when 'us-west-1'
's3-us-west-1.amazonaws.com'
else
's3.amazonaws.com'
raise ArgumentError, "Unknown region: #{options[:region].inspect}"
end
@port = options[:port] || 443
@scheme = options[:scheme] || 'https'