nexus_api 1.0.3 → 1.0.4

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: 8a0665ad2e059ffc42c631e02c35b460e5684b8b862ed1bc60c428e6a8d2e061
4
- data.tar.gz: 279060e9c9f91d1e4156ad3a0d9bbde945447ed2d6dbd143bb30861481d3beef
3
+ metadata.gz: 07dd575297d828538f762c39b116f348b220e4bce0472ab3a10950b801e4bf18
4
+ data.tar.gz: 0b33bb52c7f8775fe92d113cd4b38f3bd088e58f9a1883abeea47f1e23afac53
5
5
  SHA512:
6
- metadata.gz: 0eb7d63e09099d9ab9598fd3a7c2c0b5d9f0a8c81e38667c8605f518461bf4f99f158b8afe5fba3a5b37c92873802dc3be24d80aa79c2ec384442bf22b0fd4ae
7
- data.tar.gz: 1efb8234be47b61af22c500a237e84072a1646fde9ad775a0d3413d85e62db2bf2e9766d37095e0174a84588548f0ea60f50c246a31f2cf7c8dbed6c2152b6e1
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.3)
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.71.1)
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: connection_method,
109
- url: "https://#{@hostname}/service/rest/v1/#{endpoint}",
110
+ method: connection_method,
111
+ url: URI.escape(url),
110
112
  payload: parameters,
111
113
  headers: authorization_header.merge(headers)
112
114
  )
@@ -1,4 +1,4 @@
1
1
  module NexusAPI
2
- VERSION = '1.0.3'
2
+ VERSION = '1.0.4'
3
3
  end
4
4
 
data/nexus_api.gemspec CHANGED
@@ -32,4 +32,5 @@ Gem::Specification.new do |spec|
32
32
  spec.add_runtime_dependency 'thor', "~> 0.20.3"
33
33
 
34
34
  spec.add_development_dependency 'rspec', "~> 3.0"
35
+ spec.add_development_dependency 'simplecov', "~> 0.18.5"
35
36
  end
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.3
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