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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/docker/remote/client.rb +10 -8
- data/lib/docker/remote/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: dff0f9b1ca90b5aee31b32c2a21804958e56c820d0dea006dc72e01ec9d7bde0
|
4
|
+
data.tar.gz: 37430773f8c4cc38eab13ffe84c130ce1004248eb1eede2c9017125fda24fe52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee3d605c43385c3ab6dd3da722813806abff376a762e1dc1a1d11192a1f9013dbbb63342ae70fe737770d63a065d33e3e1e4868617d78dd45dc401dd3026c57e
|
7
|
+
data.tar.gz: 437bb0ab332ebf9c62ef3ed9ff7609271770a711dc1d5c7f7d34d15bb9bf2d75076679667ff2e8c850d8e3b654ecca00c2c77dbb950b5a10d730bdff71ef0164
|
data/CHANGELOG.md
CHANGED
data/lib/docker/remote/client.rb
CHANGED
@@ -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,
|
123
|
+
host, orig_port = host_port.split(':')
|
123
124
|
|
124
|
-
|
125
|
-
|
125
|
+
port = if orig_port
|
126
|
+
orig_port.to_i
|
126
127
|
elsif prt = PORTMAP[host]
|
127
|
-
|
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,
|
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'
|
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.
|
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-
|
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:
|