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

@ -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
@ -282,7 +282,7 @@ command to remove old versions.
check_oldest_rubygems version
installed_gems = Gem::Specification.find_all_by_name "rubygems-update", requirement
installed_gems = update_gem("rubygems-update", version) if installed_gems.empty? || installed_gems.first.version != version
installed_gems = update_gem("rubygems-update", requirement) if installed_gems.empty? || installed_gems.first.version != version
return if installed_gems.empty?
install_rubygems installed_gems.first
@ -294,9 +294,7 @@ command to remove old versions.
args << "--prefix" << Gem.prefix if Gem.prefix
args << "--no-document" unless options[:document].include?("rdoc") || options[:document].include?("ri")
args << "--no-format-executable" if options[:no_format_executable]
args << "--previous-version" << Gem::VERSION if
options[:system] == true ||
Gem::Version.new(options[:system]) >= Gem::Version.new(2)
args << "--previous-version" << Gem::VERSION
args
end