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

ruby-changes:71854

From: Hiroshi <ko1@a...>
Date: Wed, 18 May 2022 10:03:02 +0900 (JST)
Subject: [ruby-changes:71854] 8ba584ff3c (ruby_3_1): Merge RubyGems-3.3.11 and Bundler-2.3.11

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

From 8ba584ff3c085251865c11c5d7deef0ddfc6d0ff Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Mon, 2 May 2022 19:42:15 +0900
Subject: Merge RubyGems-3.3.11 and Bundler-2.3.11

---
 lib/bundler.rb                                     |   2 +-
 lib/bundler/build_metadata.rb                      |   2 +-
 lib/bundler/cli.rb                                 |   2 +-
 lib/bundler/cli/info.rb                            |   2 +-
 lib/bundler/cli/init.rb                            |   2 +-
 lib/bundler/cli/show.rb                            |   2 +-
 lib/bundler/installer.rb                           |   4 +-
 lib/bundler/man/bundle-config.1                    |   6 +-
 lib/bundler/man/bundle-config.1.ronn               |  14 +-
 lib/bundler/shared_helpers.rb                      |   8 +-
 lib/bundler/source/metadata.rb                     |   2 +-
 lib/bundler/templates/Executable                   |   6 +-
 lib/bundler/templates/Executable.bundler           |   2 +-
 lib/bundler/templates/Executable.standalone        |   6 +-
 .../templates/newgem/github/workflows/main.yml.tt  |   2 +-
 lib/bundler/templates/newgem/newgem.gemspec.tt     |   2 +-
 lib/bundler/version.rb                             |   2 +-
 lib/rubygems.rb                                    |   4 +-
 lib/rubygems/commands/setup_command.rb             |   2 +-
 lib/rubygems/ext.rb                                |   1 +
 lib/rubygems/ext/builder.rb                        |   3 +
 lib/rubygems/ext/cargo_builder.rb                  | 305 +++++++++++++++++
 lib/rubygems/ext/ext_conf_builder.rb               |   2 +-
 lib/rubygems/gemcutter_utilities.rb                |  39 ++-
 lib/rubygems/request.rb                            |   2 +-
 lib/rubygems/source/git.rb                         |   1 +
 libexec/bundler                                    |   2 +-
 spec/bundler/commands/install_spec.rb              |   2 +-
 spec/bundler/commands/update_spec.rb               |  30 +-
 spec/bundler/install/gemfile/git_spec.rb           |   8 +-
 spec/bundler/install/gemfile/path_spec.rb          |   2 +-
 spec/bundler/install/gems/compact_index_spec.rb    |   4 +-
 spec/bundler/install/gems/resolving_spec.rb        |   6 +-
 spec/bundler/install/gems/standalone_spec.rb       |   4 +-
 spec/bundler/install/gems/sudo_spec.rb             |   2 +-
 spec/bundler/lock/lockfile_spec.rb                 |   2 +-
 test/rubygems/helper.rb                            |  10 +-
 test/rubygems/test_gem.rb                          |   2 +-
 test/rubygems/test_gem_command_manager.rb          |   2 +-
 test/rubygems/test_gem_commands_help_command.rb    |   2 +-
 test/rubygems/test_gem_commands_push_command.rb    |   5 +
 test/rubygems/test_gem_commands_setup_command.rb   |   2 +-
 test/rubygems/test_gem_commands_signin_command.rb  | 111 +++++-
 test/rubygems/test_gem_dependency_installer.rb     |   4 +-
 test/rubygems/test_gem_ext_builder.rb              |   2 +-
 test/rubygems/test_gem_ext_cargo_builder.rb        | 148 ++++++++
 .../custom_name/.gitignore                         |   1 +
 .../custom_name/Cargo.lock                         | 374 +++++++++++++++++++++
 .../custom_name/Cargo.toml                         |  10 +
 .../custom_name/build.rb                           |  21 ++
 .../custom_name/custom_name.gemspec                |  10 +
 .../custom_name/src/lib.rs                         |  30 ++
 .../rust_ruby_example/.gitignore                   |   1 +
 .../rust_ruby_example/Cargo.lock                   | 374 +++++++++++++++++++++
 .../rust_ruby_example/Cargo.toml                   |  10 +
 .../rust_ruby_example/build.rb                     |  21 ++
 .../rust_ruby_example/rust_ruby_example.gemspec    |   8 +
 .../rust_ruby_example/src/lib.rs                   |  42 +++
 test/rubygems/test_gem_ext_cmake_builder.rb        |   2 +
 test/rubygems/test_gem_gemcutter_utilities.rb      |   6 +-
 test/rubygems/test_gem_source_git.rb               |   1 +
 test/rubygems/test_gem_specification.rb            |   2 +-
 test/rubygems/test_project_sanity.rb               |   2 +-
 test/rubygems/test_require.rb                      |   2 +-
 tool/bundler/dev_gems.rb                           |   2 +-
 tool/bundler/dev_gems.rb.lock                      |  18 +-
 tool/bundler/rubocop_gems.rb.lock                  |   2 +-
 tool/bundler/standard_gems.rb.lock                 |   2 +-
 tool/bundler/test_gems.rb.lock                     |   2 +-
 69 files changed, 1601 insertions(+), 117 deletions(-)
 create mode 100644 lib/rubygems/ext/cargo_builder.rb
 create mode 100644 test/rubygems/test_gem_ext_cargo_builder.rb
 create mode 100644 test/rubygems/test_gem_ext_cargo_builder/custom_name/.gitignore
 create mode 100644 test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.lock
 create mode 100644 test/rubygems/test_gem_ext_cargo_builder/custom_name/Cargo.toml
 create mode 100644 test/rubygems/test_gem_ext_cargo_builder/custom_name/build.rb
 create mode 100644 test/rubygems/test_gem_ext_cargo_builder/custom_name/custom_name.gemspec
 create mode 100644 test/rubygems/test_gem_ext_cargo_builder/custom_name/src/lib.rs
 create mode 100644 test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/.gitignore
 create mode 100644 test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.lock
 create mode 100644 test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/Cargo.toml
 create mode 100644 test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/build.rb
 create mode 100644 test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/rust_ruby_example.gemspec
 create mode 100644 test/rubygems/test_gem_ext_cargo_builder/rust_ruby_example/src/lib.rs

diff --git a/lib/bundler.rb b/lib/bundler.rb
index 0025dee720..47b352177d 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -370,7 +370,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/lib/bundler.rb#L370
 
       if env.key?("RUBYLIB")
         rubylib = env["RUBYLIB"].split(File::PATH_SEPARATOR)
-        rubylib.delete(File.expand_path("..", __FILE__))
+        rubylib.delete(__dir__)
         env["RUBYLIB"] = rubylib.join(File::PATH_SEPARATOR)
       end
 
diff --git a/lib/bundler/build_metadata.rb b/lib/bundler/build_metadata.rb
index 0846e82e06..8bffb2fae7 100644
--- a/lib/bundler/build_metadata.rb
+++ b/lib/bundler/build_metadata.rb
@@ -27,7 +27,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/build_metadata.rb#L27
 
       # If Bundler has been installed without its .git directory and without a
       # commit instance variable then we can't determine its commits SHA.
-      git_dir = File.join(File.expand_path("../../../..", __FILE__), ".git")
+      git_dir = File.expand_path("../../../.git", __dir__)
       if File.directory?(git_dir)
         return @git_commit_sha = Dir.chdir(git_dir) { `git rev-parse --short HEAD`.strip.freeze }
       end
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 922ba469a4..e1c284130b 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -610,7 +610,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli.rb#L610
     private :gem
 
     def self.source_root
-      File.expand_path(File.join(File.dirname(__FILE__), "templates"))
+      File.expand_path("templates", __dir__)
     end
 
     desc "clean [OPTIONS]", "Cleans up unused gems in your bundler directory", :hide => true
diff --git a/lib/bundler/cli/info.rb b/lib/bundler/cli/info.rb
index 38bc008cb5..0545ce8c75 100644
--- a/lib/bundler/cli/info.rb
+++ b/lib/bundler/cli/info.rb
@@ -47,7 +47,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli/info.rb#L47
     def print_gem_path(spec)
       name = spec.name
       if name == "bundler"
-        path = File.expand_path("../../../..", __FILE__)
+        path = File.expand_path("../../..", __dir__)
       else
         path = spec.full_gem_path
         if spec.deleted_gem?
diff --git a/lib/bundler/cli/init.rb b/lib/bundler/cli/init.rb
index d851d02d42..e4f8229c48 100644
--- a/lib/bundler/cli/init.rb
+++ b/lib/bundler/cli/init.rb
@@ -32,7 +32,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli/init.rb#L32
           file << spec.to_gemfile
         end
       else
-        FileUtils.cp(File.expand_path("../../templates/#{gemfile}", __FILE__), gemfile)
+        FileUtils.cp(File.expand_path("../templates/#{gemfile}", __dir__), gemfile)
       end
 
       puts "Writing new #{gemfile} to #{SharedHelpers.pwd}/#{gemfile}"
diff --git a/lib/bundler/cli/show.rb b/lib/bundler/cli/show.rb
index 5eaaba1ef7..2df13db1fa 100644
--- a/lib/bundler/cli/show.rb
+++ b/lib/bundler/cli/show.rb
@@ -18,7 +18,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli/show.rb#L18
 
       if gem_name
         if gem_name == "bundler"
-          path = File.expand_path("../../../..", __FILE__)
+          path = File.expand_path("../../..", __dir__)
         else
           spec = Bundler::CLI::Common.select_spec(gem_name, :regex_match)
           return unless spec
diff --git a/lib/bundler/installer.rb b/lib/bundler/installer.rb
index 61bf1e06d4..ca9df4a21e 100644
--- a/lib/bundler/installer.rb
+++ b/lib/bundler/installer.rb
@@ -119,7 +119,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/installer.rb#L119
       relative_gemfile_path = relative_gemfile_path
       ruby_command = Thor::Util.ruby_command
       ruby_command = ruby_command
-      template_path = File.expand_path("../templates/Executable", __FILE__)
+      template_path = File.expand_path("templates/Executable", __dir__)
       if spec.name == "bundler"
         template_path += ".bundler"
         spec.executables = %(bundle)
@@ -172,7 +172,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/installer.rb#L172
       end
       standalone_path = Bundler.root.join(path).relative_path_from(bin_path)
       standalone_path = standalone_path
-      template = File.read(File.ex (... truncated)

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

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