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

[google] Instances are created without description, and disk size is ignored

Handle hash merge! properly
This commit is contained in:
Carlos Sanchez 2013-12-05 14:51:12 +01:00
parent 1251e89e61
commit 9c15240edd
6 changed files with 6 additions and 6 deletions

View file

@ -121,7 +121,7 @@ module Fog
options['Content-MD5'] = content_md5 if content_md5 options['Content-MD5'] = content_md5 if content_md5
options['Content-Type'] = content_type if content_type options['Content-Type'] = content_type if content_type
options['Expires'] = expires if expires options['Expires'] = expires if expires
options.merge(metadata) options.merge!(metadata)
data = service.put_object(directory.key, key, body, options) data = service.put_object(directory.key, key, body, options)
merge_attributes(data.headers.reject {|key, value| ['Content-Length', 'Content-Type'].include?(key)}) merge_attributes(data.headers.reject {|key, value| ['Content-Length', 'Content-Type'].include?(key)})

View file

@ -93,7 +93,7 @@ module Fog
def new(attributes = {}) def new(attributes = {})
requires :directory requires :directory
super({ :directory => directory }.merge!(attributes)) super({ :directory => directory }.merge(attributes))
end end
end end

View file

@ -78,7 +78,7 @@ module Fog
end end
# Merge in any remaining options (only 'description' should remain) # Merge in any remaining options (only 'description' should remain)
body_object.merge(opts) body_object.merge!(opts)
result = self.build_result(api_method, parameters, result = self.build_result(api_method, parameters,
body_object) body_object)

View file

@ -30,7 +30,7 @@ module Fog
} }
# Merge in the remaining params (only 'description' should remain) # Merge in the remaining params (only 'description' should remain)
body_object.merge(options) body_object.merge!(options)
result = self.build_result(api_method, result = self.build_result(api_method,
parameters, parameters,

View file

@ -174,7 +174,7 @@ module Fog
if options['kernel'] if options['kernel']
body_object['kernel'] = @api_url + "google/global/kernels/#{options.delete 'kernel'}" body_object['kernel'] = @api_url + "google/global/kernels/#{options.delete 'kernel'}"
end end
body_object.merge! options # Adds in all remaining options that weren't explicitly handled. body_object.merge!(options) # Adds in all remaining options that weren't explicitly handled.
result = self.build_result(api_method, parameters, result = self.build_result(api_method, parameters,
body_object=body_object) body_object=body_object)

View file

@ -26,7 +26,7 @@ module Fog
# * 'LastModified'<~Time> - date object was last modified # * 'LastModified'<~Time> - date object was last modified
# #
def copy_object(source_bucket_name, source_object_name, target_bucket_name, target_object_name, options = {}) def copy_object(source_bucket_name, source_object_name, target_bucket_name, target_object_name, options = {})
headers = { 'x-goog-copy-source' => "/#{source_bucket_name}/#{source_object_name}" }.merge!(options) headers = { 'x-goog-copy-source' => "/#{source_bucket_name}/#{source_object_name}" }.merge(options)
request({ request({
:expects => 200, :expects => 200,
:headers => headers, :headers => headers,