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

Merge pull request #1388 from rubiojr/ruby-187-compat-fix

[openstack|image] Fixes #1383
This commit is contained in:
Wesley Beary 2012-12-18 08:28:04 -08:00
commit 1450a637f0

View file

@ -16,11 +16,13 @@ module Fog
'x-image-meta-checksum' => attributes[:checksum],
'x-image-meta-owner' => attributes[:owner],
'x-glance-api-copy-from' => attributes[:copy_from]
}
}.reject { |k,v| v.nil? }
body = String.new
if attributes[:location]
body = File.open(attributes[:location], "rb")
# Make sure the image file size is always present
data['x-image-meta-size'] = File.size(body)
end
unless attributes[:properties].nil?