ruby-changes:73593
From: Hiroshi <ko1@a...>
Date: Sat, 17 Sep 2022 18:08:25 +0900 (JST)
Subject: [ruby-changes:73593] afb5971031 (ruby_3_1): Merge RubyGems-3.3.22 and Bundler-2.3.22
https://git.ruby-lang.org/ruby.git/commit/?id=afb5971031 From afb5971031540d8b1306d94a61b3700a672baf60 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Fri, 16 Sep 2022 16:06:06 +0900 Subject: Merge RubyGems-3.3.22 and Bundler-2.3.22 --- lib/bundler/bundler.gemspec | 14 +- lib/bundler/cli.rb | 3 +- lib/bundler/current_ruby.rb | 19 ++- lib/bundler/definition.rb | 13 +- lib/bundler/dependency.rb | 103 +++----------- lib/bundler/endpoint_specification.rb | 2 +- lib/bundler/feature_flag.rb | 1 - lib/bundler/gem_version_promoter.rb | 22 +-- lib/bundler/injector.rb | 3 +- lib/bundler/lockfile_generator.rb | 2 +- lib/bundler/man/bundle-add.1 | 8 +- lib/bundler/man/bundle-add.1.ronn | 5 +- lib/bundler/man/bundle-binstubs.1 | 2 +- lib/bundler/man/bundle-cache.1 | 2 +- lib/bundler/man/bundle-check.1 | 2 +- lib/bundler/man/bundle-clean.1 | 2 +- lib/bundler/man/bundle-config.1 | 2 +- lib/bundler/man/bundle-console.1 | 53 ++++++++ lib/bundler/man/bundle-console.1.ronn | 44 ++++++ lib/bundler/man/bundle-doctor.1 | 2 +- lib/bundler/man/bundle-exec.1 | 2 +- lib/bundler/man/bundle-gem.1 | 2 +- lib/bundler/man/bundle-help.1 | 13 ++ lib/bundler/man/bundle-help.1.ronn | 12 ++ lib/bundler/man/bundle-info.1 | 2 +- lib/bundler/man/bundle-init.1 | 2 +- lib/bundler/man/bundle-inject.1 | 2 +- lib/bundler/man/bundle-install.1 | 2 +- lib/bundler/man/bundle-list.1 | 2 +- lib/bundler/man/bundle-lock.1 | 2 +- lib/bundler/man/bundle-open.1 | 2 +- lib/bundler/man/bundle-outdated.1 | 2 +- lib/bundler/man/bundle-platform.1 | 2 +- lib/bundler/man/bundle-plugin.1 | 2 +- lib/bundler/man/bundle-pristine.1 | 2 +- lib/bundler/man/bundle-remove.1 | 2 +- lib/bundler/man/bundle-show.1 | 2 +- lib/bundler/man/bundle-update.1 | 2 +- lib/bundler/man/bundle-version.1 | 35 +++++ lib/bundler/man/bundle-version.1.ronn | 24 ++++ lib/bundler/man/bundle-viz.1 | 2 +- lib/bundler/man/bundle.1 | 8 +- lib/bundler/man/bundle.1.ronn | 5 +- lib/bundler/man/gemfile.5 | 46 ++----- lib/bundler/man/gemfile.5.ronn | 36 ++--- lib/bundler/man/index.txt | 3 + lib/bundler/match_remote_metadata.rb | 5 +- lib/bundler/resolver.rb | 151 +++++++++------------ lib/bundler/resolver/base.rb | 50 +++++++ lib/bundler/rubygems_ext.rb | 16 ++- lib/bundler/settings.rb | 1 - lib/bundler/spec_set.rb | 10 ++ lib/bundler/version.rb | 2 +- lib/rubygems.rb | 2 +- lib/rubygems/platform.rb | 2 +- lib/rubygems/query_utils.rb | 4 +- spec/bundler/bundler/dependency_spec.rb | 143 +++++++++++++++++++ .../bundler/bundler/endpoint_specification_spec.rb | 27 ++++ spec/bundler/bundler/gem_version_promoter_spec.rb | 9 -- spec/bundler/commands/add_spec.rb | 9 ++ spec/bundler/commands/clean_spec.rb | 5 - spec/bundler/commands/help_spec.rb | 4 +- spec/bundler/commands/install_spec.rb | 4 +- spec/bundler/commands/lock_spec.rb | 12 +- spec/bundler/install/gemfile/gemspec_spec.rb | 2 +- spec/bundler/install/gemfile/platform_spec.rb | 4 +- spec/bundler/install/gemfile/sources_spec.rb | 53 ++++++++ .../install/gemfile/specific_platform_spec.rb | 75 +++++++++- spec/bundler/install/gems/dependency_api_spec.rb | 2 +- spec/bundler/install/gems/flex_spec.rb | 75 ++++------ spec/bundler/install/gems/resolving_spec.rb | 4 +- spec/bundler/install/gems/standalone_spec.rb | 5 - spec/bundler/quality_spec.rb | 1 - spec/bundler/realworld/edgecases_spec.rb | 12 +- spec/bundler/runtime/inline_spec.rb | 2 - spec/bundler/runtime/platform_spec.rb | 51 ++++++- spec/bundler/runtime/setup_spec.rb | 1 - spec/bundler/support/builders.rb | 10 +- spec/bundler/support/helpers.rb | 2 +- spec/bundler/support/platforms.rb | 26 +++- test/rubygems/helper.rb | 2 - test/rubygems/test_gem_commands_info_command.rb | 26 ++++ test/rubygems/test_gem_platform.rb | 32 +++++ tool/bundler/dev_gems.rb.lock | 2 +- tool/bundler/rubocop_gems.rb.lock | 3 +- tool/bundler/standard_gems.rb.lock | 3 +- tool/bundler/test_gems.rb.lock | 2 +- 87 files changed, 940 insertions(+), 431 deletions(-) create mode 100644 lib/bundler/man/bundle-console.1 create mode 100644 lib/bundler/man/bundle-console.1.ronn create mode 100644 lib/bundler/man/bundle-help.1 create mode 100644 lib/bundler/man/bundle-help.1.ronn create mode 100644 lib/bundler/man/bundle-version.1 create mode 100644 lib/bundler/man/bundle-version.1.ronn create mode 100644 lib/bundler/resolver/base.rb create mode 100644 spec/bundler/bundler/dependency_spec.rb diff --git a/lib/bundler/bundler.gemspec b/lib/bundler/bundler.gemspec index 38c533b0c1..a9c9fac462 100644 --- a/lib/bundler/bundler.gemspec +++ b/lib/bundler/bundler.gemspec @@ -22,14 +22,12 @@ Gem::Specification.new do |s| https://github.com/ruby/ruby/blob/trunk/lib/bundler/bundler.gemspec#L22 s.summary = "The best way to manage your application's dependencies" s.description = "Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably" - if s.respond_to?(:metadata=) - s.metadata = { - "bug_tracker_uri" => "https://github.com/rubygems/rubygems/issues?q=is%3Aopen+is%3Aissue+label%3ABundler", - "changelog_uri" => "https://github.com/rubygems/rubygems/blob/master/bundler/CHANGELOG.md", - "homepage_uri" => "https://bundler.io/", - "source_code_uri" => "https://github.com/rubygems/rubygems/", - } - end + s.metadata = { + "bug_tracker_uri" => "https://github.com/rubygems/rubygems/issues?q=is%3Aopen+is%3Aissue+label%3ABundler", + "changelog_uri" => "https://github.com/rubygems/rubygems/blob/master/bundler/CHANGELOG.md", + "homepage_uri" => "https://bundler.io/", + "source_code_uri" => "https://github.com/rubygems/rubygems/tree/master/bundler", + } s.required_ruby_version = ">= 2.3.0" s.required_rubygems_version = ">= 2.5.2" diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index 5bf0f4fa3a..3ba4d0f8c4 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -372,6 +372,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli.rb#L372 method_option "group", :aliases => "-g", :type => :string method_option "source", :aliases => "-s", :type => :string method_option "require", :aliases => "-r", :type => :string, :banner => "Adds require path to gem. Provide false, or a path as a string." + method_option "path", :type => :string method_option "git", :type => :string method_option "github", :type => :string method_option "branch", :type => :string @@ -516,7 +517,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli.rb#L517 end end - desc "version", "Prints the bundler's version information" + desc "version", "Prints Bundler version information" def version cli_help = current_command.name == "cli_help" if cli_help || ARGV.include?("version") diff --git a/lib/bundler/current_ruby.rb b/lib/bundler/current_ruby.rb index 36f26b7ab4..f9987c4da8 100644 --- a/lib/bundler/current_ruby.rb +++ b/lib/bundler/current_ruby.rb @@ -36,17 +36,18 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/current_ruby.rb#L36 rbx ruby truffleruby + windows x64_mingw ].freeze def ruby? return true if Bundler::GemHelpers.generic_local_platform == Gem::Platform::RUBY - !mswin? && (RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx" || RUBY_ENGINE == "maglev" || RUBY_ENGINE == "truffleruby") + !windows? && (RUBY_ENGINE == "ruby" || RUBY_ENGINE == "rbx" || RUBY_ENGINE == "maglev" || RUBY_ENGINE == "truffleruby") end def mri? - !mswin? && RUBY_ENGINE == "ruby" + !windows? && RUBY_ENGINE == "ruby" end def rbx? @@ -65,16 +66,24 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/current_ruby.rb#L66 RUBY_ENGINE == "truffleruby" end - def mswin? + def windows? Gem.win_platform? end + def mswin? + # For backwards compatibility + windows? + + # TODO: This should correctly be: + # windows? && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platform.os == "mswin32" && Bundler.local_platform.cpu == "x86" + end + def mswin64? - Gem.win_platform? && Bundler.local_platform != Gem::Platform::RUBY && Bundler.local_platfor (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/