kuby-core 0.11.10 → 0.11.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/kuby/docker/metadata.rb +3 -2
- data/lib/kuby/tasks.rb +1 -1
- data/lib/kuby/version.rb +1 -1
- data/spec/docker/metadata_spec.rb +3 -3
- 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: 78bc9ff66849f7b55046753a84be77fd64af68d28c1746245a463f5f240d0e9e
|
4
|
+
data.tar.gz: '079e0ccccc1ae12a18a2cb459e7a6b1f2b3ef05149d5bf347fed5ba1e6abbb2b'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f27a9bd4698e6cdcb4c0308c91a78e5c86ac6eccd6dcd8f9ff1b28a73e8c1aa50f79512dc9ad3b5fdb43c024ba5054c1df1844bd74473c5bd9dd3c3cf034c7c4
|
7
|
+
data.tar.gz: fca6952c0bfe4cb5d2e6e9b0f4f50d46483bb43ad32d601dbdfcc14eeccb4070706043e786d18ade2730b9521443f55fb317620334f212fb88cfb92ab8672cb1
|
data/CHANGELOG.md
CHANGED
data/lib/kuby/docker/metadata.rb
CHANGED
@@ -40,7 +40,8 @@ module Kuby
|
|
40
40
|
|
41
41
|
sig { returns(String) }
|
42
42
|
def image_host
|
43
|
-
|
43
|
+
uri = full_image_uri
|
44
|
+
@image_host ||= "#{uri.scheme}://#{uri.host}:#{uri.port}"
|
44
45
|
end
|
45
46
|
|
46
47
|
sig { returns(String) }
|
@@ -74,7 +75,7 @@ module Kuby
|
|
74
75
|
def full_image_uri
|
75
76
|
@full_image_uri ||= if image_url.include?('://')
|
76
77
|
URI.parse(image_url)
|
77
|
-
elsif image_url =~ /\A[
|
78
|
+
elsif image_url =~ /\A[^.:]+[\.:][^\/]+\//
|
78
79
|
URI.parse("#{DEFAULT_REGISTRY_SCHEME}://#{image_url}")
|
79
80
|
else
|
80
81
|
URI.parse("#{DEFAULT_REGISTRY_HOST}/#{image_url.sub(/\A[\/]+/, '')}")
|
data/lib/kuby/tasks.rb
CHANGED
@@ -43,7 +43,7 @@ module Kuby
|
|
43
43
|
|
44
44
|
hostname = docker.metadata.image_hostname
|
45
45
|
|
46
|
-
|
46
|
+
if docker.credentials.username && !docker.cli.auths.include?(hostname)
|
47
47
|
Kuby.logger.info("Attempting to log in to registry at #{hostname}")
|
48
48
|
|
49
49
|
begin
|
data/lib/kuby/version.rb
CHANGED
@@ -19,18 +19,18 @@ describe Kuby::Docker::Metadata do
|
|
19
19
|
describe '#image_host' do
|
20
20
|
subject { metadata.image_host }
|
21
21
|
|
22
|
-
it { is_expected.to eq(described_class::DEFAULT_REGISTRY_HOST) }
|
22
|
+
it { is_expected.to eq("#{described_class::DEFAULT_REGISTRY_HOST}:443") }
|
23
23
|
|
24
24
|
context 'when the image URL contains an explicit host' do
|
25
25
|
let(:docker_image_url) { 'registry.foo.com/foo/testapp' }
|
26
26
|
|
27
|
-
it { is_expected.to eq('https://registry.foo.com') }
|
27
|
+
it { is_expected.to eq('https://registry.foo.com:443') }
|
28
28
|
end
|
29
29
|
|
30
30
|
context 'when the image URL contains an explicit host with scheme' do
|
31
31
|
let(:docker_image_url) { 'http://registry.foo.com/foo/testapp' }
|
32
32
|
|
33
|
-
it { is_expected.to eq('http://registry.foo.com') }
|
33
|
+
it { is_expected.to eq('http://registry.foo.com:80') }
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kuby-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.11
|
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-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|