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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5950b75a42136e58681f74542001e9da4a205147fc6569a372f779806086926c
4
- data.tar.gz: ec5b690dae63f5b0dfb56c46204ba95134bb8ba77df836d10f640f8703b4ebed
3
+ metadata.gz: 7c94a748970c4e621a4bb1b856ea14915fbc83b55cff85743e7ef4333afb2360
4
+ data.tar.gz: 340ce8d170519eb1a958a3c4d08314658d214ad0bd3e8c57d30d931086d885b0
5
5
  SHA512:
6
- metadata.gz: c2cf4a0e66aa11f273ed66b731116a2a5c66b2d0c013a910f815d12261bb6b2d925b22d8c908e698b7e28c0b3b4228c598731de45b6bcc6e6d4bebcbf2bf3554
7
- data.tar.gz: f9834eb49dba00a9801556915bbac365db1dd46e23c9172e8afe83d64415a59a21df0e9e3c3046aca5bab5edd46f7a24693b58e4ae302b8fc54b42c5829f8470
6
+ metadata.gz: d4b64a53ae13758dadce8fd95708fbabd76cc604a740194584ba472022a2fd71c01c7526c1d577fa7aa253a8c72df069dce5b8242e48402dc2518f1d9e117633
7
+ data.tar.gz: e3416ec4b0d38da96d5f7053b791f5d1b795b00a10a91d30c7aef30d454956728b94751cbb3d3eeeb9ac2a980404c1a5abbfdb0f327044e500891db20bc9c169
@@ -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
- last=URI::decode_www_form(query).to_h["last"]
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)
@@ -1,3 +1,3 @@
1
1
  module DockerRegistry2
2
- VERSION = '1.10.1'
2
+ VERSION = '1.11.0'
3
3
  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.10.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-05-06 00:00:00.000000000 Z
14
+ date: 2022-07-26 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler