nexus_api 1.1.0 → 1.2.0
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/CHANGELOG.md +7 -1
- data/Gemfile.lock +1 -1
- data/README.md +7 -10
- data/lib/endpoints/staging.rb +3 -0
- data/lib/nexus_api/cli.rb +7 -0
- data/lib/nexus_api/cli_commands/commands.rb +1 -0
- data/lib/nexus_api/cli_commands/move.rb +15 -0
- data/lib/nexus_api/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 885db3d6a8d7a3b381b8a9a889ef2bbbbe5d746b14e430872815db135f25c879
|
4
|
+
data.tar.gz: 2408b1085fa8d62f5d506d113aad8d269b74e0a66564e1c9720ba6aaa2e4ccff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 001d8efa8dbe403928908e11a88746a5cb5f6650120031b9992888bde1a8224d3c33812df0b59c5ccb229492329049dcdda1aa2829f7ec550488ce3c77cce3a6
|
7
|
+
data.tar.gz: ebd5b6c64759c57137c74a86584c4c51d15467ad8cea81154e72bb91a59fa30dc4f24a18729d444a7ac999d6b6dadcd944eed8a164cdbc120874539b0d489a4a
|
data/CHANGELOG.md
CHANGED
@@ -5,7 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
7
|
|
8
|
-
## [1.
|
8
|
+
## [1.2.0](https://github.com/Cisco-AMP/nexus_api/compare/v1.1.0...v1.2.0) - 2020-04-24
|
9
|
+
### Added
|
10
|
+
- `move_components_to` method for moving all components that match a given tag into a new destination
|
11
|
+
- `bin/nexus_api move` to the CLI for moving components
|
12
|
+
|
13
|
+
|
14
|
+
## [1.1.0](https://github.com/Cisco-AMP/nexus_api/compare/v1.0.4...v1.1.0) - 2020-04-17
|
9
15
|
### Changed
|
10
16
|
- `list_repositories` to use the new `beta` API version which returns richer content than the old `v1` version
|
11
17
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -5,10 +5,10 @@ A ruby gem that wraps the [Sonatype Nexus Repository Manager 3](https://help.son
|
|
5
5
|
## Latest Version Tested
|
6
6
|
Title | Value
|
7
7
|
---|---
|
8
|
-
**Version** | `3.
|
8
|
+
**Version** | `3.22.0-02`
|
9
9
|
**Edition** | `PRO`
|
10
|
-
**Build Revision** | `
|
11
|
-
**Build Timestamp** | `
|
10
|
+
**Build Revision** | `140e045ce3cdd3f35e6f9d13127d7299d21f7251`
|
11
|
+
**Build Timestamp** | `2020-03-27-1616-27700`
|
12
12
|
|
13
13
|
|
14
14
|
## Installation
|
@@ -45,7 +45,7 @@ bin/nexus_api
|
|
45
45
|
|
46
46
|
|
47
47
|
### Using the Class
|
48
|
-
Documentation is never perfect. Use this section as a reference, but [lib/nexus_api.rb](lib/nexus_api.rb) should be regarded as the source of truth.
|
48
|
+
Documentation is never perfect. Use this section as a reference, but [lib/nexus_api.rb](lib/nexus_api.rb) and [lib/endpoints](lib/endpoints) should be regarded as the source of truth.
|
49
49
|
|
50
50
|
|
51
51
|
```ruby
|
@@ -98,6 +98,9 @@ set = Array.new.tap do |set|
|
|
98
98
|
end
|
99
99
|
end
|
100
100
|
|
101
|
+
# You can move all components that are tagged to a new destination
|
102
|
+
api.move_components_to(destination: DESTINATION, tag: TAG)
|
103
|
+
|
101
104
|
# You can download an asset by using its asset_id
|
102
105
|
# Optionally, you can rename the file on download
|
103
106
|
api.download(
|
@@ -156,12 +159,6 @@ api.associate_tag(name: TAG, sha1: SHA1_SUM, repository: REPOSITORY_NAME)
|
|
156
159
|
api.delete_associated_tag(name: TAG, sha1: SHA1_SUM, repository: REPOSITORY_NAME)
|
157
160
|
api.delete_tag(name: TAG)
|
158
161
|
|
159
|
-
# You can upload, list, run, and delete custom Nexus scripts
|
160
|
-
api.upload_script(filename: LOCAL_FILENAME)
|
161
|
-
api.list_scripts
|
162
|
-
api.run_script(name: SCRIPT_NAME)
|
163
|
-
api.delete_script(name: SCRIPT_NAME)
|
164
|
-
|
165
162
|
# You can query the Nexus status
|
166
163
|
api.status
|
167
164
|
api.status_writable
|
data/lib/endpoints/staging.rb
CHANGED
data/lib/nexus_api/cli.rb
CHANGED
@@ -15,6 +15,9 @@ module NexusAPI
|
|
15
15
|
desc 'list TYPE', 'Print a list of every item in Nexus that matches TYPE'
|
16
16
|
subcommand 'list', List
|
17
17
|
|
18
|
+
desc 'move TYPE', 'Move items to new location in Nexus'
|
19
|
+
subcommand 'move', Move
|
20
|
+
|
18
21
|
desc 'script COMMAND', 'Manipulate scripts in Nexus'
|
19
22
|
subcommand 'script', Script
|
20
23
|
|
@@ -32,5 +35,9 @@ module NexusAPI
|
|
32
35
|
def version
|
33
36
|
puts NexusAPI::VERSION
|
34
37
|
end
|
38
|
+
|
39
|
+
def self.exit_on_failure?
|
40
|
+
true
|
41
|
+
end
|
35
42
|
end
|
36
43
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module NexusAPI
|
2
|
+
class Move < ::Thor
|
3
|
+
attr_accessor :api
|
4
|
+
|
5
|
+
include NexusAPI::CLIUtils
|
6
|
+
|
7
|
+
desc 'components', 'Moves components with the provided tag to the provided destination'
|
8
|
+
option :destination, :aliases => '-d', :desc => 'Destination to move components to', :required => true
|
9
|
+
option :tag, :aliases => '-t', :desc => 'Tag to match', :required => true
|
10
|
+
def components
|
11
|
+
setup
|
12
|
+
@api.move_components_to(destination: options[:destination], tag: options[:tag])
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/nexus_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexus_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francis Levesque
|
@@ -211,6 +211,7 @@ files:
|
|
211
211
|
- lib/nexus_api/cli_commands/commands.rb
|
212
212
|
- lib/nexus_api/cli_commands/download.rb
|
213
213
|
- lib/nexus_api/cli_commands/list.rb
|
214
|
+
- lib/nexus_api/cli_commands/move.rb
|
214
215
|
- lib/nexus_api/cli_commands/script.rb
|
215
216
|
- lib/nexus_api/cli_commands/search.rb
|
216
217
|
- lib/nexus_api/cli_commands/tag.rb
|