1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00

When not specified, region for a bucket should be DEFAULT_REGION.

This commit is contained in:
James Muscat 2015-12-31 15:29:07 +00:00
parent 748f3d22b2
commit 90b5b5e3bf
2 changed files with 5 additions and 1 deletions

View file

@ -31,7 +31,7 @@ module Fog
end
def location
@location ||= (bucket_location || self.service.region)
@location ||= (bucket_location || AWS::DEFAULT_REGION)
end
# NOTE: you can't change the region once the bucket is created

View file

@ -9,6 +9,10 @@ Shindo.tests("Storage[:aws] | directory", ["aws"]) do
@instance.public_url
end
tests('#location').returns('us-east-1') do # == Fog::AWS::Storage::DEFAULT_REGION
@instance.location
end
@instance.acl = 'public-read'
@instance.save