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

[aws|storage] add CommonPrefixes to mock get_bucket

This commit is contained in:
geemus 2010-12-04 15:46:19 -08:00
parent f53136c0cd
commit 085ae9d6f5

View file

@ -86,12 +86,13 @@ module Fog
response.status = 200 response.status = 200
response.body = { response.body = {
'Contents' => truncated_contents, 'CommonPrefixes' => [],
'IsTruncated' => truncated_contents.size != contents.size, 'Contents' => truncated_contents,
'Marker' => options['marker'], 'IsTruncated' => truncated_contents.size != contents.size,
'MaxKeys' => max_keys, 'Marker' => options['marker'],
'Name' => bucket['Name'], 'MaxKeys' => max_keys,
'Prefix' => options['prefix'] 'Name' => bucket['Name'],
'Prefix' => options['prefix']
} }
if options['max-keys'] && options['max-keys'] < response.body['Contents'].length if options['max-keys'] && options['max-keys'] < response.body['Contents'].length
response.body['IsTruncated'] = true response.body['IsTruncated'] = true