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

Nix hardcoded regions: CloudFormation.

This commit is contained in:
Pavel Repin 2012-02-02 12:45:32 -08:00
parent d717e8af69
commit 4603621dce

View file

@ -54,24 +54,7 @@ module Fog
@connection_options = options[:connection_options] || {}
options[:region] ||= 'us-east-1'
@host = options[:host] || case options[:region]
when 'ap-northeast-1'
'cloudformation.ap-northeast-1.amazonaws.com'
when 'ap-southeast-1'
'cloudformation.ap-southeast-1.amazonaws.com'
when 'eu-west-1'
'cloudformation.eu-west-1.amazonaws.com'
when 'us-east-1'
'cloudformation.us-east-1.amazonaws.com'
when 'us-west-1'
'cloudformation.us-west-1.amazonaws.com'
when 'us-west-2'
'cloudformation.us-west-2.amazonaws.com'
when 'sa-east-1'
'cloudformation.sa-east-1.amazonaws.com'
else
raise ArgumentError, "Unknown region: #{options[:region].inspect}"
end
@host = options[:host] || "cloudformation.#{options[:region]}.amazonaws.com"
@path = options[:path] || '/'
@persistent = options[:persistent] || false
@port = options[:port] || 443