nexus_cli 4.0.0 → 4.0.1

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.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 4.0.1
2
+
3
+ * Actually support anonymous browsing
4
+
1
5
  # 4.0.0
2
6
 
3
7
  * Major Change - GAV ordering that used to be G:A:V:E has changed to G:A:E:C:V
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.0.0
1
+ 4.0.1
@@ -10,22 +10,6 @@ module NexusCli
10
10
  @nexus = setup_nexus(configuration)
11
11
  end
12
12
 
13
- # Returns an HTTPClient instance with settings to connect
14
- # to a Nexus server.
15
- #
16
- # @return [HTTPClient]
17
- def setup_nexus(configuration)
18
- client = HTTPClient.new
19
- client.send_timeout = 6000
20
- client.receive_timeout = 6000
21
- # https://github.com/nahi/httpclient/issues/63
22
- client.set_auth(nil, configuration['username'], configuration['password'])
23
- client.www_auth.basic_auth.challenge(configuration['url'])
24
- client.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE unless ssl_verify
25
-
26
- client
27
- end
28
-
29
13
  # Joins a given url to the current url stored in the configuraiton
30
14
  # and returns the combined String.
31
15
  #
@@ -77,5 +61,24 @@ module NexusCli
77
61
  def running_nexus_pro?
78
62
  status['edition_long'] == "Professional"
79
63
  end
64
+
65
+ private
66
+
67
+ # Returns an HTTPClient instance with settings to connect
68
+ # to a Nexus server.
69
+ #
70
+ # @return [HTTPClient]
71
+ def setup_nexus(configuration)
72
+ client = HTTPClient.new
73
+ client.send_timeout = 6000
74
+ client.receive_timeout = 6000
75
+ if configuration['username'] and configuration['password']
76
+ # https://github.com/nahi/httpclient/issues/63
77
+ client.set_auth(nil, configuration['username'], configuration['password'])
78
+ client.www_auth.basic_auth.challenge(configuration['url'])
79
+ end
80
+ client.ssl_config.verify_mode = OpenSSL::SSL::VERIFY_NONE unless ssl_verify
81
+ client
82
+ end
80
83
  end
81
- end
84
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexus_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -288,7 +288,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
288
288
  version: '0'
289
289
  segments:
290
290
  - 0
291
- hash: 64115953308248345
291
+ hash: -1792628643500466706
292
292
  required_rubygems_version: !ruby/object:Gem::Requirement
293
293
  none: false
294
294
  requirements:
@@ -297,7 +297,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
297
297
  version: '0'
298
298
  segments:
299
299
  - 0
300
- hash: 64115953308248345
300
+ hash: -1792628643500466706
301
301
  requirements: []
302
302
  rubyforge_project:
303
303
  rubygems_version: 1.8.23