Merge the latest stable versions of RubyGems and Bundler to Ruby 3.2.x (#7061)

[Bug #19350]

* Merge RubyGems-3.4.2 and Bundler-2.4.2

* Merge RubyGems-3.4.3 and Bundler-2.4.3

* Generate parser-text.rb of racc when sync it

* Ignore LICENSE files of libraries vendored in rubygems [ci skip]

* Adjust spec of bundler like as `sync_default_gems` [ci skip]

* Fixed a typo

* Removed vendored LICENSE file.

* Update LEGAL sections for pub_grub

* Merge RubyGems-3.4.4 and Bundler-2.4.4

* Merge RubyGems-3.4.5 and Bundler-2.4.5

Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
This commit is contained in:
Hiroshi SHIBATA 2023-01-25 23:32:01 +09:00 committed by GitHub
parent fee5b8f263
commit a22eca8231
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
105 changed files with 1337 additions and 752 deletions

View file

@ -126,6 +126,46 @@ class TestGemCommandManager < Gem::TestCase
@command_manager.unregister_command :crash
end
def test_process_args_with_c_flag
custom_start_point = File.join @tempdir, "nice_folder"
FileUtils.mkdir_p custom_start_point
execution_path = nil
use_ui @ui do
@command_manager[:install].when_invoked do
execution_path = Dir.pwd
true
end
@command_manager.process_args %W[-C #{custom_start_point} install net-scp-4.0.0.gem --local]
end
assert_equal custom_start_point, execution_path
end
def test_process_args_with_c_flag_without_path
use_ui @ui do
assert_raise Gem::MockGemUi::TermError do
@command_manager.process_args %w[-C install net-scp-4.0.0.gem --local]
end
end
assert_match(/install isn't a directory./i, @ui.error)
end
def test_process_args_with_c_flag_path_not_found
custom_start_point = File.join @tempdir, "nice_folder"
FileUtils.mkdir_p custom_start_point
custom_start_point.tr!("_", "-")
use_ui @ui do
assert_raise Gem::MockGemUi::TermError do
@command_manager.process_args %W[-C #{custom_start_point} install net-scp-4.0.0.gem --local]
end
end
assert_match(/#{custom_start_point} isn't a directory./i, @ui.error)
end
def test_process_args_bad_arg
use_ui @ui do
assert_raise Gem::MockGemUi::TermError do

View file

@ -41,6 +41,16 @@ class TestGemCommandsBuildCommand < Gem::TestCase
assert_includes Gem.platforms, Gem::Platform.local
end
def test_handle_deprecated_options
use_ui @ui do
@cmd.handle_options %w[-C ./test/dir]
end
assert_equal "WARNING: The \"-C\" option has been deprecated and will be removed in Rubygems 4.0. " \
"-C is a global flag now. Use `gem -C PATH build GEMSPEC_FILE [options]` instead\n",
@ui.error
end
def test_options_filename
gemspec_file = File.join(@tempdir, @gem.spec_name)

View file

@ -151,18 +151,18 @@ dependencies = [
[[package]]
name = "rb-sys"
version = "0.9.52"
version = "0.9.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02fffdb0162fc4cc1b6509b2d9b32a75f7e7ed392f58bde639e0c33b23e74b97"
checksum = "b3277448b8eee18de8bedb18883ae02dcd60d47922ddfc6ab408def77da0a9b4"
dependencies = [
"rb-sys-build",
]
[[package]]
name = "rb-sys-build"
version = "0.9.52"
version = "0.9.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85d1a236755f879fc155d16d9ba4cd3b1975fd52ef6a28113702ae3881b73c03"
checksum = "c9baae802c93180af02cccb21819589d109070f8e28e14e7070a9ffdeca9b464"
dependencies = [
"bindgen",
"regex",

View file

@ -7,4 +7,4 @@ edition = "2021"
crate-type = ["cdylib"]
[dependencies]
rb-sys = "0.9.52"
rb-sys = "0.9.54"

View file

@ -144,18 +144,18 @@ dependencies = [
[[package]]
name = "rb-sys"
version = "0.9.52"
version = "0.9.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02fffdb0162fc4cc1b6509b2d9b32a75f7e7ed392f58bde639e0c33b23e74b97"
checksum = "b3277448b8eee18de8bedb18883ae02dcd60d47922ddfc6ab408def77da0a9b4"
dependencies = [
"rb-sys-build",
]
[[package]]
name = "rb-sys-build"
version = "0.9.52"
version = "0.9.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85d1a236755f879fc155d16d9ba4cd3b1975fd52ef6a28113702ae3881b73c03"
checksum = "c9baae802c93180af02cccb21819589d109070f8e28e14e7070a9ffdeca9b464"
dependencies = [
"bindgen",
"regex",

View file

@ -7,4 +7,4 @@ edition = "2021"
crate-type = ["cdylib"]
[dependencies]
rb-sys = "0.9.52"
rb-sys = "0.9.54"

View file

@ -1828,7 +1828,7 @@ gem 'other', version
installer = Gem::Installer.at(
gem_with_ill_formated_platform,
:install_dir => @gem_home,
:install_dir => @gemhome,
:user_install => false,
:force => true
)

View file

@ -275,7 +275,7 @@ DEPENDENCIES
Gem::Resolver::LockSet === set
end
refute lockfile_set, "fount a LockSet"
refute lockfile_set, "found a LockSet"
git_set = @set.sets.find do |set|
Gem::Resolver::GitSet === set
@ -318,7 +318,7 @@ DEPENDENCIES
Gem::Resolver::LockSet === set
end
refute lockfile_set, "fount a LockSet"
refute lockfile_set, "found a LockSet"
git_set = @set.sets.find do |set|
Gem::Resolver::GitSet === set
@ -355,7 +355,7 @@ DEPENDENCIES
Gem::Resolver::LockSet === set
end
refute lockfile_set, "fount a LockSet"
refute lockfile_set, "found a LockSet"
git_set = @set.sets.find do |set|
Gem::Resolver::GitSet === set
@ -392,7 +392,7 @@ DEPENDENCIES
Gem::Resolver::LockSet === set
end
refute lockfile_set, "fount a LockSet"
refute lockfile_set, "found a LockSet"
git_set = @set.sets.find do |set|
Gem::Resolver::GitSet === set

View file

@ -680,8 +680,7 @@ class TestGemRequire < Gem::TestCase
require "json"
RUBY
out = Gem::Util.popen({ "GEM_HOME" => @gemhome }, *ruby_with_rubygems_in_load_path, "-e", cmd)
puts out
assert $?.success?
assert_predicate $?, :success?, "Require failed due to #{out}"
end
private