docker-remote 0.5.0 → 0.5.1

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: fa237c85cc84f1754b6cd4e22a62d8216a82ef07777d2b47d7b786769dc6e271
4
- data.tar.gz: 0dc9ce6503cea3974e74783cfa612e11a094419e65c5dcbc7a202f2b51b10343
3
+ metadata.gz: dff0f9b1ca90b5aee31b32c2a21804958e56c820d0dea006dc72e01ec9d7bde0
4
+ data.tar.gz: 37430773f8c4cc38eab13ffe84c130ce1004248eb1eede2c9017125fda24fe52
5
5
  SHA512:
6
- metadata.gz: cb25048ceb8c1e7b1b567b7741fda86a7b8eebef80450b77f18d5b6ce32a4f2558d4c9ac36fbbde6ff7b6c4591a3ffd5e988859152906b65e96e82aaf17d1e1a
7
- data.tar.gz: 48e4aa145fb981fbdf0a28719c476084f4d1028f90e663192c9ea663cc86fe6cb92d52fd6b2a5231a2c0d306670b30cf97af0559f1445ffec76bc32e326bf7d7
6
+ metadata.gz: ee3d605c43385c3ab6dd3da722813806abff376a762e1dc1a1d11192a1f9013dbbb63342ae70fe737770d63a065d33e3e1e4868617d78dd45dc401dd3026c57e
7
+ data.tar.gz: 437bb0ab332ebf9c62ef3ed9ff7609271770a711dc1d5c7f7d34d15bb9bf2d75076679667ff2e8c850d8e3b654ecca00c2c77dbb950b5a10d730bdff71ef0164
@@ -1,3 +1,6 @@
1
+ ## 0.5.1
2
+ * Just use given port if present, i.e. without checking it for connectivity.
3
+
1
4
  ## 0.5.0
2
5
  * Figure out registry port more accurately.
3
6
 
@@ -1,5 +1,6 @@
1
1
  require 'json'
2
2
  require 'net/http'
3
+ require 'socket'
3
4
  require 'uri'
4
5
 
5
6
  module Docker
@@ -119,20 +120,21 @@ module Docker
119
120
  def registry_uri
120
121
  @registry_uri ||= begin
121
122
  host_port, *rest = registry_url.split('/')
122
- host, port = host_port.split(':')
123
+ host, orig_port = host_port.split(':')
123
124
 
124
- ports = if port
125
- [port.to_i]
125
+ port = if orig_port
126
+ orig_port.to_i
126
127
  elsif prt = PORTMAP[host]
127
- [prt]
128
+ prt
128
129
  else
129
- STANDARD_PORTS
130
+ STANDARD_PORTS.find do |prt|
131
+ can_connect?(host, prt)
132
+ end
130
133
  end
131
134
 
132
- port = ports.find { |port| can_connect?(host, port) }
133
-
134
135
  unless port
135
- raise DockerRemoteError, "couldn't determine what port to connect to"
136
+ raise DockerRemoteError,
137
+ "couldn't determine what port to connect to for '#{registry_url}'"
136
138
  end
137
139
 
138
140
  scheme = port == DEFAULT_PORT ? 'https' : 'http'
@@ -1,5 +1,5 @@
1
1
  module Docker
2
2
  module Remote
3
- VERSION = '0.5.0'
3
+ VERSION = '0.5.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docker-remote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Dutro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-04 00:00:00.000000000 Z
11
+ date: 2020-11-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A Ruby client for communicating with the Docker registry API v2.
14
14
  email: