diff --git a/lib/fog/aws/storage.rb b/lib/fog/aws/storage.rb index 483265241..46d7ecaa8 100644 --- a/lib/fog/aws/storage.rb +++ b/lib/fog/aws/storage.rb @@ -192,24 +192,10 @@ module Fog @aws_secret_access_key = options[:aws_secret_access_key] options[:region] ||= 'us-east-1' @host = options[:host] || case options[:region] - when 'ap-northeast-1' - 's3-ap-northeast-1.amazonaws.com' - when 'ap-southeast-1' - 's3-ap-southeast-1.amazonaws.com' - when 'eu-west-1' - 's3-eu-west-1.amazonaws.com' when 'us-east-1' 's3.amazonaws.com' - when 'sa-east-1' - 's3-sa-east-1.amazonaws.com' - when 'us-west-1' - 's3-us-west-1.amazonaws.com' - when 'us-west-2' - 's3-us-west-2.amazonaws.com' - when 'sa-east-1' - 's3-sa-east-1.amazonaws.com' else - raise ArgumentError, "Unknown region: #{options[:region].inspect}" + "s3-#{options[:region]}.amazonaws.com" end @region = options[:region] end @@ -270,22 +256,10 @@ module Fog else options[:region] ||= 'us-east-1' @host = options[:host] || case options[:region] - when 'ap-northeast-1' - 's3-ap-northeast-1.amazonaws.com' - when 'ap-southeast-1' - 's3-ap-southeast-1.amazonaws.com' - when 'eu-west-1' - 's3-eu-west-1.amazonaws.com' when 'us-east-1' 's3.amazonaws.com' - when 'sa-east-1' - 's3-sa-east-1.amazonaws.com' - when 'us-west-1' - 's3-us-west-1.amazonaws.com' - when 'us-west-2' - 's3-us-west-2.amazonaws.com' else - raise ArgumentError, "Unknown region: #{options[:region].inspect}" + "s3-#{options[:region]}.amazonaws.com" end @path = options[:path] || '/' @persistent = options[:persistent] || true