nexus 1.2.1 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/commands/abstract_command.rb +3 -8
- data/lib/commands/nexus.rb +1 -6
- data/lib/nexus/version.rb +1 -1
- data/test/abstract_command_test.rb +2 -2
- metadata +62 -65
- data/lib/bundler/monkey_patch.rb +0 -22
- data/lib/bundler/rubygems_mirror.rb +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bebf90c036e91a7bf8f68ab2bf40e1ed2979ecd
|
4
|
+
data.tar.gz: 5c42f749fe16cf437c4c292da178d6c2d58ece12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e64101606a5ea82066c58f3c526d4dd8ac6a8390a3a289e12c90454b8ebab665db7c42acedc4af484e198be90fdeacc07b9cda4218d3d245b55dd9282bbbaf1d
|
7
|
+
data.tar.gz: 0302bbdd6654fe2203ceff3ff3dba0e5085588fc66cc3a165d42cd0ea5229bd9414d322e840c4c16e4040a2fdff4b61dbedbd9c8284a69c7d4b4386843d60c38
|
@@ -19,11 +19,6 @@ class Gem::AbstractCommand < Gem::Command
|
|
19
19
|
options[ :nexus_clear ] = value
|
20
20
|
end
|
21
21
|
|
22
|
-
# backward compatibility
|
23
|
-
add_option( '--nexus-clear', 'DEPRECATED' ) do |value, options|
|
24
|
-
options[ :nexus_clear ] = value
|
25
|
-
end
|
26
|
-
|
27
22
|
add_option( '--nexus-config FILE',
|
28
23
|
"File location of nexus config to use.\n default #{Nexus::Config.default_file}" ) do |value, options|
|
29
24
|
options[ :nexus_config ] = File.expand_path( value )
|
@@ -45,7 +40,7 @@ class Gem::AbstractCommand < Gem::Command
|
|
45
40
|
if URI.parse( "#{url}" ).host != nil
|
46
41
|
config.url = url
|
47
42
|
|
48
|
-
say
|
43
|
+
say "The Nexus URL has been stored in #{config}"
|
49
44
|
else
|
50
45
|
raise 'no URL given'
|
51
46
|
end
|
@@ -82,9 +77,9 @@ class Gem::AbstractCommand < Gem::Command
|
|
82
77
|
unless config.always_prompt?
|
83
78
|
config.authorization = @authorization
|
84
79
|
if @authorization
|
85
|
-
say "Your Nexus credentials
|
80
|
+
say "Your Nexus credentials have been stored in #{config}"
|
86
81
|
else
|
87
|
-
say "Your Nexus credentials
|
82
|
+
say "Your Nexus credentials have been deleted from #{config}"
|
88
83
|
end
|
89
84
|
end
|
90
85
|
end
|
data/lib/commands/nexus.rb
CHANGED
@@ -46,13 +46,8 @@ class Gem::Commands::NexusCommand < Gem::AbstractCommand
|
|
46
46
|
options[ :nexus_secrets ] = false
|
47
47
|
end
|
48
48
|
|
49
|
-
# backward compatibility
|
50
|
-
add_option( '--password', 'DEPRECATED' ) do |value, options|
|
51
|
-
options[ :nexus_prompt_all ] = value
|
52
|
-
end
|
53
|
-
|
54
49
|
add_option( '--[no-]prompt',
|
55
|
-
'always prompt for the credentials.' ) do |value, options|
|
50
|
+
'always prompt for the credentials. this is helpful to reset your username/password for a specific host.' ) do |value, options|
|
56
51
|
options[ :nexus_prompt_all ] = value
|
57
52
|
end
|
58
53
|
|
data/lib/nexus/version.rb
CHANGED
@@ -192,7 +192,7 @@ class AbstractCommandTest < CommandTest
|
|
192
192
|
should "say that we signed in" do
|
193
193
|
@command.sign_in
|
194
194
|
assert_received(@command) { |command| command.say("Enter your Nexus credentials") }
|
195
|
-
assert_received(@command) { |command| command.say("Your Nexus credentials
|
195
|
+
assert_received(@command) { |command| command.say("Your Nexus credentials have been stored in pkg/configsign") }
|
196
196
|
assert_equal( @command.config.authorization,
|
197
197
|
"Basic dXNlcm5hbWU6cGFzc3dvcmQgMDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODk=" )
|
198
198
|
end
|
@@ -218,7 +218,7 @@ class AbstractCommandTest < CommandTest
|
|
218
218
|
should "say that we configured the url" do
|
219
219
|
@command.configure_url
|
220
220
|
assert_received(@command) { |command| command.say("Enter the URL of the rubygems repository on a Nexus server") }
|
221
|
-
assert_received(@command) { |command| command.say("The Nexus URL has been stored in
|
221
|
+
assert_received(@command) { |command| command.say("The Nexus URL has been stored in pkg/configurl") }
|
222
222
|
assert_equal( @command.config.url, "http://url" )
|
223
223
|
end
|
224
224
|
end
|
metadata
CHANGED
@@ -1,106 +1,106 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Quaranto
|
8
8
|
- Christian Meier
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-08-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - ~>
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '10.1'
|
21
|
-
|
21
|
+
type: :development
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
24
|
requirements:
|
23
|
-
- - ~>
|
25
|
+
- - "~>"
|
24
26
|
- !ruby/object:Gem::Version
|
25
27
|
version: '10.1'
|
26
|
-
prerelease: false
|
27
|
-
type: :development
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: ruby-maven
|
30
|
-
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - ~>
|
32
|
+
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: 3.1.0.0.0
|
35
|
-
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
38
|
requirements:
|
37
|
-
- - ~>
|
39
|
+
- - "~>"
|
38
40
|
- !ruby/object:Gem::Version
|
39
41
|
version: 3.1.0.0.0
|
40
|
-
prerelease: false
|
41
|
-
type: :development
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: shoulda
|
44
|
-
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - ~>
|
46
|
+
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '3.1'
|
49
|
-
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
52
|
requirements:
|
51
|
-
- - ~>
|
53
|
+
- - "~>"
|
52
54
|
- !ruby/object:Gem::Version
|
53
55
|
version: '3.1'
|
54
|
-
prerelease: false
|
55
|
-
type: :development
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: rr
|
58
|
-
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- - ~>
|
60
|
+
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '1.1'
|
63
|
-
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
64
66
|
requirements:
|
65
|
-
- - ~>
|
67
|
+
- - "~>"
|
66
68
|
- !ruby/object:Gem::Version
|
67
69
|
version: '1.1'
|
68
|
-
prerelease: false
|
69
|
-
type: :development
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: activesupport
|
72
|
-
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- - ~>
|
74
|
+
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: 4.0.0
|
77
|
-
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
80
|
requirements:
|
79
|
-
- - ~>
|
81
|
+
- - "~>"
|
80
82
|
- !ruby/object:Gem::Version
|
81
83
|
version: 4.0.0
|
82
|
-
prerelease: false
|
83
|
-
type: :development
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: webmock
|
86
|
-
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- - ~>
|
88
|
+
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '1.8'
|
91
|
-
- - <
|
91
|
+
- - "<"
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '1.16'
|
94
|
-
|
94
|
+
type: :development
|
95
|
+
prerelease: false
|
96
|
+
version_requirements: !ruby/object:Gem::Requirement
|
95
97
|
requirements:
|
96
|
-
- - ~>
|
98
|
+
- - "~>"
|
97
99
|
- !ruby/object:Gem::Version
|
98
100
|
version: '1.8'
|
99
|
-
- - <
|
101
|
+
- - "<"
|
100
102
|
- !ruby/object:Gem::Version
|
101
103
|
version: '1.16'
|
102
|
-
prerelease: false
|
103
|
-
type: :development
|
104
104
|
description: Adds a command to RubyGems for uploading gems to a nexus server.
|
105
105
|
email:
|
106
106
|
- nick@quaran.to
|
@@ -113,49 +113,46 @@ files:
|
|
113
113
|
- MIT-LICENSE
|
114
114
|
- Rakefile
|
115
115
|
- bin/nbundle
|
116
|
-
- lib/rubygems_plugin.rb
|
117
|
-
- lib/bundler/rubygems_mirror.rb
|
118
|
-
- lib/bundler/monkey_patch.rb
|
119
|
-
- lib/nexus/version.rb
|
120
|
-
- lib/nexus/config_file.rb
|
121
|
-
- lib/nexus/cipher.rb
|
122
|
-
- lib/nexus/config.rb
|
123
116
|
- lib/commands/abstract_command.rb
|
124
117
|
- lib/commands/nexus.rb
|
125
|
-
-
|
126
|
-
-
|
127
|
-
-
|
128
|
-
-
|
118
|
+
- lib/nexus/cipher.rb
|
119
|
+
- lib/nexus/config.rb
|
120
|
+
- lib/nexus/config_file.rb
|
121
|
+
- lib/nexus/version.rb
|
122
|
+
- lib/rubygems_plugin.rb
|
129
123
|
- test/abstract_command_test.rb
|
124
|
+
- test/cipher_test.rb
|
125
|
+
- test/command_helper.rb
|
130
126
|
- test/config_test.rb
|
131
|
-
|
127
|
+
- test/configfile_test.rb
|
128
|
+
- test/nexus_command_test.rb
|
129
|
+
homepage: https://github.com/sonatype/nexus-gem
|
132
130
|
licenses:
|
133
131
|
- MIT-LICENSE
|
134
132
|
metadata: {}
|
135
|
-
post_install_message: "\n========================================================================\n\
|
136
|
-
\
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
\n========================================================================\n\n"
|
133
|
+
post_install_message: "\n========================================================================\n\n
|
134
|
+
\ Thanks for installing Nexus gem! You can now run:\n\n gem nexus publish
|
135
|
+
your gems onto Nexus server\n\n nbundle a bundler fork with mirror
|
136
|
+
support. for bundler before 1.5.0\n \nadd a mirror with:\n\n
|
137
|
+
\ bundle config mirror.http://rubygems.org http://localhost:8081/nexus/content/repositories/rubygems.org\n\nfor
|
138
|
+
bundler before 1.5.0 use 'nbundle' instead of 'bundle' to use the mirror\n\n========================================================================\n\n"
|
142
139
|
rdoc_options: []
|
143
140
|
require_paths:
|
144
141
|
- lib
|
145
142
|
required_ruby_version: !ruby/object:Gem::Requirement
|
146
143
|
requirements:
|
147
|
-
- -
|
144
|
+
- - ">="
|
148
145
|
- !ruby/object:Gem::Version
|
149
146
|
version: '0'
|
150
147
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
151
148
|
requirements:
|
152
|
-
- -
|
149
|
+
- - ">="
|
153
150
|
- !ruby/object:Gem::Version
|
154
151
|
version: '0'
|
155
152
|
requirements: []
|
156
|
-
rubyforge_project:
|
157
|
-
rubygems_version: 2.1
|
158
|
-
signing_key:
|
153
|
+
rubyforge_project:
|
154
|
+
rubygems_version: 2.5.1
|
155
|
+
signing_key:
|
159
156
|
specification_version: 4
|
160
157
|
summary: Gem Command to interact with Nexus server
|
161
158
|
test_files: []
|
data/lib/bundler/monkey_patch.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'bundler'
|
2
|
-
require 'bundler/fetcher'
|
3
|
-
require 'bundler/rubygems_integration'
|
4
|
-
require 'bundler/rubygems_mirror'
|
5
|
-
module Bundler
|
6
|
-
class RubygemsIntegration
|
7
|
-
def download_gem(spec, uri, path)
|
8
|
-
uri = RubygemsMirror.to_uri(uri)
|
9
|
-
Gem::RemoteFetcher.fetcher.download(spec, uri, path)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
module Bundler
|
14
|
-
# Handles all the fetching with the rubygems server
|
15
|
-
class Fetcher
|
16
|
-
alias :initialize_old :initialize
|
17
|
-
|
18
|
-
def initialize(remote_uri)
|
19
|
-
initialize_old RubygemsMirror.to_uri(remote_uri)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
module Bundler
|
2
|
-
class RubygemsMirror
|
3
|
-
|
4
|
-
private
|
5
|
-
|
6
|
-
def self.mirrors
|
7
|
-
@mirrors ||= Bundler.settings.all.inject({}) do |h, k|
|
8
|
-
if k =~ /^mirror./
|
9
|
-
uri = add_slash(k.sub(/^mirror./, ''))
|
10
|
-
h[uri] = URI.parse(Bundler.settings[k])
|
11
|
-
end
|
12
|
-
h
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
def self.add_slash(uri)
|
17
|
-
uri = uri.to_s
|
18
|
-
uri =~ /\/$/ ? uri : uri + '/'
|
19
|
-
end
|
20
|
-
|
21
|
-
public
|
22
|
-
|
23
|
-
def self.to_uri(uri)
|
24
|
-
mirrors[add_slash(uri)] || uri
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|