diff options
-rw-r--r-- | lib/rubygems/command.rb | 6 | ||||
-rw-r--r-- | lib/rubygems/command_manager.rb | 21 | ||||
-rw-r--r-- | test/rubygems/test_gem_command_manager.rb | 40 |
3 files changed, 62 insertions, 5 deletions
@@ -630,7 +630,11 @@ RubyGems is a package manager for Ruby. Usage: gem -h/--help gem -v/--version - gem command [arguments...] [options...] Examples: gem install rake @@ -175,14 +175,20 @@ class Gem::CommandManager when "-v", "--version" then say Gem::VERSION terminate_interaction 0 when /^-/ then alert_error clean_text("Invalid option: #{args.first}. See 'gem --help'.") terminate_interaction 1 else - cmd_name = args.shift.downcase - cmd = find_command cmd_name - cmd.deprecation_warning if cmd.deprecated? - cmd.invoke_with_build_args args, build_args end end @@ -237,4 +243,11 @@ class Gem::CommandManager ui.backtrace e end end end @@ -126,6 +126,46 @@ class TestGemCommandManager < Gem::TestCase @command_manager.unregister_command :crash end def test_process_args_bad_arg use_ui @ui do assert_raise Gem::MockGemUi::TermError do |