[前][次][番号順一覧][スレッド一覧]

ruby-changes:61097

From: David <ko1@a...>
Date: Fri, 8 May 2020 14:14:06 +0900 (JST)
Subject: [ruby-changes:61097] b1541606a2 (master): [rubygems/rubygems] Fix incorrect `gem uninstall --all` message

https://git.ruby-lang.org/ruby.git/commit/?id=b1541606a2

From b1541606a28872327716243a5b31706c0c2e3c22 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Sun, 5 Apr 2020 13:42:08 +0200
Subject: [rubygems/rubygems] Fix incorrect `gem uninstall --all` message

Currently `gem uninstall --all` shows the following incorrect message
after completion:

```
INFO:  Uninstalled all gems in
```

Now it shows something that actually makes sense like:

```
INFO:  Uninstalled all gems in /home/deivid/Code/rubygems/tmp/test_rubygems_6986/gemhome
```

https://github.com/rubygems/rubygems/commit/8fa05e8f8c

diff --git a/lib/rubygems/commands/uninstall_command.rb b/lib/rubygems/commands/uninstall_command.rb
index 68e048c..c1a9dbb 100644
--- a/lib/rubygems/commands/uninstall_command.rb
+++ b/lib/rubygems/commands/uninstall_command.rb
@@ -143,7 +143,7 @@ that is a dependency of an existing gem.  You can use the https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/uninstall_command.rb#L143
       uninstall_gem spec.name
     end
 
-    alert "Uninstalled all gems in #{options[:install_dir]}"
+    alert "Uninstalled all gems in #{options[:install_dir] || Gem.dir}"
   end
 
   def uninstall_specific
diff --git a/test/rubygems/test_gem_commands_uninstall_command.rb b/test/rubygems/test_gem_commands_uninstall_command.rb
index 1f71b4c..ee63847 100644
--- a/test/rubygems/test_gem_commands_uninstall_command.rb
+++ b/test/rubygems/test_gem_commands_uninstall_command.rb
@@ -361,6 +361,7 @@ class TestGemCommandsUninstallCommand < Gem::InstallerTestCase https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_commands_uninstall_command.rb#L361
     end
 
     assert_equal %w[default-1], Gem::Specification.all_names.sort
+    assert_equal "INFO:  Uninstalled all gems in #{@gemhome}", @ui.output.split("\n").last
   end
 
   def test_execute_outside_gem_home
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]