retag 0.2.1.289789 → 0.2.2.290985
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/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/retag/image.rb +5 -2
- data/lib/retag/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: 44ec7c729d3be8cc44a19f82e3fae034e372f41e953bb063cae495f92be0e58c
|
4
|
+
data.tar.gz: 74906db4e1afdf65f065913cd3e249e487abddfaf9d1445766ac37866aabc979
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40f82c1d8a0ee4543e0e384a5cdfcf93f5a2ad5f0787abf7aaeaf3e15bdc2b95da196f55969c5dbfc42db3c1f65226aa13362c9890df0946b20881fb23ec4cf7
|
7
|
+
data.tar.gz: 78f4b79f597091ceded07ffccbc8d5028f3094af12d1588483c7570e88ea96c1bca0e2aa442614e7d075fbae6f114439062a61e240a2161cc01909aedf2a86d2
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/retag`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
4
|
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
data/lib/retag/image.rb
CHANGED
@@ -19,7 +19,7 @@ module Retag
|
|
19
19
|
uri = ::URI.parse("https://#{image}")
|
20
20
|
repo = uri.path
|
21
21
|
repo[0..0] = ''
|
22
|
-
project, registry = repo.split('/')
|
22
|
+
project, *center, registry = repo.split('/')
|
23
23
|
uri.path = ''
|
24
24
|
newrepo = repo
|
25
25
|
newrepo = repo.sub("#{project}/", "#{newproject}/") if newproject
|
@@ -33,7 +33,10 @@ module Retag
|
|
33
33
|
file.write(manifest.to_json)
|
34
34
|
file.flush
|
35
35
|
|
36
|
-
|
36
|
+
if newtag.to_s.strip != tag.to_s.strip
|
37
|
+
result = cmd!("curl -s -u '#{dockerauth(uri.host)}' -H 'Content-Type: #{content_type}' -H 'Accept: #{content_type}' -X PUT --data-binary @#{file.path} '#{uri}/v2/#{repo}/manifests/#{newtag}' -o -", capture: true).strip
|
38
|
+
raise result unless result.empty?
|
39
|
+
end
|
37
40
|
|
38
41
|
if newrepo != repo
|
39
42
|
if api == 'harbor'
|
data/lib/retag/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: retag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2.290985
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samoilenko Yuri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-02-
|
11
|
+
date: 2025-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|