Merge RubyGems 3.5.5 and Bundler 2.5.5 (#9676)

* Merge RubyGems-3.5.4 and Bundler-2.5.4

* Merge RubyGems-3.5.5 and Bundler-2.5.5

* Make tests play with upstream Ruby tests

CI broke in https://github.com/ruby/ruby/pull/9604 because if any Ruby
tests run `require 'net/http'`, they will pollute the
`$LOADED_FEATURES` for the RubyGems tests. We can fix this by renaming
the test default gem from `net-http` to `my-http`.

See https://github.com/rubygems/rubygems/pull/7379#issuecomment-1901241299
for more details.

---------

Co-authored-by: Stan Hu <stanhu@gmail.com>
This commit is contained in:
Hiroshi SHIBATA 2024-02-05 23:51:04 +09:00 committed by GitHub
parent 7f97e3540c
commit ac526abcd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 323 additions and 128 deletions

View file

@ -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"
@ -132,6 +130,34 @@ class TestGemCommandsUpdateCommand < Gem::TestCase
assert_empty err
end
def test_execute_system_when_latest_does_not_support_your_ruby_but_previous_one_does
spec_fetcher do |fetcher|
fetcher.download "rubygems-update", 9 do |s|
s.files = %w[setup.rb]
s.required_ruby_version = "> 9"
end
fetcher.download "rubygems-update", 8 do |s|
s.files = %w[setup.rb]
end
end
@cmd.options[:args] = []
@cmd.options[:system] = true
use_ui @ui do
@cmd.execute
end
err = @ui.error.split "\n"
assert_empty err
out = @ui.output.split "\n"
assert_equal "Installing RubyGems 8", out.shift
assert_equal "RubyGems system software updated", out.shift
assert_empty out
end
def test_execute_system_multiple
spec_fetcher do |fetcher|
fetcher.download "rubygems-update", 8 do |s|
@ -151,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
@ -185,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
@ -242,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
@ -353,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