nexus_api 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/lib/nexus_api/docker_manager.rb +2 -2
- data/lib/nexus_api/nexus_connection.rb +10 -2
- data/lib/nexus_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1524dfad12c5d501e3d8d6c90a7cd712c8ded00a526093239c04aff862323546
|
4
|
+
data.tar.gz: a1c22bcdd81c450a79cbabf5adeab806eef96f2ae0b70fbe8401f5042f23e0d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52ee4482ce15c00b1eae0064c0445c6862cd4bc876e915335c923bc2f1f024bd0cb0cdee09ac41d917fe7d1abfe3a5f4dbcc717894e36e8e5a016eb54605b82e
|
7
|
+
data.tar.gz: ff03e64fdeb4e9c28ffcc94329ca79e2526411982ae36f40177dab99dbef6279810e5bebdfbae5fb50ec324f7f61fc64b6d8a3218b93e726ba44e44183fd3f5a
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,11 @@ 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.4.1](https://github.com/Cisco-AMP/nexus_api/compare/v1.4.0...v1.4.1) - 2020-05-08
|
9
|
+
### Changed
|
10
|
+
- Error reporting to be more descriptive
|
11
|
+
|
12
|
+
|
8
13
|
## [1.4.0](https://github.com/Cisco-AMP/nexus_api/compare/v1.3.0...v1.4.0) - 2020-05-05
|
9
14
|
### Added
|
10
15
|
- Optional `tag` parameter to `associate_tag()` and `delete_associated_tag()` methods
|
data/Gemfile.lock
CHANGED
@@ -15,8 +15,8 @@ module NexusAPI
|
|
15
15
|
return false unless docker_valid?
|
16
16
|
image_name = image_name(@pull_host, image_name, tag)
|
17
17
|
begin
|
18
|
-
|
19
|
-
rescue Docker::Error::NotFoundError
|
18
|
+
@docker.pull_image(@username, @password, image_name)
|
19
|
+
rescue Docker::Error::NotFoundError
|
20
20
|
puts "ERROR: Failed to pull Docker image #{image_name}.\nDoes it exist in Nexus?"
|
21
21
|
return false
|
22
22
|
end
|
@@ -88,7 +88,11 @@ module NexusAPI
|
|
88
88
|
|
89
89
|
def handle(error)
|
90
90
|
puts "ERROR: Request failed"
|
91
|
-
|
91
|
+
if error.is_a?(RestClient::Response)
|
92
|
+
puts error.description
|
93
|
+
else
|
94
|
+
puts error.to_s
|
95
|
+
end
|
92
96
|
end
|
93
97
|
|
94
98
|
def catch_connection_error
|
@@ -98,8 +102,12 @@ module NexusAPI
|
|
98
102
|
return handle(error)
|
99
103
|
rescue RestClient::Unauthorized => error
|
100
104
|
return handle(error)
|
105
|
+
rescue RestClient::Exceptions::ReadTimeout => error
|
106
|
+
return handle(error)
|
101
107
|
rescue RestClient::ExceptionWithResponse => error
|
102
108
|
return handle(error.response)
|
109
|
+
rescue StandardError => error
|
110
|
+
return handle(error)
|
103
111
|
end
|
104
112
|
end
|
105
113
|
|
@@ -124,7 +132,7 @@ module NexusAPI
|
|
124
132
|
# paginate answers is the user requesting pagination, paginate? answers does a continuation token exist
|
125
133
|
# if an empty continuation token is included in the request we'll get an ArrayIndexOutOfBoundsException
|
126
134
|
endpoint += "#{url_marker}continuationToken=#{@continuation_token}" if paginate && paginate?
|
127
|
-
|
135
|
+
send_request(
|
128
136
|
:get,
|
129
137
|
endpoint,
|
130
138
|
headers: headers,
|
data/lib/nexus_api/version.rb
CHANGED