diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-26 02:06:00 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-26 02:06:00 +0000 |
commit | 8b424513fd43c398aaeea5dede8bbc5c51602773 (patch) | |
tree | b1509d7a77a52206f7825520c99a693f7818a8a4 /lib/rubygems/uninstaller.rb | |
parent | dbf3fb3d8e6e10e2ac2af19937e0016a4815ca50 (diff) | |
download | ruby-8b424513fd43c398aaeea5dede8bbc5c51602773.tar.gz |
Upgrade to RubyGems 1.2.0 r1824. Incorporates [ruby-core:17353].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/uninstaller.rb')
-rw-r--r-- | lib/rubygems/uninstaller.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb index c5ae47b7eb..2ad961972b 100644 --- a/lib/rubygems/uninstaller.rb +++ b/lib/rubygems/uninstaller.rb @@ -30,7 +30,7 @@ class Gem::Uninstaller @force_executables = options[:executables] @force_all = options[:all] @force_ignore = options[:ignore] - @bin_dir = options[:bin_dir] + @bin_dir = options[:bin_dir] end ## @@ -41,17 +41,17 @@ class Gem::Uninstaller list = Gem.source_index.search(/^#{@gem}$/, @version) if list.empty? then - raise Gem::InstallError, "Unknown gem #{@gem}-#{@version}" + raise Gem::InstallError, "Unknown gem #{@gem} #{@version}" elsif list.size > 1 && @force_all - remove_all(list.dup) + remove_all(list.dup) remove_executables(list.last) - elsif list.size > 1 - say + elsif list.size > 1 + say gem_names = list.collect {|gem| gem.full_name} + ["All versions"] gem_name, index = choose_from_list("Select gem to uninstall:", gem_names) if index == list.size - remove_all(list.dup) + remove_all(list.dup) remove_executables(list.last) elsif index >= 0 && index < list.size to_remove = list[index] @@ -65,7 +65,7 @@ class Gem::Uninstaller remove_executables(list.last) end end - + ## # Removes installed executables and batch files (windows only) for # +gemspec+. @@ -111,7 +111,7 @@ class Gem::Uninstaller end end end - + ## # Removes all gems in +list+. # |