aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems/command_manager.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-13 19:58:57 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-13 19:58:57 +0000
commit1daa0b113d853bfa57b776cc569939b61ca14292 (patch)
treef8c4acb08a551820299dff2b13966d6ac38d31e4 /lib/rubygems/command_manager.rb
parent85995e88d49c442b5b113c2676456133e79f5c02 (diff)
downloadruby-1daa0b113d853bfa57b776cc569939b61ca14292.tar.gz
* lib/rubygems: Update to RubyGems 2.1.3
Fixed installing platform gems Restored concurrent requires Fixed installing gems with extensions with --install-dir Fixed `gem fetch -v` to install the latest version Fixed installing gems with "./" in their files entries * test/rubygems/test_gem_package.rb: Tests for the above. * NEWS: Updated for RubyGems 2.1.3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/command_manager.rb')
-rw-r--r--lib/rubygems/command_manager.rb77
1 files changed, 40 insertions, 37 deletions
diff --git a/lib/rubygems/command_manager.rb b/lib/rubygems/command_manager.rb
index fdee064fed..2af582177d 100644
--- a/lib/rubygems/command_manager.rb
+++ b/lib/rubygems/command_manager.rb
@@ -33,39 +33,6 @@ class Gem::CommandManager
include Gem::UserInteraction
- BUILTIN_COMMANDS = [ # :nodoc:
- :build,
- :cert,
- :check,
- :cleanup,
- :contents,
- :dependency,
- :environment,
- :fetch,
- :generate_index,
- :help,
- :install,
- :list,
- :lock,
- :mirror,
- :outdated,
- :owner,
- :pristine,
- :push,
- :query,
- :rdoc,
- :search,
- :server,
- :sources,
- :specification,
- :stale,
- :uninstall,
- :unpack,
- :update,
- :which,
- :yank,
- ]
-
##
# Return the authoritative instance of the command manager.
@@ -94,10 +61,36 @@ class Gem::CommandManager
def initialize
require 'timeout'
@commands = {}
-
- BUILTIN_COMMANDS.each do |name|
- register_command name
- end
+ register_command :build
+ register_command :cert
+ register_command :check
+ register_command :cleanup
+ register_command :contents
+ register_command :dependency
+ register_command :environment
+ register_command :fetch
+ register_command :generate_index
+ register_command :help
+ register_command :install
+ register_command :list
+ register_command :lock
+ register_command :mirror
+ register_command :outdated
+ register_command :owner
+ register_command :pristine
+ register_command :push
+ register_command :query
+ register_command :rdoc
+ register_command :search
+ register_command :server
+ register_command :sources
+ register_command :specification
+ register_command :stale
+ register_command :uninstall
+ register_command :unpack
+ register_command :update
+ register_command :which
+ register_command :yank
end
##
@@ -139,6 +132,14 @@ class Gem::CommandManager
alert_error "While executing gem ... (#{ex.class})\n #{ex.to_s}"
ui.backtrace ex
+ if Gem.configuration.really_verbose and \
+ ex.kind_of?(Gem::Exception) and ex.source_exception
+ e = ex.source_exception
+
+ ui.errs.puts "Because of: (#{e.class})\n #{e.to_s}"
+ ui.backtrace e
+ end
+
terminate_interaction(1)
rescue Interrupt
alert_error "Interrupted"
@@ -146,6 +147,8 @@ class Gem::CommandManager
end
def process_args(args, build_args=nil)
+ args = args.to_str.split(/\s+/) if args.respond_to?(:to_str)
+
if args.empty? then
say Gem::Command::HELP
terminate_interaction 1