summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/uninstall_command.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-10 08:00:19 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-10 08:00:19 +0000
commit5d613c83ccb6992c6b99e5a23512719604bbdae9 (patch)
tree8f1591102f7c8e1a27bd3c30b43567ced67e2519 /lib/rubygems/commands/uninstall_command.rb
parentc12b28936266c205d174458f0bd21766154048f7 (diff)
Import RubyGems r1601. [ruby-core:15381].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/commands/uninstall_command.rb')
-rw-r--r--lib/rubygems/commands/uninstall_command.rb16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/rubygems/commands/uninstall_command.rb b/lib/rubygems/commands/uninstall_command.rb
index 7d2908836c..2d9c46ee52 100644
--- a/lib/rubygems/commands/uninstall_command.rb
+++ b/lib/rubygems/commands/uninstall_command.rb
@@ -18,18 +18,23 @@ module Gem
options[:all] = value
end
- add_option('-i', '--[no-]ignore-dependencies',
- 'Ignore dependency requirements while',
- 'uninstalling') do |value, options|
+ add_option('-I', '--[no-]ignore-dependencies',
+ 'Ignore dependency requirements while',
+ 'uninstalling') do |value, options|
options[:ignore] = value
end
- add_option('-x', '--[no-]executables',
+ add_option('-x', '--[no-]executables',
'Uninstall applicable executables without',
'confirmation') do |value, options|
options[:executables] = value
end
+ add_option('-i', '--install-dir DIR',
+ 'Directory to uninstall gem from') do |value, options|
+ options[:install_dir] = File.expand_path(value)
+ end
+
add_version_option
add_platform_option
end
@@ -39,7 +44,8 @@ module Gem
end
def defaults_str # :nodoc:
- "--version '#{Gem::Requirement.default}' --no-force"
+ "--version '#{Gem::Requirement.default}' --no-force " \
+ "--install-dir #{Gem.dir}"
end
def usage # :nodoc: