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

ruby-changes:71884

From: Hiroshi <ko1@a...>
Date: Fri, 20 May 2022 17:32:33 +0900 (JST)
Subject: [ruby-changes:71884] aeea88174d (master): Merge RubyGems and Bundler HEAD

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

From aeea88174d88264469b406003765c7efdcd53edf Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Fri, 20 May 2022 17:15:15 +0900
Subject: Merge RubyGems and Bundler HEAD

  https://github.com/rubygems/rubygems/commit/125415593ead9ab69a9f0bb5392c9d7ec61b1f51
---
 lib/bundler/cli/common.rb                          |  2 +-
 lib/bundler/definition.rb                          |  4 +--
 lib/bundler/dsl.rb                                 |  2 +-
 lib/bundler/gem_helpers.rb                         |  2 +-
 lib/bundler/resolver.rb                            |  2 +-
 lib/bundler/rubygems_ext.rb                        |  2 +-
 lib/bundler/shared_helpers.rb                      | 10 ++++----
 lib/bundler/source/git.rb                          |  2 +-
 lib/bundler/spec_set.rb                            |  4 +--
 lib/rubygems.rb                                    |  2 +-
 lib/rubygems/commands/pristine_command.rb          |  2 +-
 lib/rubygems/commands/setup_command.rb             |  2 +-
 lib/rubygems/commands/specification_command.rb     |  2 +-
 lib/rubygems/ext/builder.rb                        |  2 +-
 lib/rubygems/gemcutter_utilities.rb                |  2 +-
 lib/rubygems/installer.rb                          |  4 +--
 lib/rubygems/local_remote_options.rb               |  2 +-
 lib/rubygems/query_utils.rb                        |  2 +-
 lib/rubygems/spec_fetcher.rb                       |  4 +--
 lib/rubygems/specification.rb                      |  4 +--
 lib/rubygems/specification_policy.rb               |  2 +-
 lib/rubygems/util.rb                               |  2 +-
 spec/bundler/runtime/inline_spec.rb                |  2 +-
 spec/bundler/spec_helper.rb                        |  4 +++
 spec/bundler/support/path.rb                       |  8 +++---
 spec/bundler/support/rubygems_ext.rb               | 20 ++++++++++++++-
 spec/bundler/support/sudo.rb                       |  4 +++
 test/rubygems/helper.rb                            |  4 +--
 test/rubygems/package/tar_test_case.rb             |  2 +-
 test/rubygems/test_gem.rb                          |  4 +--
 .../rubygems/test_gem_commands_contents_command.rb |  2 +-
 test/rubygems/test_gem_commands_install_command.rb |  4 +--
 test/rubygems/test_gem_config_file.rb              |  6 ++---
 .../custom_name/build.rb                           |  4 +--
 test/rubygems/test_gem_gemcutter_utilities.rb      |  2 +-
 test/rubygems/test_gem_package.rb                  |  2 +-
 test/rubygems/test_gem_remote_fetcher.rb           | 30 +++++++++++-----------
 .../test_gem_request_set_lockfile_parser.rb        |  2 +-
 test/rubygems/test_gem_resolver.rb                 |  2 +-
 test/rubygems/test_gem_resolver_installer_set.rb   |  2 +-
 test/rubygems/test_gem_specification.rb            | 22 ++++++++--------
 test/rubygems/test_require.rb                      | 20 +++++++--------
 test/rubygems/test_rubygems.rb                     |  8 +++---
 43 files changed, 121 insertions(+), 95 deletions(-)

diff --git a/lib/bundler/cli/common.rb b/lib/bundler/cli/common.rb
index 1a469f1d34..b547619c6a 100644
--- a/lib/bundler/cli/common.rb
+++ b/lib/bundler/cli/common.rb
@@ -40,7 +40,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli/common.rb#L40
     end
 
     def self.verbalize_groups(groups)
-      groups.map!{|g| "'#{g}'" }
+      groups.map! {|g| "'#{g}'" }
       group_list = [groups[0...-1].join(", "), groups[-1..-1]].
         reject {|s| s.to_s.empty? }.join(" and ")
       group_str = groups.size == 1 ? "group" : "groups"
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index d862877c2e..4fca763bcc 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -261,7 +261,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/definition.rb#L261
           @locked_specs
         elsif !unlocking? && nothing_changed?
           Bundler.ui.debug("Found no changes, using resolution from the lockfile")
-          SpecSet.new(filter_specs(@locked_specs, @dependencies.select{|dep| @locked_specs[dep].any? }))
+          SpecSet.new(filter_specs(@locked_specs, @dependencies.select {|dep| @locked_specs[dep].any? }))
         else
           last_resolve = converge_locked_specs
           # Run a resolve against the locally available gems
@@ -731,7 +731,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/definition.rb#L731
         end
       end
 
-      SpecSet.new(filter_specs(converged, deps).reject{|s| @unlock[:gems].include?(s.name) })
+      SpecSet.new(filter_specs(converged, deps).reject {|s| @unlock[:gems].include?(s.name) })
     end
 
     def metadata_dependencies
diff --git a/lib/bundler/dsl.rb b/lib/bundler/dsl.rb
index f7922b1fba..8983ef3e2b 100644
--- a/lib/bundler/dsl.rb
+++ b/lib/bundler/dsl.rb
@@ -46,7 +46,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/dsl.rb#L46
       @gemfile = expanded_gemfile_path
       @gemfiles << expanded_gemfile_path
       contents ||= Bundler.read_file(@gemfile.to_s)
-      instance_eval(contents.dup.tap{|x| x.untaint if RUBY_VERSION < "2.7" }, gemfile.to_s, 1)
+      instance_eval(contents.dup.tap {|x| x.untaint if RUBY_VERSION < "2.7" }, gemfile.to_s, 1)
     rescue Exception => e # rubocop:disable Lint/RescueException
       message = "There was an error " \
         "#{e.is_a?(GemfileEvalError) ? "evaluating" : "parsing"} " \
diff --git a/lib/bundler/gem_helpers.rb b/lib/bundler/gem_helpers.rb
index b271b8d229..632698482f 100644
--- a/lib/bundler/gem_helpers.rb
+++ b/lib/bundler/gem_helpers.rb
@@ -48,7 +48,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/gem_helpers.rb#L48
       sorted_matching = matching.sort_by {|spec| platform_specificity_match(spec.platform, platform) }
       exemplary_spec = sorted_matching.first
 
-      sorted_matching.take_while{|spec| same_specificity(platform, spec, exemplary_spec) && same_deps(spec, exemplary_spec) }
+      sorted_matching.take_while {|spec| same_specificity(platform, spec, exemplary_spec) && same_deps(spec, exemplary_spec) }
     end
     module_function :select_best_platform_match
 
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb
index 433a5e53e1..2285114c57 100644
--- a/lib/bundler/resolver.rb
+++ b/lib/bundler/resolver.rb
@@ -21,7 +21,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/resolver.rb#L21
       base = SpecSet.new(base) unless base.is_a?(SpecSet)
       resolver = new(source_requirements, base, gem_version_promoter, additional_base_requirements, platforms)
       result = resolver.start(requirements)
-      SpecSet.new(SpecSet.new(result).for(requirements.reject{|dep| dep.name.end_with?("\0") }))
+      SpecSet.new(SpecSet.new(result).for(requirements.reject {|dep| dep.name.end_with?("\0") }))
     end
 
     def initialize(source_requirements, base, gem_version_promoter, additional_base_requirements, platforms)
diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb
index b0e35e005e..af669d7d0b 100644
--- a/lib/bundler/rubygems_ext.rb
+++ b/lib/bundler/rubygems_ext.rb
@@ -34,7 +34,7 @@ module Gem https://github.com/ruby/ruby/blob/trunk/lib/bundler/rubygems_ext.rb#L34
 
     def full_gem_path
       if source.respond_to?(:root)
-        Pathname.new(loaded_from).dirname.expand_path(source.root).to_s.tap{|x| x.untaint if RUBY_VERSION < "2.7" }
+        Pathname.new(loaded_from).dirname.expand_path(source.root).to_s.tap {|x| x.untaint if RUBY_VERSION < "2.7" }
       else
         rg_full_gem_path
       end
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index ffdbdee503..8c4e26f074 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -13,13 +13,13 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/shared_helpers.rb#L13
     def root
       gemfile = find_gemfile
       raise GemfileNotFound, "Could not locate Gemfile" unless gemfile
-      Pathname.new(gemfile).tap{|x| x.untaint if RUBY_VERSION < "2.7" }.expand_path.parent
+      Pathname.new(gemfile).tap {|x| x.untaint if RUBY_VERSION < "2.7" }.expand_path.parent
     end
 
     def default_gemfile
       gemfile = find_gemfile
       raise GemfileNotFound, "Could not locate Gemfile" unless gemfile
-      Pathname.new(gemfile).tap{|x| x.untaint if RUBY_VERSION < "2.7" }.expand_path
+      Pathname.new(gemfile).tap {|x| x.untaint if RUBY_VERSION < "2.7" }.expand_path
     end
 
     def default_lockfile
@@ -28,7 +28,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/shared_helpers.rb#L28
       case gemfile.basename.to_s
       when "gems.rb" then Pathname.new(gemfile.sub(/.rb$/, ".locked"))
       else Pathname.new("#{gemfile}.lock")
-      end.tap{|x| x.untaint if RUBY_VERSION < "2.7" }
+      end.tap {|x| x.untaint if RUBY_VERSION < "2.7" }
     end
 
     def default_bundle_dir
@@ -100,7 +100,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/shared_helpers.rb#L100
     #
     # @see {Bundler::PermissionError}
     def filesystem_access(path, action = :write, &block)
-      yield(path.dup.tap{|x| x.untaint if RUBY_VERSION < "2.7" })
+      yield(path.dup.tap {|x| x.untaint if RUBY_VERSION < "2.7" })
     rescue Errno::EACCES
       raise PermissionError.new(path, action)
     rescue Errno::EAGAIN
@@ -236,7 +236,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/shared_helpers.rb#L236
 
     def search_up(*names)
       previous = nil
-      current  = File.expand_path(SharedHelpers.pwd).tap{|x| x.untaint if RUBY_VERSION < "2.7" }
+      current  = File.expand_path(SharedHelpers.pwd).tap {|x| x.untaint if RUBY_VERSION < "2.7" }
 
       until !File.directory?(current) || current == previous
         if ENV["BUNDLER_SPEC_RUN"]
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb
index f174120706..eb82544b86 100644
--- a/lib/bundler/source/git.rb
+++ b/lib/bundl (... truncated)

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

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