From a6921ccc91aed082f7d330d36b10fc855df8c422 Mon Sep 17 00:00:00 2001 From: Pavel Repin Date: Thu, 2 Feb 2012 15:23:55 -0800 Subject: [PATCH] Nix hardcoded regions: SimpleDB. --- lib/fog/aws/simpledb.rb | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/lib/fog/aws/simpledb.rb b/lib/fog/aws/simpledb.rb index aae522301..c665daf05 100644 --- a/lib/fog/aws/simpledb.rb +++ b/lib/fog/aws/simpledb.rb @@ -76,24 +76,7 @@ module Fog @nil_string = options[:nil_string]|| 'nil' options[:region] ||= 'us-east-1' - @host = options[:host] || case options[:region] - when 'ap-northeast-1' - 'sdb.ap-northeast-1.amazonaws.com' - when 'ap-southeast-1' - 'sdb.ap-southeast-1.amazonaws.com' - when 'eu-west-1' - 'sdb.eu-west-1.amazonaws.com' - when 'us-east-1' - 'sdb.amazonaws.com' - when 'us-west-1' - 'sdb.us-west-1.amazonaws.com' - when 'us-west-2' - 'sdb.us-west-2.amazonaws.com' - when 'sa-east-1' - 'sdb.sa-east-1.amazonaws.com' - else - raise ArgumentError, "Unknown region: #{options[:region].inspect}" - end + @host = options[:host] || "sdb.#{options[:region]}.amazonaws.com" @path = options[:path] || '/' @persistent = options[:persistent] || false @port = options[:port] || 443