From 0156b7416cf05880460ec6a3c2cc7b7c2ea863db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 26 Dec 2023 20:21:26 +0100 Subject: [PATCH] [rubygems/rubygems] Always avoid "Updating rubygems-update" message The fact that under the hood the upgrade is done through a rubygems-update gem is an implementation detail that does not really help users to know. Plus, it reads a bit weird. https://github.com/rubygems/rubygems/commit/0fa5c50258 --- lib/rubygems/commands/update_command.rb | 2 +- test/rubygems/test_gem_commands_update_command.rb | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb index 144f67acc5..3d6fecaa40 100644 --- a/lib/rubygems/commands/update_command.rb +++ b/lib/rubygems/commands/update_command.rb @@ -244,7 +244,7 @@ command to remove old versions. @installer = Gem::DependencyInstaller.new update_options - say "Updating #{name}" unless options[:system] && options[:silent] + say "Updating #{name}" unless options[:system] begin @installer.install name, Gem::Requirement.new(version) rescue Gem::InstallError, Gem::DependencyError => e diff --git a/test/rubygems/test_gem_commands_update_command.rb b/test/rubygems/test_gem_commands_update_command.rb index db00bd40c9..2683840f2e 100644 --- a/test/rubygems/test_gem_commands_update_command.rb +++ b/test/rubygems/test_gem_commands_update_command.rb @@ -79,7 +79,6 @@ class TestGemCommandsUpdateCommand < Gem::TestCase end out = @ui.output.split "\n" - assert_equal "Updating rubygems-update", out.shift assert_equal "Installing RubyGems 9", out.shift assert_equal "RubyGems system software updated", out.shift @@ -123,7 +122,6 @@ class TestGemCommandsUpdateCommand < Gem::TestCase end out = @ui.output.split "\n" - assert_equal "Updating rubygems-update", out.shift assert_empty out err = @ui.error.split "\n" @@ -179,7 +177,6 @@ class TestGemCommandsUpdateCommand < Gem::TestCase end out = @ui.output.split "\n" - assert_equal "Updating rubygems-update", out.shift assert_equal "Installing RubyGems 9", out.shift assert_equal "RubyGems system software updated", out.shift @@ -213,7 +210,6 @@ class TestGemCommandsUpdateCommand < Gem::TestCase end out = @ui.output.split "\n" - assert_equal "Updating rubygems-update", out.shift assert_equal "Installing RubyGems 9", out.shift assert_equal "RubyGems system software updated", out.shift @@ -270,7 +266,6 @@ class TestGemCommandsUpdateCommand < Gem::TestCase end out = @ui.output.split "\n" - assert_equal "Updating rubygems-update", out.shift assert_equal "Installing RubyGems 8", out.shift assert_equal "RubyGems system software updated", out.shift @@ -381,7 +376,6 @@ class TestGemCommandsUpdateCommand < Gem::TestCase end out = @ui.output.split "\n" - assert_equal "Updating rubygems-update", out.shift assert_equal "Installing RubyGems 9", out.shift assert_equal "RubyGems system software updated", out.shift