docker_registry2 1.10.1 → 1.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/registry/registry.rb +6 -4
- 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: 7c94a748970c4e621a4bb1b856ea14915fbc83b55cff85743e7ef4333afb2360
|
4
|
+
data.tar.gz: 340ce8d170519eb1a958a3c4d08314658d214ad0bd3e8c57d30d931086d885b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4b64a53ae13758dadce8fd95708fbabd76cc604a740194584ba472022a2fd71c01c7526c1d577fa7aa253a8c72df069dce5b8242e48402dc2518f1d9e117633
|
7
|
+
data.tar.gz: e3416ec4b0d38da96d5f7053b791f5d1b795b00a10a91d30c7aef30d454956728b94751cbb3d3eeeb9ac2a980404c1a5abbfdb0f327044e500891db20bc9c169
|
data/lib/registry/registry.rb
CHANGED
@@ -109,13 +109,13 @@ class DockerRegistry2::Registry
|
|
109
109
|
|
110
110
|
def blob(repo, digest, outpath=nil)
|
111
111
|
blob_url = "/v2/#{repo}/blobs/#{digest}"
|
112
|
-
if outpath.nil?
|
112
|
+
if outpath.nil?
|
113
113
|
response = doget(blob_url)
|
114
114
|
DockerRegistry2::Blob.new(response.headers, response.body)
|
115
115
|
else
|
116
116
|
File.open(outpath, 'w') do |fd|
|
117
117
|
doreq('get', blob_url, fd)
|
118
|
-
end
|
118
|
+
end
|
119
119
|
|
120
120
|
outpath
|
121
121
|
end
|
@@ -223,7 +223,9 @@ class DockerRegistry2::Registry
|
|
223
223
|
|
224
224
|
if links[:next]
|
225
225
|
query=URI(links[:next]).query
|
226
|
-
|
226
|
+
link_key = @uri.host.eql?('quay.io') ? 'next_page' : 'last'
|
227
|
+
last=URI::decode_www_form(query).to_h[link_key]
|
228
|
+
|
227
229
|
end
|
228
230
|
last
|
229
231
|
end
|
@@ -257,7 +259,7 @@ class DockerRegistry2::Registry
|
|
257
259
|
raise DockerRegistry2::NotFound, error
|
258
260
|
rescue RestClient::Unauthorized => e
|
259
261
|
header = e.response.headers[:www_authenticate]
|
260
|
-
method = header.downcase.split(' ')[0]
|
262
|
+
method = header.to_s.downcase.split(' ')[0]
|
261
263
|
case method
|
262
264
|
when 'basic'
|
263
265
|
response = do_basic_req(type, url, stream, payload)
|
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.11.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: 2022-
|
14
|
+
date: 2022-07-26 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|