docker_registry2 1.17.0 → 1.18.0

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
  SHA256:
3
- metadata.gz: 6f7daed06a8c800b4df3412aee52d8204af23092206f073b7688f01ec6ef1011
4
- data.tar.gz: a7ddaecc362241ea127ea67146ec75dd94eec6affcef9fa9f527b73048dd08f7
3
+ metadata.gz: 396635930a86cd9f517fe62ec5d697162800ceed5da3209b56c9951529c48acd
4
+ data.tar.gz: aa924fcb85dedc352020b686ecae75d2b755ee1d4d87ab4cc7f27991a0a3e84b
5
5
  SHA512:
6
- metadata.gz: 7449e24efd8d8a56dfacb59b3945c3f083b75f91505bd67f4fefb60b3cc3078df2c3289f86fdd14cf2b9f34ba52b34363e6fccb7088e9813adc80341c525a915
7
- data.tar.gz: a7ad67b22dce29604879d7de2d8955e7698dd5292c972a9ae06cf2e78f5aa1396c12a105cd05153dc905f5b7ecf4b30555c0d67a7e2ee8d13d1005aa4534a438
6
+ metadata.gz: 2dfbaa1a8e21b917363855a5f31c57dbd08517d0f58fc1faf43520d6e321074d4b6083246ee3863a4e6a886d5f5dc9ba239eeef7deda747536db69a77f08a480
7
+ data.tar.gz: 6b034ef24e2f306d8a4a5047e03a101307c55698e0ce3295eefc15481abbc64034b07bc61b5c0651aad41bd03f2a6920f0cf98b81c733c845353d1e784db8aad
@@ -22,4 +22,8 @@ module DockerRegistry2
22
22
  def self.manifest(repository, tag)
23
23
  @reg.manifest(repository, tag)
24
24
  end
25
+
26
+ def self.manifest_digest(repository, tag)
27
+ @reg.manifest_digest(repository, tag)
28
+ end
25
29
  end
@@ -126,6 +126,14 @@ module DockerRegistry2
126
126
  end
127
127
  end
128
128
 
129
+ def manifest_digest(repo, tag)
130
+ tag_path = "/v2/#{repo}/manifests/#{tag}"
131
+ dohead(tag_path).headers[:docker_content_digest]
132
+ rescue DockerRegistry2::InvalidMethod
133
+ # Pre-2.3.0 registries didn't support manifest HEAD requests
134
+ doget(tag_path).headers[:docker_content_digest]
135
+ end
136
+
129
137
  def digest(image, tag, architecture = nil, os = nil, variant = nil)
130
138
  manifest = manifest(image, tag)
131
139
  parsed_manifest = JSON.parse(manifest.body)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DockerRegistry2
4
- VERSION = '1.17.0'
4
+ VERSION = '1.18.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docker_registry2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.0
4
+ version: 1.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Avi Deitcher https://github.com/deitch
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2023-07-18 00:00:00.000000000 Z
14
+ date: 2023-07-28 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler