mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Nix hardcoded regions: SNS.
This commit is contained in:
parent
a6921ccc91
commit
968b757949
1 changed files with 1 additions and 16 deletions
|
@ -56,22 +56,7 @@ module Fog
|
|||
@hmac = Fog::HMAC.new('sha256', @aws_secret_access_key)
|
||||
|
||||
options[:region] ||= 'us-east-1'
|
||||
@host = options[:host] || case options[:region]
|
||||
when 'ap-southeast-1'
|
||||
'sns.ap-southeast-1.amazonaws.com'
|
||||
when 'eu-west-1'
|
||||
'sns.eu-west-1.amazonaws.com'
|
||||
when 'us-east-1'
|
||||
'sns.us-east-1.amazonaws.com'
|
||||
when 'us-west-1'
|
||||
'sns.us-west-1.amazonaws.com'
|
||||
when 'us-west-2'
|
||||
'sns.us-west-2.amazonaws.com'
|
||||
when 'sa-east-1'
|
||||
'sns.sa-east-1.amazonaws.com'
|
||||
else
|
||||
raise ArgumentError, "Unknown region: #{options[:region].inspect}"
|
||||
end
|
||||
@host = options[:host] || "sns.#{options[:region]}.amazonaws.com"
|
||||
|
||||
@path = options[:path] || '/'
|
||||
@persistent = options[:persistent] || false
|
||||
|
|
Loading…
Reference in a new issue