artifactory-gem_import 0.2.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/artifactory/gem_import/cli.rb +5 -5
- data/lib/artifactory/gem_import/version.rb +1 -1
- data/lib/artifactory/gem_import.rb +5 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1eed15a13a5b232d2025e01c80b1f3ddac72924caec37d351556c2be94ef63f4
|
4
|
+
data.tar.gz: 88a56b54b8f99c7d45f781abe0b3accba3dddc550e6e0691a25f7733b5d9d58b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f226d4660c90a721909175e3b0959c06aad9a5ce7ec7e1245da096e701f4128d14e9ab032c8b3b764ec80bf885b5ffcc967025b6f9ec028050dc3b2a6e48b2b3
|
7
|
+
data.tar.gz: cd5467dc42cc4f1174aae0436f6c6255e0683db0169192db4ee71ab76568ce975b3ca5b39f35eb86b243e68f84e3120e1a94221f549c2d6da08573dda949d433
|
data/README.md
CHANGED
@@ -26,18 +26,18 @@ gem 'artifactory-gem_import'
|
|
26
26
|
|
27
27
|
Show gems not already present in the Artifactory.
|
28
28
|
```shell
|
29
|
-
$ artifactory-gem-import show-missing --source-repo https://your-repo.local/private --target-repo https://your-artifactory.local/gems-local --target-repo-
|
29
|
+
$ artifactory-gem-import show-missing --source-repo https://your-repo.local/private --target-repo https://your-artifactory.local/gems-local --target-repo-access-token <access-token> [--only "+."]
|
30
30
|
```
|
31
31
|
|
32
32
|
Import gems into the Artifactory.
|
33
33
|
```shell
|
34
|
-
$ artifactory-gem-import import --source-repo https://your-repo.local/private --target-repo https://your-artifactory.local/gems-local --target-repo-
|
34
|
+
$ artifactory-gem-import import --source-repo https://your-repo.local/private --target-repo https://your-artifactory.local/gems-local --target-repo-access-token <access-token> [--only "+."] [--force]
|
35
35
|
```
|
36
36
|
Using `--force` uploads gems even if already present in the target repo instead of skipping them.
|
37
37
|
|
38
38
|
Delete gems from the Artifactory. It will NOT remove the `rubygems-update` gem as it seems to be needed to keep the gem repository working.
|
39
39
|
```shell
|
40
|
-
$ artifactory-gem-import delete --target-repo https://your-artifactory.local/gems-local --target-repo-
|
40
|
+
$ artifactory-gem-import delete --target-repo https://your-artifactory.local/gems-local --target-repo-access-token <access-token> [--only "+."]
|
41
41
|
```
|
42
42
|
|
43
43
|
Keep in mind that Artifactory needs some time to apply your changes.
|
@@ -13,7 +13,7 @@ module Artifactory
|
|
13
13
|
|
14
14
|
option :target_repo, required: true, type: :string
|
15
15
|
|
16
|
-
option :
|
16
|
+
option :target_repo_access_token, required: true, type: :string
|
17
17
|
|
18
18
|
option :only, type: :string, default: ".+"
|
19
19
|
|
@@ -30,7 +30,7 @@ module Artifactory
|
|
30
30
|
|
31
31
|
option :target_repo, required: true, type: :string
|
32
32
|
|
33
|
-
option :
|
33
|
+
option :target_repo_access_token, required: true, type: :string
|
34
34
|
|
35
35
|
option :only, type: :string, default: ".+"
|
36
36
|
|
@@ -45,7 +45,7 @@ module Artifactory
|
|
45
45
|
|
46
46
|
option :target_repo, required: true, type: :string
|
47
47
|
|
48
|
-
option :
|
48
|
+
option :target_repo_access_token, required: true, type: :string
|
49
49
|
|
50
50
|
option :only, type: :string, default: ".+"
|
51
51
|
|
@@ -63,7 +63,7 @@ module Artifactory
|
|
63
63
|
|
64
64
|
# option :target_repo, required: true, type: :string
|
65
65
|
#
|
66
|
-
# option :
|
66
|
+
# option :target_repo_access_token, required: true, type: :string
|
67
67
|
#
|
68
68
|
# desc "reindex", "Trigger reindexing of the target repo (Artifactory only)."
|
69
69
|
# def reindex
|
@@ -84,7 +84,7 @@ module Artifactory
|
|
84
84
|
|
85
85
|
def target_repo
|
86
86
|
GemImport.target_repo url: options[:target_repo],
|
87
|
-
|
87
|
+
access_token: options[:target_repo_access_token]
|
88
88
|
end
|
89
89
|
end
|
90
90
|
end
|
@@ -8,7 +8,7 @@ require_relative "gem_import/worker"
|
|
8
8
|
|
9
9
|
module Artifactory
|
10
10
|
module GemImport
|
11
|
-
Error
|
11
|
+
Error = Class.new StandardError
|
12
12
|
ClientError = Class.new Error
|
13
13
|
|
14
14
|
module_function
|
@@ -32,13 +32,13 @@ module Artifactory
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def source_repo(url:)
|
35
|
-
Repo.new url:
|
35
|
+
Repo.new url: url,
|
36
36
|
headers: {}
|
37
37
|
end
|
38
38
|
|
39
|
-
def target_repo(url:,
|
40
|
-
Repo.new url:
|
41
|
-
headers: { "
|
39
|
+
def target_repo(url:, access_token:)
|
40
|
+
Repo.new url: url,
|
41
|
+
headers: { "Authorization" => "Bearer #{access_token}" }
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: artifactory-gem_import
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Scholz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
|
-
rubygems_version: 3.5.
|
107
|
+
rubygems_version: 3.5.22
|
108
108
|
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: Artifactory Gem Import.
|