docker-cake 0.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb308277d72c9e12243d29048577958bcb3143fb
4
- data.tar.gz: 0bebde5d78dddf58e42f16a86266b05fecf0f030
3
+ metadata.gz: c0707eac90930276b49e0effabcfd719c8509e35
4
+ data.tar.gz: e6d83a1b64e838fb648e17914ea7c2db21f47f08
5
5
  SHA512:
6
- metadata.gz: 46f7c1023778cbb0d8aa626d6df4676f700d5b66ff55c0065f4f0fc2158f1efc4b3dd1410e9cb2bbd4c581e1dab80f9b1c7e72ba7c4fe0ee7f04564bcba61268
7
- data.tar.gz: bc7334825b0e6c7c4a59ef374af115bfc76f80bc34d4bdc52fceebfba26202ec06a3e6b4525b7c8a64aebd2d19a1357a17d09408c011264608eb070968e6adac
6
+ metadata.gz: 5aaf4f97148e536e46e4e114acea0d1eabdf38482435c961759308d3954b769f90e82c1f3c404b7f1375f7164c713c09d299c76dbc22dd1a7e5a7468198aa786
7
+ data.tar.gz: 6a20c94fa067bfb0c8072ca5db9facfeeac6b43a4cb6edecaef32cfe2740635509bd318208a508bb7a4e89403554fcad3d734cd87f48bb6cbbbd45b3b18b7a0a
data/docker-cake.gemspec CHANGED
@@ -2,7 +2,7 @@ Gem::Specification.new do |gem|
2
2
  gem.specification_version = 3
3
3
 
4
4
  gem.name = 'docker-cake'
5
- gem.version = "0.2"
5
+ gem.version = "0.2.1"
6
6
  gem.authors = ["Pavel Evstigneev"]
7
7
  gem.email = ["pavel.evst@gmail.com"]
8
8
  gem.license = 'MIT'
data/lib/docker_cake.rb CHANGED
@@ -61,14 +61,17 @@ class DockerCake
61
61
  stats[:size] += layer['size'] || 0
62
62
  stats[:layers] += 1
63
63
  stats[:date] = layer['created'] if layer['created'] > stats[:date]
64
- if counted_layers.include?(layer['blobSum'])
64
+
65
+ layer_key = layer['blobSum'] + "_" + layer['id']
66
+
67
+ if counted_layers.include?(layer_key)
65
68
  stats[:reuse_img] += 1
66
69
  else
67
70
  stats[:add_img] += 1
68
71
  stats[:add_size] += layer['size'] || 0
69
72
  end
70
73
 
71
- counted_layers << layer['blobSum']
74
+ counted_layers << layer_key
72
75
  end
73
76
 
74
77
  #puts "#{tag} -> #{stats}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docker-cake
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Evstigneev