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

Merge branch 'master' of git://github.com/fog/fog

This commit is contained in:
Weston Platter 2013-01-03 23:56:50 -06:00
commit 9a66cec2bc
2 changed files with 18 additions and 1 deletions

View file

@ -193,7 +193,10 @@ module Fog
:bucket => {},
:object => {}
},
:buckets => {}
:buckets => {},
:cors => {
:bucket => {}
}
}
end
end

View file

@ -241,6 +241,20 @@ Shindo.tests('Fog::Storage[:aws] | bucket requests', ["aws"]) do
end
end
tests("put_bucket_cors('#{@aws_bucket_name}', cors)").succeeds do
cors = {'CORSConfiguration' =>
[
{
'AllowedOrigin' => 'http://localhost:3000',
'AllowedMethod' => ['POST', 'GET'],
'AllowedHeader' => '*',
'MaxAgeSeconds' => 3000
}
]
}
Fog::Storage[:aws].put_bucket_cors(@aws_bucket_name, cors)
end
tests("#delete_bucket('#{@aws_bucket_name}')").succeeds do
Fog::Storage[:aws].delete_bucket(@aws_bucket_name)
end