docker_registry2 1.16.0 → 1.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/docker_registry2.rb +4 -0
- data/lib/registry/registry.rb +9 -1
- data/lib/registry/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 396635930a86cd9f517fe62ec5d697162800ceed5da3209b56c9951529c48acd
|
4
|
+
data.tar.gz: aa924fcb85dedc352020b686ecae75d2b755ee1d4d87ab4cc7f27991a0a3e84b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2dfbaa1a8e21b917363855a5f31c57dbd08517d0f58fc1faf43520d6e321074d4b6083246ee3863a4e6a886d5f5dc9ba239eeef7deda747536db69a77f08a480
|
7
|
+
data.tar.gz: 6b034ef24e2f306d8a4a5047e03a101307c55698e0ce3295eefc15481abbc64034b07bc61b5c0651aad41bd03f2a6920f0cf98b81c733c845353d1e784db8aad
|
data/lib/docker_registry2.rb
CHANGED
data/lib/registry/registry.rb
CHANGED
@@ -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)
|
@@ -252,7 +260,7 @@ module DockerRegistry2
|
|
252
260
|
links = parse_link_header(header)
|
253
261
|
if links[:next]
|
254
262
|
query = URI(links[:next]).query
|
255
|
-
link_key = @uri.host.eql?('quay.io') ? 'next_page' : 'last'
|
263
|
+
link_key = @uri.host.eql?('quay.io') || @uri.host.eql?('registry.access.redhat.com') ? 'next_page' : 'last'
|
256
264
|
last = URI.decode_www_form(query).to_h[link_key]
|
257
265
|
|
258
266
|
end
|
data/lib/registry/version.rb
CHANGED
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.
|
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-
|
14
|
+
date: 2023-07-28 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|