ovfparse 0.8.5 → 0.8.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/ovfparse/vmpackage.rb +4 -0
  2. metadata +4 -4
@@ -238,6 +238,10 @@ class VmPackage
238
238
  units = node['capacityAllocationUnits']
239
239
  if(units == "byte * 2^30")
240
240
  capacity = (capacity.to_i * 1073741824).to_s
241
+ elsif(units == "byte * 2^20")
242
+ capacity = (capacity.to_i * 1048576).to_s
243
+ elsif(units == "byte * 2^10")
244
+ capacity = (capacity.to_i * 1024).to_s
241
245
  end
242
246
  thin_size = node['populatedSize']
243
247
  disks.push({ 'name' => node['diskId'], 'location' => filenames[node['fileRef']], 'size' => capacity, 'thin_size' => (thin_size || "-1") })
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ovfparse
3
3
  version: !ruby/object:Gem::Version
4
- hash: 53
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 8
9
- - 5
10
- version: 0.8.5
9
+ - 16
10
+ version: 0.8.16
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jim Barkley
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-08-05 00:00:00 -04:00
18
+ date: 2011-08-16 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency