From 4603621dce51a4ba0244ead652f5c71321341ffd Mon Sep 17 00:00:00 2001 From: Pavel Repin Date: Thu, 2 Feb 2012 12:45:32 -0800 Subject: [PATCH] Nix hardcoded regions: CloudFormation. --- lib/fog/aws/cloud_formation.rb | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/lib/fog/aws/cloud_formation.rb b/lib/fog/aws/cloud_formation.rb index 626dc8e96..75c5ff6c7 100644 --- a/lib/fog/aws/cloud_formation.rb +++ b/lib/fog/aws/cloud_formation.rb @@ -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