Skip to content

Commit

Permalink
[google|storage] also update mocks to omit storageclass
Browse files Browse the repository at this point in the history
  • Loading branch information
geemus committed Sep 15, 2012
1 parent c1a1ec6 commit 78e36ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/fog/google/requests/storage/get_bucket.rb
Expand Up @@ -36,7 +36,6 @@ class Real
# * 'DisplayName'<~String> - Display name of object owner
# * 'ID'<~String> - Id of object owner
# * 'Size'<~Integer> - Size of object
# * 'StorageClass'<~String> - Storage class of object
#
def get_bucket(bucket_name, options = {})
unless bucket_name
Expand Down Expand Up @@ -69,7 +68,7 @@ def get_bucket(bucket_name, options = {})
(options['prefix'] && object['Key'][0...options['prefix'].length] != options['prefix']) ||
(options['marker'] && object['Key'] <= options['marker'])
end.map do |object|
data = object.reject {|key, value| !['ETag', 'Key', 'StorageClass'].include?(key)}
data = object.reject {|key, value| !['ETag', 'Key'].include?(key)}
data.merge!({
'LastModified' => Time.parse(object['Last-Modified']),
'Owner' => bucket['Owner'],
Expand Down
3 changes: 1 addition & 2 deletions lib/fog/google/requests/storage/put_object.rb
Expand Up @@ -63,8 +63,7 @@ def put_object(bucket_name, object_name, data, options = {})
'ETag' => Fog::Google::Mock.etag,
'Key' => object_name,
'Last-Modified' => Fog::Time.now.to_date_header,
'Content-Length' => options['Content-Length'] || data[:headers]['Content-Length'],
'StorageClass' => 'STANDARD'
'Content-Length' => options['Content-Length'] || data[:headers]['Content-Length']
}

for key, value in options
Expand Down

0 comments on commit 78e36ba

Please sign in to comment.