nexus 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/commands/abstract_command.rb +2 -1
- data/test/abstract_command_test.rb +3 -3
- metadata +7 -7
@@ -52,8 +52,9 @@ class Gem::AbstractCommand < Gem::Command
|
|
52
52
|
username = ask("Username: ")
|
53
53
|
password = ask_for_password("Password: ")
|
54
54
|
|
55
|
+
# mimic strict_encode64 which is not there on ruby1.8
|
55
56
|
store_config(:authorization,
|
56
|
-
"Basic #{Base64.encode64(username + ':' + password).
|
57
|
+
"Basic #{Base64.encode64(username + ':' + password).gsub(/\s+/, '')}")
|
57
58
|
|
58
59
|
say "Your Nexus credentials has been stored in ~/.gem/nexus"
|
59
60
|
end
|
@@ -93,7 +93,7 @@ class AbstractCommandTest < CommandTest
|
|
93
93
|
context "signing in" do
|
94
94
|
setup do
|
95
95
|
@username = "username"
|
96
|
-
@password = "password"
|
96
|
+
@password = "password 01234567890123456789012345678901234567890123456789"
|
97
97
|
@key = "key"
|
98
98
|
|
99
99
|
stub(@command).say
|
@@ -106,14 +106,14 @@ class AbstractCommandTest < CommandTest
|
|
106
106
|
@command.sign_in
|
107
107
|
assert_received(@command) { |command| command.ask("Username: ") }
|
108
108
|
assert_received(@command) { |command| command.ask_for_password("Password: ") }
|
109
|
-
assert_received(@command) { |command| command.store_config(:authorization, "Basic
|
109
|
+
assert_received(@command) { |command| command.store_config(:authorization, "Basic dXNlcm5hbWU6cGFzc3dvcmQgMDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODk=") }
|
110
110
|
end
|
111
111
|
|
112
112
|
should "say that we signed in" do
|
113
113
|
@command.sign_in
|
114
114
|
assert_received(@command) { |command| command.say("Enter your Nexus credentials") }
|
115
115
|
assert_received(@command) { |command| command.say("Your Nexus credentials has been stored in ~/.gem/nexus") }
|
116
|
-
assert_received(@command) { |command| command.store_config(:authorization, "Basic
|
116
|
+
assert_received(@command) { |command| command.store_config(:authorization, "Basic dXNlcm5hbWU6cGFzc3dvcmQgMDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODk=") }
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: nexus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.2.
|
5
|
+
version: 0.2.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Nick Quaranto
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-05-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|
@@ -91,13 +91,13 @@ files:
|
|
91
91
|
- Rakefile
|
92
92
|
- bin/nbundle
|
93
93
|
- lib/rubygems_plugin.rb
|
94
|
-
- lib/commands/nexus.rb
|
95
|
-
- lib/commands/abstract_command.rb
|
96
|
-
- lib/bundler/monkey_patch.rb
|
97
94
|
- lib/bundler/rubygems_mirror.rb
|
98
|
-
-
|
99
|
-
-
|
95
|
+
- lib/bundler/monkey_patch.rb
|
96
|
+
- lib/commands/abstract_command.rb
|
97
|
+
- lib/commands/nexus.rb
|
100
98
|
- test/nexus_command_test.rb
|
99
|
+
- test/command_helper.rb
|
100
|
+
- test/abstract_command_test.rb
|
101
101
|
homepage: https://github.com/sonatype/nexus-ruby-support/tree/master/nexus-gem
|
102
102
|
licenses: []
|
103
103
|
post_install_message: "\n========================================================================\n\
|