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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d9422a855958aa038e1c5340c3b247257e7e99ef0f55e7b19a3be59a756fa41
4
- data.tar.gz: f3ee7a9613f07d850fe5f6d3f97b6c9ac823cf97676be84e88a0713110e8337f
3
+ metadata.gz: 1eed15a13a5b232d2025e01c80b1f3ddac72924caec37d351556c2be94ef63f4
4
+ data.tar.gz: 88a56b54b8f99c7d45f781abe0b3accba3dddc550e6e0691a25f7733b5d9d58b
5
5
  SHA512:
6
- metadata.gz: 72aacbc2f1176149a6e55f0f08a4000a4bc90eb01e66e123b4fef8557d39236445616ef2249a174d5120a712f64ce1d01b6eaa52727b4bddf9f4b53f4490827e
7
- data.tar.gz: 325b64f6d681e3a258ccbc6cff36f28246b53cf6e28c08c5379a572cf93c3b4fc5852c89da69a0dadae46331dcd3803d8e7c7831a741dd71754d5bd13b447ba9
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-api-key <api-key> [--only "+."]
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-api-key <api-key> [--only "+."] [--force]
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-api-key <api-key> [--only "+."]
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 :target_repo_api_key, required: true, type: :string
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 :target_repo_api_key, required: true, type: :string
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 :target_repo_api_key, required: true, type: :string
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 :target_repo_api_key, required: true, type: :string
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
- api_key: options[:target_repo_api_key]
87
+ access_token: options[:target_repo_access_token]
88
88
  end
89
89
  end
90
90
  end
@@ -1,5 +1,5 @@
1
1
  module Artifactory
2
2
  module GemImport
3
- VERSION = "0.2.2"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -8,7 +8,7 @@ require_relative "gem_import/worker"
8
8
 
9
9
  module Artifactory
10
10
  module GemImport
11
- Error = Class.new StandardError
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: url,
35
+ Repo.new url: url,
36
36
  headers: {}
37
37
  end
38
38
 
39
- def target_repo(url:, api_key:)
40
- Repo.new url: url,
41
- headers: { "X-JFrog-Art-Api" => api_key }
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.2.2
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: 2024-06-25 00:00:00.000000000 Z
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.14
107
+ rubygems_version: 3.5.22
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: Artifactory Gem Import.