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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b02aec116b0797e9023ac8503214e93f4ebd9036b507223133445336d824935f
4
- data.tar.gz: 8c432f0c18632a19c671c764149c0a80d4be7a406fb0f165fdf1cf59b812eb46
3
+ metadata.gz: 44ec7c729d3be8cc44a19f82e3fae034e372f41e953bb063cae495f92be0e58c
4
+ data.tar.gz: 74906db4e1afdf65f065913cd3e249e487abddfaf9d1445766ac37866aabc979
5
5
  SHA512:
6
- metadata.gz: cb8d95b95b55b01f2aa4dbd2a4fa819a7390135488b560f6ef091eab245dbc07e99eb5f64ef69caf8f3c83fddd70c53b4555d7633b4d8a51294b2ca85571418d
7
- data.tar.gz: 93ae41bea06c2bdf9958b7bcfa6900fc92a38b882ecab7e19d6bc837bff1f744fa1b1fd90bc1c3ab0bb0cef202d13e668ebf72784fec2a3a0c039643d6ac67fc
6
+ metadata.gz: 40f82c1d8a0ee4543e0e384a5cdfcf93f5a2ad5f0787abf7aaeaf3e15bdc2b95da196f55969c5dbfc42db3c1f65226aa13362c9890df0946b20881fb23ec4cf7
7
+ data.tar.gz: 78f4b79f597091ceded07ffccbc8d5028f3094af12d1588483c7570e88ea96c1bca0e2aa442614e7d075fbae6f114439062a61e240a2161cc01909aedf2a86d2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- retag (0.2.1)
4
+ retag (0.2.2)
5
5
  activesupport (~> 6.0)
6
6
  colorize (~> 0.8.1)
7
7
  gitlab (< 5.0)
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
- 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
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Retag
4
4
 
5
- VERSION = '0.2.1'
5
+ VERSION = '0.2.2'
6
6
 
7
7
  end
8
8
 
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.1.289789
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-14 00:00:00.000000000 Z
11
+ date: 2025-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler