nexus_api 1.2.0 → 1.2.1

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: 885db3d6a8d7a3b381b8a9a889ef2bbbbe5d746b14e430872815db135f25c879
4
- data.tar.gz: 2408b1085fa8d62f5d506d113aad8d269b74e0a66564e1c9720ba6aaa2e4ccff
3
+ metadata.gz: 2379edda3e2f2845f6151d103bab5ddb73431fab4a32c1a8509f02348848fc81
4
+ data.tar.gz: 787df5287d2626911972936c63686482b7a4eee20043a23d8fa505cdfb4f5b90
5
5
  SHA512:
6
- metadata.gz: 001d8efa8dbe403928908e11a88746a5cb5f6650120031b9992888bde1a8224d3c33812df0b59c5ccb229492329049dcdda1aa2829f7ec550488ce3c77cce3a6
7
- data.tar.gz: ebd5b6c64759c57137c74a86584c4c51d15467ad8cea81154e72bb91a59fa30dc4f24a18729d444a7ac999d6b6dadcd944eed8a164cdbc120874539b0d489a4a
6
+ metadata.gz: a6693a438c77406ca6a4b38cf57f55c24f6c590a0f4897bba86c34af20521f88a0a3db7cc18ff10aa200e85929849dc648bdc8a46769d97457df4447cdb35a26
7
+ data.tar.gz: 8feb5be1d4860e6ab89f3f061a047d6ee1bb8bd10a153ab288d8dd56866c9cfcef73da51ca734e18fae287bd559a6055434761f8c80b205a97f883531dba985e
@@ -5,6 +5,12 @@ 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.2.1](https://github.com/Cisco-AMP/nexus_api/compare/v1.2.0...v1.2.1) - 2020-04-29
9
+ ### Fixed
10
+ - Correctly building request URLs when pagination is the only argument
11
+ - `bin/nexus_api tag list` now using pagination
12
+
13
+
8
14
  ## [1.2.0](https://github.com/Cisco-AMP/nexus_api/compare/v1.1.0...v1.2.0) - 2020-04-24
9
15
  ### Added
10
16
  - `move_components_to` method for moving all components that match a given tag into a new destination
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nexus_api (1.2.0)
4
+ nexus_api (1.2.1)
5
5
  bundler (~> 2)
6
6
  docker-api (~> 1.34.2)
7
7
  dotenv (~> 2.7.5)
@@ -31,7 +31,7 @@ module NexusAPI
31
31
  desc 'list', 'Prints out a list of all tags'
32
32
  option :full, :aliases => '-f', :desc => 'Print full JSON output'
33
33
  def list
34
- print_set(action: :list_tags, filter: 'name')
34
+ print_paginating_set(action: :list_tags, params: {}, filter: 'name')
35
35
  end
36
36
 
37
37
  desc 'remove', 'Removes a tag from an asset'
@@ -120,9 +120,10 @@ module NexusAPI
120
120
  end
121
121
 
122
122
  def send_get(endpoint, paginate, headers, api_version)
123
+ url_marker = endpoint.include?('?') ? '&' : '?'
123
124
  # paginate answers is the user requesting pagination, paginate? answers does a continuation token exist
124
125
  # if an empty continuation token is included in the request we'll get an ArrayIndexOutOfBoundsException
125
- endpoint += "&continuationToken=#{@continuation_token}" if paginate && paginate?
126
+ endpoint += "#{url_marker}continuationToken=#{@continuation_token}" if paginate && paginate?
126
127
  response = send_request(
127
128
  :get,
128
129
  endpoint,
@@ -1,4 +1,4 @@
1
1
  module NexusAPI
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
4
4
 
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.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francis Levesque