[rubygems/rubygems] add login & logout for the signin & signout commands respectively
https://github.com/rubygems/rubygems/commit/49b491970b
This commit is contained in:
parent
e563c6068e
commit
9c0c66f721
@ -74,6 +74,8 @@ class Gem::CommandManager
|
|||||||
|
|
||||||
ALIAS_COMMANDS = {
|
ALIAS_COMMANDS = {
|
||||||
'i' => 'install',
|
'i' => 'install',
|
||||||
|
'login' => 'signin',
|
||||||
|
'logout' => 'signout',
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -36,6 +36,18 @@ class TestGemCommandManager < Gem::TestCase
|
|||||||
assert_kind_of Gem::Commands::InstallCommand, command
|
assert_kind_of Gem::Commands::InstallCommand, command
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_find_login_alias_command
|
||||||
|
command = @command_manager.find_command 'login'
|
||||||
|
|
||||||
|
assert_kind_of Gem::Commands::SigninCommand, command
|
||||||
|
end
|
||||||
|
|
||||||
|
def test_find_logout_alias_comamnd
|
||||||
|
command = @command_manager.find_command 'logout'
|
||||||
|
|
||||||
|
assert_kind_of Gem::Commands::SignoutCommand, command
|
||||||
|
end
|
||||||
|
|
||||||
def test_find_command_ambiguous_exact
|
def test_find_command_ambiguous_exact
|
||||||
ins_command = Class.new
|
ins_command = Class.new
|
||||||
Gem::Commands.send :const_set, :InsCommand, ins_command
|
Gem::Commands.send :const_set, :InsCommand, ins_command
|
||||||
|
Loading…
x
Reference in New Issue
Block a user