docker-cake 0.2.1 → 0.2.2

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: c0707eac90930276b49e0effabcfd719c8509e35
4
- data.tar.gz: e6d83a1b64e838fb648e17914ea7c2db21f47f08
3
+ metadata.gz: ed02d96d8158acec48b8dd9ba905ae21a9222337
4
+ data.tar.gz: 5bf98209181be4cbb5e0a8e65798df7754dad952
5
5
  SHA512:
6
- metadata.gz: 5aaf4f97148e536e46e4e114acea0d1eabdf38482435c961759308d3954b769f90e82c1f3c404b7f1375f7164c713c09d299c76dbc22dd1a7e5a7468198aa786
7
- data.tar.gz: 6a20c94fa067bfb0c8072ca5db9facfeeac6b43a4cb6edecaef32cfe2740635509bd318208a508bb7a4e89403554fcad3d734cd87f48bb6cbbbd45b3b18b7a0a
6
+ metadata.gz: e0c49ffe61ad9c36b00674655f5a5971415ddf988fafc54db55ddcfd267f68264f53f44312cf02c9a80fbfa388f299bc329e0551866904166a5a71147d8ee6e5
7
+ data.tar.gz: d6d3d1a5a72446b3e7b3b65301a9a92af7d735af6aed3e80b444737f82e60056e19e78a004e81fcec50d712fe35d1cb2b54baa337138c0134d78870002fd1577
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.1"
5
+ gem.version = "0.2.2"
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
@@ -58,11 +58,13 @@ class DockerCake
58
58
  images_map[map_key] ||= tag
59
59
 
60
60
  manifests[tag].each do |layer|
61
+ next if layer['size'] == nil
62
+
61
63
  stats[:size] += layer['size'] || 0
62
64
  stats[:layers] += 1
63
65
  stats[:date] = layer['created'] if layer['created'] > stats[:date]
64
66
 
65
- layer_key = layer['blobSum'] + "_" + layer['id']
67
+ layer_key = layer['blobSum'] #+ "_" + layer['id']
66
68
 
67
69
  if counted_layers.include?(layer_key)
68
70
  stats[:reuse_img] += 1
@@ -72,7 +72,7 @@ class RegistryApiClient
72
72
  end
73
73
 
74
74
  DEFAULT_REGISTRY = "https://registry.hub.docker.com"
75
- DEFAULT_MANIFEST = "application/vnd.docker.distribution.manifest.v2+json"
75
+ DEFAULT_MANIFEST = "application/vnd.docker.distribution.manifest.v1+json"
76
76
  FAT_MANIFEST = "application/vnd.docker.distribution.manifest.list.v2+json"
77
77
 
78
78
  # @param [#to_s] base_uri Docker registry base URI
@@ -165,7 +165,7 @@ class RegistryApiClient
165
165
 
166
166
  resp = in_parallel(
167
167
  basic: lambda { manifest(repo, tag) },
168
- fat: lambda { manifest(repo, tag, manifest: FAT_MANIFEST) }
168
+ fat: lambda { manifest(repo, tag, manifest: DEFAULT_MANIFEST) }
169
169
  )
170
170
 
171
171
  unless resp[:basic]['layers']
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.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Evstigneev