lib/fog/aws.rb in fog-aws-3.0.0 vs lib/fog/aws.rb in fog-aws-3.1.0
- old
+ new
@@ -227,10 +227,23 @@
return false unless response && response.headers
response.get_header('Content-Type') =~ %r{application/.*json.*}i ? true : false
end
def self.regions
- @regions ||= ['ap-northeast-1', 'ap-northeast-2', 'ap-southeast-1', 'ap-southeast-2', 'eu-central-1', 'ca-central-1', 'eu-west-1', 'eu-west-2', 'eu-west-3', 'us-east-1', 'us-east-2', 'us-west-1', 'us-west-2', 'sa-east-1', 'cn-north-1', 'us-gov-west-1', 'ap-south-1']
+ @regions ||= [
+ 'ap-northeast-1', 'ap-northeast-2', 'ap-northeast-3',
+ 'ap-south-1',
+ 'ap-southeast-1', 'ap-southeast-2',
+ 'ca-central-1',
+ 'cn-north-1',
+ 'cn-northwest-1',
+ 'eu-central-1',
+ 'eu-west-1', 'eu-west-2', 'eu-west-3',
+ 'us-east-1', 'us-east-2',
+ 'us-west-1', 'us-west-2',
+ 'sa-east-1',
+ 'us-gov-west-1'
+ ]
end
def self.validate_region!(region, host=nil)
if (!host || host.end_with?('.amazonaws.com')) && !regions.include?(region)
raise ArgumentError, "Unknown region: #{region.inspect}"