lib/fog/aws.rb in fog-aws-1.0.0 vs lib/fog/aws.rb in fog-aws-1.1.0
- old
+ new
@@ -226,10 +226,10 @@
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', 'eu-west-1', '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-southeast-1', 'ap-southeast-2', 'eu-central-1', 'ca-central-1', 'eu-west-1', 'eu-west-2', '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']
end
def self.validate_region!(region, host=nil)
if (!host || host.end_with?('.amazonaws.com')) && !regions.include?(region)
raise ArgumentError, "Unknown region: #{region.inspect}"