nexus_api 1.0.3 → 1.0.4
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 +6 -0
- data/Gemfile.lock +8 -2
- data/lib/nexus_api/nexus_connection.rb +6 -4
- data/lib/nexus_api/version.rb +1 -1
- data/nexus_api.gemspec +1 -0
- metadata +15 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 07dd575297d828538f762c39b116f348b220e4bce0472ab3a10950b801e4bf18
|
|
4
|
+
data.tar.gz: 0b33bb52c7f8775fe92d113cd4b38f3bd088e58f9a1883abeea47f1e23afac53
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5c254a794bb8edf24992eb4b8ca7dccd9d601a5c2451eabb4dd8a223dc74a5e90994a7a122fc68fb69e73fb75e15bb343a17d85c7b8fcc98b6391f976289d838
|
|
7
|
+
data.tar.gz: d21310b932b4fc7539c33fee22ff77c0bdee0f8fbd8a59d17e62f34eb19e87959689b0c4061a2676083b482119c3271ba31c5af736d91e19c27f5697158885d6
|
data/CHANGELOG.md
CHANGED
|
@@ -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.0.4](https://github.com/Cisco-AMP/nexus_api/compare/v1.0.3...v1.0.4) - 2020-03-23
|
|
9
|
+
### Added
|
|
10
|
+
- URL escaping
|
|
11
|
+
- `simplecov` gem to report on code coverage
|
|
12
|
+
|
|
13
|
+
|
|
8
14
|
## [1.0.3](https://github.com/Cisco-AMP/nexus_api/compare/v1.0.2...v1.0.3) - 2020-02-27
|
|
9
15
|
### Added
|
|
10
16
|
- Filter on CLI search to ignore results that don't include the search name in the file path
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
nexus_api (1.0.
|
|
4
|
+
nexus_api (1.0.4)
|
|
5
5
|
bundler (~> 2)
|
|
6
6
|
docker-api (~> 1.34.2)
|
|
7
7
|
dotenv (~> 2.7.5)
|
|
@@ -15,13 +15,14 @@ GEM
|
|
|
15
15
|
specs:
|
|
16
16
|
coderay (1.1.2)
|
|
17
17
|
diff-lcs (1.3)
|
|
18
|
+
docile (1.3.2)
|
|
18
19
|
docker-api (1.34.2)
|
|
19
20
|
excon (>= 0.47.0)
|
|
20
21
|
multi_json
|
|
21
22
|
domain_name (0.5.20190701)
|
|
22
23
|
unf (>= 0.0.5, < 1.0.0)
|
|
23
24
|
dotenv (2.7.5)
|
|
24
|
-
excon (0.
|
|
25
|
+
excon (0.72.0)
|
|
25
26
|
http-accept (1.7.0)
|
|
26
27
|
http-cookie (1.0.3)
|
|
27
28
|
domain_name (~> 0.5)
|
|
@@ -53,6 +54,10 @@ GEM
|
|
|
53
54
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
54
55
|
rspec-support (~> 3.9.0)
|
|
55
56
|
rspec-support (3.9.0)
|
|
57
|
+
simplecov (0.18.5)
|
|
58
|
+
docile (~> 1.1)
|
|
59
|
+
simplecov-html (~> 0.11)
|
|
60
|
+
simplecov-html (0.12.2)
|
|
56
61
|
thor (0.20.3)
|
|
57
62
|
unf (0.1.4)
|
|
58
63
|
unf_ext
|
|
@@ -64,6 +69,7 @@ PLATFORMS
|
|
|
64
69
|
DEPENDENCIES
|
|
65
70
|
nexus_api!
|
|
66
71
|
rspec (~> 3.0)
|
|
72
|
+
simplecov (~> 0.18.5)
|
|
67
73
|
|
|
68
74
|
BUNDLED WITH
|
|
69
75
|
2.0.2
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
require 'base64'
|
|
2
2
|
require 'rest-client'
|
|
3
|
+
require 'uri'
|
|
3
4
|
|
|
4
5
|
module NexusAPI
|
|
5
6
|
class NexusConnection
|
|
@@ -53,7 +54,7 @@ module NexusAPI
|
|
|
53
54
|
|
|
54
55
|
def head(asset_url:)
|
|
55
56
|
catch_connection_error do
|
|
56
|
-
RestClient.head(asset_url)
|
|
57
|
+
RestClient.head(URI.escape(asset_url))
|
|
57
58
|
end
|
|
58
59
|
end
|
|
59
60
|
|
|
@@ -65,7 +66,7 @@ module NexusAPI
|
|
|
65
66
|
|
|
66
67
|
def download(url:)
|
|
67
68
|
catch_connection_error do
|
|
68
|
-
RestClient.get(url, authorization_header)
|
|
69
|
+
RestClient.get(URI.escape(url), authorization_header)
|
|
69
70
|
end
|
|
70
71
|
end
|
|
71
72
|
|
|
@@ -103,10 +104,11 @@ module NexusAPI
|
|
|
103
104
|
end
|
|
104
105
|
|
|
105
106
|
def send_request(connection_method, endpoint, parameters: '', headers: {})
|
|
107
|
+
url = "https://#{@hostname}/service/rest/v1/#{endpoint}"
|
|
106
108
|
catch_connection_error do
|
|
107
109
|
RestClient::Request.execute(
|
|
108
|
-
method:
|
|
109
|
-
url:
|
|
110
|
+
method: connection_method,
|
|
111
|
+
url: URI.escape(url),
|
|
110
112
|
payload: parameters,
|
|
111
113
|
headers: authorization_header.merge(headers)
|
|
112
114
|
)
|
data/lib/nexus_api/version.rb
CHANGED
data/nexus_api.gemspec
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.0.
|
|
4
|
+
version: 1.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Francis Levesque
|
|
@@ -123,6 +123,20 @@ dependencies:
|
|
|
123
123
|
- - "~>"
|
|
124
124
|
- !ruby/object:Gem::Version
|
|
125
125
|
version: '3.0'
|
|
126
|
+
- !ruby/object:Gem::Dependency
|
|
127
|
+
name: simplecov
|
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
|
129
|
+
requirements:
|
|
130
|
+
- - "~>"
|
|
131
|
+
- !ruby/object:Gem::Version
|
|
132
|
+
version: 0.18.5
|
|
133
|
+
type: :development
|
|
134
|
+
prerelease: false
|
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
136
|
+
requirements:
|
|
137
|
+
- - "~>"
|
|
138
|
+
- !ruby/object:Gem::Version
|
|
139
|
+
version: 0.18.5
|
|
126
140
|
description:
|
|
127
141
|
email:
|
|
128
142
|
- francis.d.levesque@gmail.com
|