docker-compose-api 1.1.6 → 1.1.8
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 944f7aa6c4c9a99fde68b93f5acaf75b3b8c0ac36c5e3f1641898fa26f5fe998
|
4
|
+
data.tar.gz: e2a80de5052ed8410ac34a9399e7902f26edb665e5f8bb6c1b134222f959e0c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81720111a8a5f758917d33fe021a820a9a6a2e47b0db6f3f43cb93e9955e2950977153b4e5e0dbfe1ffc3dfce142aee7becac849a2db74ed982b66d8ba807728
|
7
|
+
data.tar.gz: f632bda99f2c2928e42112f09d65fb67ab6be0ad2c8465f5d5210d3d0c5bb4892f3bf2ffe2c7eabd30c38d06cb800d74cfa4e87d9537af3fdbd170c2269c6b75
|
@@ -30,11 +30,18 @@ module ComposeUtils
|
|
30
30
|
def self.format_image(image)
|
31
31
|
base_image = nil
|
32
32
|
tag = nil
|
33
|
+
repo = nil
|
33
34
|
|
34
35
|
if image.nil?
|
35
36
|
return nil
|
36
37
|
end
|
37
38
|
|
39
|
+
unless image.index('/').nil?
|
40
|
+
path_split = image.rpartition('/')
|
41
|
+
image = path_split.last
|
42
|
+
repo = path_split.first + '/'
|
43
|
+
end
|
44
|
+
|
38
45
|
if image.index(':').nil?
|
39
46
|
base_image = image
|
40
47
|
tag = 'latest'
|
@@ -44,7 +51,7 @@ module ComposeUtils
|
|
44
51
|
tag = image_split[1]
|
45
52
|
end
|
46
53
|
|
47
|
-
"#{base_image}:#{tag}"
|
54
|
+
"#{repo}#{base_image}:#{tag}"
|
48
55
|
end
|
49
56
|
|
50
57
|
#
|
data/lib/version.rb
CHANGED
@@ -13,6 +13,11 @@ describe ComposeUtils do
|
|
13
13
|
it 'should assign base image and tag when both are provided' do
|
14
14
|
expect(ComposeUtils.format_image('ubuntu:11')).to eq('ubuntu:11')
|
15
15
|
end
|
16
|
+
|
17
|
+
it 'should return valid tag if repository port specified' do
|
18
|
+
expect(ComposeUtils.format_image('localhost:5000/test')).to eq('localhost:5000/test:latest')
|
19
|
+
expect(ComposeUtils.format_image('localhost:5000/test:tag')).to eq('localhost:5000/test:tag')
|
20
|
+
end
|
16
21
|
end
|
17
22
|
|
18
23
|
context 'Format command' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: docker-compose-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mauricio S. Klein
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docker-api
|