Merge RubyGems-3.3.25 and Bundler-2.3.25

This commit is contained in:
Hiroshi SHIBATA 2022-11-22 20:31:54 +09:00 committed by nagachika
parent 6f59f0bebc
commit b102175b4d
52 changed files with 183 additions and 81 deletions

View file

@ -357,7 +357,7 @@ module Bundler
"bundle config unset deployment" "bundle config unset deployment"
end end
msg << "\n\nIf this is a development machine, remove the #{Bundler.default_gemfile} " \ msg << "\n\nIf this is a development machine, remove the #{Bundler.default_gemfile} " \
"freeze \nby running `#{suggested_command}`." "freeze \nby running `#{suggested_command}`." if suggested_command
end end
added = [] added = []

View file

@ -79,9 +79,7 @@ module Bundler
candidates = if source.is_a?(Source::Path) || !ruby_platform_materializes_to_ruby_platform? candidates = if source.is_a?(Source::Path) || !ruby_platform_materializes_to_ruby_platform?
target_platform = ruby_platform_materializes_to_ruby_platform? ? platform : local_platform target_platform = ruby_platform_materializes_to_ruby_platform? ? platform : local_platform
source.specs.search(Dependency.new(name, version)).select do |spec| GemHelpers.select_best_platform_match(source.specs.search(Dependency.new(name, version)), target_platform)
MatchPlatform.platforms_match?(spec.platform, target_platform)
end
else else
source.specs.search(self) source.specs.search(self)
end end

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-ADD" "1" "September 2022" "" "" .TH "BUNDLE\-ADD" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install \fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-BINSTUBS" "1" "September 2022" "" "" .TH "BUNDLE\-BINSTUBS" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-binstubs\fR \- Install the binstubs of the listed gems \fBbundle\-binstubs\fR \- Install the binstubs of the listed gems

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-CACHE" "1" "September 2022" "" "" .TH "BUNDLE\-CACHE" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application \fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-CHECK" "1" "September 2022" "" "" .TH "BUNDLE\-CHECK" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems \fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-CLEAN" "1" "September 2022" "" "" .TH "BUNDLE\-CLEAN" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory \fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-CONFIG" "1" "September 2022" "" "" .TH "BUNDLE\-CONFIG" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-config\fR \- Set bundler configuration options \fBbundle\-config\fR \- Set bundler configuration options

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-CONSOLE" "1" "September 2022" "" "" .TH "BUNDLE\-CONSOLE" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-console\fR \- Deprecated way to open an IRB session with the bundle pre\-loaded \fBbundle\-console\fR \- Deprecated way to open an IRB session with the bundle pre\-loaded

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-DOCTOR" "1" "September 2022" "" "" .TH "BUNDLE\-DOCTOR" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-doctor\fR \- Checks the bundle for common problems \fBbundle\-doctor\fR \- Checks the bundle for common problems

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-EXEC" "1" "September 2022" "" "" .TH "BUNDLE\-EXEC" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-exec\fR \- Execute a command in the context of the bundle \fBbundle\-exec\fR \- Execute a command in the context of the bundle

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-GEM" "1" "September 2022" "" "" .TH "BUNDLE\-GEM" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem \fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-HELP" "1" "September 2022" "" "" .TH "BUNDLE\-HELP" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-help\fR \- Displays detailed help for each subcommand \fBbundle\-help\fR \- Displays detailed help for each subcommand

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-INFO" "1" "September 2022" "" "" .TH "BUNDLE\-INFO" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-info\fR \- Show information for the given gem in your bundle \fBbundle\-info\fR \- Show information for the given gem in your bundle

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-INIT" "1" "September 2022" "" "" .TH "BUNDLE\-INIT" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-init\fR \- Generates a Gemfile into the current working directory \fBbundle\-init\fR \- Generates a Gemfile into the current working directory

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-INJECT" "1" "September 2022" "" "" .TH "BUNDLE\-INJECT" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile \fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-INSTALL" "1" "September 2022" "" "" .TH "BUNDLE\-INSTALL" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile \fBbundle\-install\fR \- Install the dependencies specified in your Gemfile

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-LIST" "1" "September 2022" "" "" .TH "BUNDLE\-LIST" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-list\fR \- List all the gems in the bundle \fBbundle\-list\fR \- List all the gems in the bundle

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-LOCK" "1" "September 2022" "" "" .TH "BUNDLE\-LOCK" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-lock\fR \- Creates / Updates a lockfile without installing \fBbundle\-lock\fR \- Creates / Updates a lockfile without installing

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-OPEN" "1" "September 2022" "" "" .TH "BUNDLE\-OPEN" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-open\fR \- Opens the source directory for a gem in your bundle \fBbundle\-open\fR \- Opens the source directory for a gem in your bundle

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-OUTDATED" "1" "September 2022" "" "" .TH "BUNDLE\-OUTDATED" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-outdated\fR \- List installed gems with newer versions available \fBbundle\-outdated\fR \- List installed gems with newer versions available

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-PLATFORM" "1" "September 2022" "" "" .TH "BUNDLE\-PLATFORM" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-platform\fR \- Displays platform compatibility information \fBbundle\-platform\fR \- Displays platform compatibility information

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-PLUGIN" "1" "September 2022" "" "" .TH "BUNDLE\-PLUGIN" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-plugin\fR \- Manage Bundler plugins \fBbundle\-plugin\fR \- Manage Bundler plugins

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-PRISTINE" "1" "September 2022" "" "" .TH "BUNDLE\-PRISTINE" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-pristine\fR \- Restores installed gems to their pristine condition \fBbundle\-pristine\fR \- Restores installed gems to their pristine condition

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-REMOVE" "1" "September 2022" "" "" .TH "BUNDLE\-REMOVE" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-remove\fR \- Removes gems from the Gemfile \fBbundle\-remove\fR \- Removes gems from the Gemfile

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-SHOW" "1" "September 2022" "" "" .TH "BUNDLE\-SHOW" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem \fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-UPDATE" "1" "September 2022" "" "" .TH "BUNDLE\-UPDATE" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-update\fR \- Update your gems to the latest available versions \fBbundle\-update\fR \- Update your gems to the latest available versions

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-VERSION" "1" "September 2022" "" "" .TH "BUNDLE\-VERSION" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-version\fR \- Prints Bundler version information \fBbundle\-version\fR \- Prints Bundler version information

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE\-VIZ" "1" "September 2022" "" "" .TH "BUNDLE\-VIZ" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile \fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "BUNDLE" "1" "September 2022" "" "" .TH "BUNDLE" "1" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBbundle\fR \- Ruby Dependency Management \fBbundle\fR \- Ruby Dependency Management

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3 .\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3
. .
.TH "GEMFILE" "5" "September 2022" "" "" .TH "GEMFILE" "5" "October 2022" "" ""
. .
.SH "NAME" .SH "NAME"
\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
@ -73,13 +73,13 @@ Credentials in the source URL will take precedence over credentials set using \f
If your application requires a specific Ruby version or engine, specify your requirements using the \fBruby\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\. If your application requires a specific Ruby version or engine, specify your requirements using the \fBruby\fR method, with the following arguments\. All parameters are \fBOPTIONAL\fR unless otherwise specified\.
. .
.SS "VERSION (required)" .SS "VERSION (required)"
The version of Ruby that your application requires\. If your application requires an alternate Ruby engine, such as JRuby, Rubinius or TruffleRuby, this should be the Ruby version that the engine is compatible with\. The version of Ruby that your application requires\. If your application requires an alternate Ruby engine, such as JRuby, TruffleRuby, etc\., this should be the Ruby version that the engine is compatible with\.
. .
.IP "" 4 .IP "" 4
. .
.nf .nf
ruby "1\.9\.3" ruby "3\.1\.2"
. .
.fi .fi
. .
@ -95,7 +95,7 @@ What exactly is an Engine? \- A Ruby engine is an implementation of the Ruby lan
For background: the reference or original implementation of the Ruby programming language is called Matz\'s Ruby Interpreter \fIhttps://en\.wikipedia\.org/wiki/Ruby_MRI\fR, or MRI for short\. This is named after Ruby creator Yukihiro Matsumoto, also known as Matz\. MRI is also known as CRuby, because it is written in C\. MRI is the most widely used Ruby engine\. For background: the reference or original implementation of the Ruby programming language is called Matz\'s Ruby Interpreter \fIhttps://en\.wikipedia\.org/wiki/Ruby_MRI\fR, or MRI for short\. This is named after Ruby creator Yukihiro Matsumoto, also known as Matz\. MRI is also known as CRuby, because it is written in C\. MRI is the most widely used Ruby engine\.
. .
.IP "\(bu" 4 .IP "\(bu" 4
Other implementations \fIhttps://www\.ruby\-lang\.org/en/about/\fR of Ruby exist\. Some of the more well\-known implementations include Rubinius \fIhttps://rubinius\.com/\fR, and JRuby \fIhttp://jruby\.org/\fR\. Rubinius is an alternative implementation of Ruby written in Ruby\. JRuby is an implementation of Ruby on the JVM, short for Java Virtual Machine\. Other implementations \fIhttps://www\.ruby\-lang\.org/en/about/\fR of Ruby exist\. Some of the more well\-known implementations include JRuby \fIhttp://jruby\.org/\fR and TruffleRuby \fIhttps://www\.graalvm\.org/ruby/\fR\. Rubinius is an alternative implementation of Ruby written in Ruby\. JRuby is an implementation of Ruby on the JVM, short for Java Virtual Machine\. TruffleRuby is a Ruby implementation on the GraalVM, a language toolkit built on the JVM\.
. .
.IP "" 0 .IP "" 0
. .
@ -106,20 +106,23 @@ Each application \fImay\fR specify a Ruby engine version\. If an engine version
. .
.nf .nf
ruby "1\.8\.7", engine: "jruby", engine_version: "1\.6\.7" ruby "2\.6\.8", engine: "jruby", engine_version: "9\.3\.8\.0"
. .
.fi .fi
. .
.IP "" 0 .IP "" 0
. .
.SS "PATCHLEVEL" .SS "PATCHLEVEL"
Each application \fImay\fR specify a Ruby patchlevel\. Each application \fImay\fR specify a Ruby patchlevel\. Specifying the patchlevel has been meaningless since Ruby 2\.1\.0 was released as the patchlevel is now uniquely determined by a combination of major, minor, and teeny version numbers\.
.
.P
This option was implemented in Bundler 1\.4\.0 for Ruby 2\.0 or earlier\.
. .
.IP "" 4 .IP "" 4
. .
.nf .nf
ruby "2\.0\.0", patchlevel: "247" ruby "3\.1\.2", patchlevel: "20"
. .
.fi .fi
. .
@ -265,6 +268,14 @@ C Ruby (MRI) only, but not Windows
Windows C Ruby (MRI), including RubyInstaller 32\-bit and 64\-bit versions Windows C Ruby (MRI), including RubyInstaller 32\-bit and 64\-bit versions
. .
.TP .TP
\fBmswin\fR
Windows C Ruby (MRI), including RubyInstaller 32\-bit versions
.
.TP
\fBmswin64\fR
Windows C Ruby (MRI), including RubyInstaller 64\-bit versions
.
.TP
\fBrbx\fR \fBrbx\fR
Rubinius Rubinius
. .
@ -277,13 +288,13 @@ JRuby
TruffleRuby TruffleRuby
. .
.P .P
On platforms \fBruby\fR, \fBmri\fR, and \fBwindows\fR, you may additionally specify a version by appending the major and minor version numbers without a delimiter\. For example, to specify that a gem should only be used on platform \fBruby\fR version 2\.3, use: On platforms \fBruby\fR, \fBmri\fR, \fBmswin\fR, \fBmswin64\fR, and \fBwindows\fR, you may additionally specify a version by appending the major and minor version numbers without a delimiter\. For example, to specify that a gem should only be used on platform \fBruby\fR version 3\.1, use:
. .
.IP "" 4 .IP "" 4
. .
.nf .nf
ruby_23 ruby_31
. .
.fi .fi
. .
@ -297,8 +308,8 @@ As with groups (above), you may specify one or more platforms:
.nf .nf
gem "weakling", platforms: :jruby gem "weakling", platforms: :jruby
gem "ruby\-debug", platforms: :mri_18 gem "ruby\-debug", platforms: :mri_31
gem "nokogiri", platforms: [:windows_26, :jruby] gem "nokogiri", platforms: [:windows_31, :jruby]
. .
.fi .fi
. .
@ -497,7 +508,7 @@ Are both equivalent to
. .
.nf .nf
gem "rails", git: "git://github\.com/rails/rails\.git" gem "rails", git: "https://github\.com/rails/rails\.git"
. .
.fi .fi
. .

View file

@ -64,10 +64,10 @@ All parameters are `OPTIONAL` unless otherwise specified.
### VERSION (required) ### VERSION (required)
The version of Ruby that your application requires. If your application The version of Ruby that your application requires. If your application
requires an alternate Ruby engine, such as JRuby, Rubinius or TruffleRuby, this requires an alternate Ruby engine, such as JRuby, TruffleRuby, etc., this
should be the Ruby version that the engine is compatible with. should be the Ruby version that the engine is compatible with.
ruby "1.9.3" ruby "3.1.2"
### ENGINE ### ENGINE
@ -86,9 +86,10 @@ What exactly is an Engine?
- [Other implementations](https://www.ruby-lang.org/en/about/) of Ruby exist. - [Other implementations](https://www.ruby-lang.org/en/about/) of Ruby exist.
Some of the more well-known implementations include Some of the more well-known implementations include
[Rubinius](https://rubinius.com/), and [JRuby](http://jruby.org/). [JRuby](http://jruby.org/) and [TruffleRuby](https://www.graalvm.org/ruby/).
Rubinius is an alternative implementation of Ruby written in Ruby. Rubinius is an alternative implementation of Ruby written in Ruby.
JRuby is an implementation of Ruby on the JVM, short for Java Virtual Machine. JRuby is an implementation of Ruby on the JVM, short for Java Virtual Machine.
TruffleRuby is a Ruby implementation on the GraalVM, a language toolkit built on the JVM.
### ENGINE VERSION ### ENGINE VERSION
@ -96,13 +97,17 @@ Each application _may_ specify a Ruby engine version. If an engine version is
specified, an engine _must_ also be specified. If the engine is "ruby" the specified, an engine _must_ also be specified. If the engine is "ruby" the
engine version specified _must_ match the Ruby version. engine version specified _must_ match the Ruby version.
ruby "1.8.7", engine: "jruby", engine_version: "1.6.7" ruby "2.6.8", engine: "jruby", engine_version: "9.3.8.0"
### PATCHLEVEL ### PATCHLEVEL
Each application _may_ specify a Ruby patchlevel. Each application _may_ specify a Ruby patchlevel. Specifying the patchlevel has
been meaningless since Ruby 2.1.0 was released as the patchlevel is now
uniquely determined by a combination of major, minor, and teeny version numbers.
ruby "2.0.0", patchlevel: "247" This option was implemented in Bundler 1.4.0 for Ruby 2.0 or earlier.
ruby "3.1.2", patchlevel: "20"
## GEMS ## GEMS
@ -195,6 +200,10 @@ There are a number of `Gemfile` platforms:
C Ruby (MRI) only, but not Windows C Ruby (MRI) only, but not Windows
* `windows`: * `windows`:
Windows C Ruby (MRI), including RubyInstaller 32-bit and 64-bit versions Windows C Ruby (MRI), including RubyInstaller 32-bit and 64-bit versions
* `mswin`:
Windows C Ruby (MRI), including RubyInstaller 32-bit versions
* `mswin64`:
Windows C Ruby (MRI), including RubyInstaller 64-bit versions
* `rbx`: * `rbx`:
Rubinius Rubinius
* `jruby`: * `jruby`:
@ -202,17 +211,18 @@ There are a number of `Gemfile` platforms:
* `truffleruby`: * `truffleruby`:
TruffleRuby TruffleRuby
On platforms `ruby`, `mri`, and `windows`, you may additionally specify a version On platforms `ruby`, `mri`, `mswin`, `mswin64`, and `windows`, you may
by appending the major and minor version numbers without a delimiter. For example, additionally specify a version by appending the major and minor version numbers
to specify that a gem should only be used on platform `ruby` version 2.3, use: without a delimiter. For example, to specify that a gem should only be used on
platform `ruby` version 3.1, use:
ruby_23 ruby_31
As with groups (above), you may specify one or more platforms: As with groups (above), you may specify one or more platforms:
gem "weakling", platforms: :jruby gem "weakling", platforms: :jruby
gem "ruby-debug", platforms: :mri_18 gem "ruby-debug", platforms: :mri_31
gem "nokogiri", platforms: [:windows_26, :jruby] gem "nokogiri", platforms: [:windows_31, :jruby]
All operations involving groups ([`bundle install`](bundle-install.1.html), `Bundler.setup`, All operations involving groups ([`bundle install`](bundle-install.1.html), `Bundler.setup`,
`Bundler.require`) behave exactly the same as if any groups not `Bundler.require`) behave exactly the same as if any groups not
@ -369,7 +379,7 @@ same, you can omit one.
Are both equivalent to Are both equivalent to
gem "rails", git: "git://github.com/rails/rails.git" gem "rails", git: "https://github.com/rails/rails.git"
Since the `github` method is a specialization of `git_source`, it accepts a `:branch` named argument. Since the `github` method is a specialization of `git_source`, it accepts a `:branch` named argument.

View file

@ -1,7 +1,7 @@
# frozen_string_literal: false # frozen_string_literal: false
module Bundler module Bundler
VERSION = "2.3.24".freeze VERSION = "2.3.25".freeze
def self.bundler_major_version def self.bundler_major_version
@bundler_major_version ||= VERSION.split(".").first.to_i @bundler_major_version ||= VERSION.split(".").first.to_i

View file

@ -8,7 +8,7 @@
require "rbconfig" require "rbconfig"
module Gem module Gem
VERSION = "3.3.24".freeze VERSION = "3.3.25".freeze
end end
# Must be first since it unloads the prelude from 1.9.2 # Must be first since it unloads the prelude from 1.9.2

View file

@ -16,7 +16,7 @@ if RUBY_VERSION >= "2.5" && !Gem::KERNEL_WARN_IGNORES_INTERNAL_ENTRIES
module_function define_method(:warn) {|*messages, **kw| module_function define_method(:warn) {|*messages, **kw|
unless uplevel = kw[:uplevel] unless uplevel = kw[:uplevel]
if Gem.java_platform? if Gem.java_platform? && RUBY_VERSION < "3.1"
return original_warn.bind(self).call(*messages) return original_warn.bind(self).call(*messages)
else else
return original_warn.bind(self).call(*messages, **kw) return original_warn.bind(self).call(*messages, **kw)

View file

@ -214,7 +214,7 @@ class Gem::RequestSet::GemDependencyAPI
git_source :github do |repo_name| git_source :github do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include? "/" repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include? "/"
"git://github.com/#{repo_name}.git" "https://github.com/#{repo_name}.git"
end end
git_source :bitbucket do |repo_name| git_source :bitbucket do |repo_name|

View file

@ -156,6 +156,9 @@ RSpec.describe "bundle cache with git" do
end end
it "copies repository to vendor cache, including submodules" do it "copies repository to vendor cache, including submodules" do
# CVE-2022-39253: https://lore.kernel.org/lkml/xmqq4jw1uku5.fsf@gitster.g/
system(*%W[git config --global protocol.file.allow always])
build_git "submodule", "1.0" build_git "submodule", "1.0"
git = build_git "has_submodule", "1.0" do |s| git = build_git "has_submodule", "1.0" do |s|

View file

@ -613,6 +613,12 @@ RSpec.describe "bundle update" do
expect(err).to match(/You are trying to install in deployment mode after changing.your Gemfile/m). expect(err).to match(/You are trying to install in deployment mode after changing.your Gemfile/m).
and match(/freeze \nby running `bundle config unset deployment`./m) and match(/freeze \nby running `bundle config unset deployment`./m)
end end
it "should not suggest any command to unfreeze bundler if frozen is set through ENV" do
bundle "update", :all => true, :raise_on_error => false, :env => { "BUNDLE_FROZEN" => "true" }
expect(err).to match(/You are trying to install in deployment mode after changing.your Gemfile/m)
expect(err).not_to match(/by running/)
end
end end
describe "with --source option" do describe "with --source option" do

View file

@ -865,6 +865,9 @@ RSpec.describe "bundle install with git sources" do
end end
it "ignores submodules if :submodule is not passed" do it "ignores submodules if :submodule is not passed" do
# CVE-2022-39253: https://lore.kernel.org/lkml/xmqq4jw1uku5.fsf@gitster.g/
system(*%W[git config --global protocol.file.allow always])
build_git "submodule", "1.0" build_git "submodule", "1.0"
build_git "has_submodule", "1.0" do |s| build_git "has_submodule", "1.0" do |s|
s.add_dependency "submodule" s.add_dependency "submodule"
@ -884,6 +887,9 @@ RSpec.describe "bundle install with git sources" do
end end
it "handles repos with submodules" do it "handles repos with submodules" do
# CVE-2022-39253: https://lore.kernel.org/lkml/xmqq4jw1uku5.fsf@gitster.g/
system(*%W[git config --global protocol.file.allow always])
build_git "submodule", "1.0" build_git "submodule", "1.0"
build_git "has_submodule", "1.0" do |s| build_git "has_submodule", "1.0" do |s|
s.add_dependency "submodule" s.add_dependency "submodule"
@ -902,6 +908,9 @@ RSpec.describe "bundle install with git sources" do
end end
it "does not warn when deiniting submodules" do it "does not warn when deiniting submodules" do
# CVE-2022-39253: https://lore.kernel.org/lkml/xmqq4jw1uku5.fsf@gitster.g/
system(*%W[git config --global protocol.file.allow always])
build_git "submodule", "1.0" build_git "submodule", "1.0"
build_git "has_submodule", "1.0" build_git "has_submodule", "1.0"

View file

@ -148,6 +148,38 @@ RSpec.describe "bundle install with specific platforms" do
expect(out).to include("Using libv8 8.4.255.0 (universal-darwin)") expect(out).to include("Using libv8 8.4.255.0 (universal-darwin)")
end end
it "chooses platform specific gems even when resolving upon materialization and the API returns more specific plaforms first" do
build_repo4 do
build_gem("grpc", "1.50.0")
build_gem("grpc", "1.50.0") {|s| s.platform = "universal-darwin" }
end
gemfile <<-G
source "https://localgemserver.test"
gem "grpc"
G
# simulate lockfile created with old bundler, which only locks for ruby platform
lockfile <<-L
GEM
remote: https://localgemserver.test/
specs:
grpc (1.50.0)
PLATFORMS
ruby
DEPENDENCIES
grpc
BUNDLED WITH
#{Bundler::VERSION}
L
bundle "install --verbose", :artifice => "compact_index_precompiled_before", :env => { "BUNDLER_SPEC_GEM_REPO" => gem_repo4.to_s }
expect(out).to include("Installing grpc 1.50.0 (universal-darwin)")
end
it "caches the universal-darwin gem when --all-platforms is passed and properly picks it up on further bundler invocations" do it "caches the universal-darwin gem when --all-platforms is passed and properly picks it up on further bundler invocations" do
setup_multiplatform_gem setup_multiplatform_gem
gemfile(google_protobuf) gemfile(google_protobuf)

View file

@ -0,0 +1,25 @@
# frozen_string_literal: true
require_relative "compact_index"
Artifice.deactivate
class CompactIndexPrecompiledBefore < CompactIndexAPI
get "/info/:name" do
etag_response do
gem = gems.find {|g| g.name == params[:name] }
move_ruby_variant_to_the_end(CompactIndex.info(gem ? gem.versions : []))
end
end
private
def move_ruby_variant_to_the_end(response)
lines = response.split("\n")
ruby = lines.find {|line| /\A\d+\.\d+\.\d* \|/.match(line) }
lines.delete(ruby)
lines.push(ruby).join("\n")
end
end
Artifice.activate_with(CompactIndexPrecompiledBefore)

View file

@ -124,6 +124,9 @@ RSpec.describe "bundle update" do
describe "with submodules" do describe "with submodules" do
before :each do before :each do
# CVE-2022-39253: https://lore.kernel.org/lkml/xmqq4jw1uku5.fsf@gitster.g/
system(*%W[git config --global protocol.file.allow always])
build_repo4 do build_repo4 do
build_gem "submodule" do |s| build_gem "submodule" do |s|
s.write "lib/submodule.rb", "puts 'GEM'" s.write "lib/submodule.rb", "puts 'GEM'"

View file

@ -160,21 +160,21 @@ dependencies = [
[[package]] [[package]]
name = "rb-sys" name = "rb-sys"
version = "0.9.31" version = "0.9.35"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfc41b26ea88da6100f538d31467941e41ab0c002999d687315e67d3b371b796" checksum = "2d2bde30824a18f2e68cd1c8004cec16656764c6efc385bc1c7fb4c904b276a5"
dependencies = [ dependencies = [
"bindgen",
"linkify",
"rb-sys-build", "rb-sys-build",
] ]
[[package]] [[package]]
name = "rb-sys-build" name = "rb-sys-build"
version = "0.9.31" version = "0.9.35"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79be4233eabd2bf9e19eb8116391aeaf4b89b87a7ab38e0ded44de9158006e46" checksum = "5ff5d3ba92624df9c66bf0d1f0251d96284f08ac9773b7723d370e3f225c1d38"
dependencies = [ dependencies = [
"bindgen",
"linkify",
"regex", "regex",
"shell-words", "shell-words",
] ]

View file

@ -7,4 +7,4 @@ edition = "2021"
crate-type = ["cdylib"] crate-type = ["cdylib"]
[dependencies] [dependencies]
rb-sys = { version = "0.9.31", features = ["gem"] } rb-sys = { version = "0.9.35", features = ["gem"] }

View file

@ -153,21 +153,21 @@ dependencies = [
[[package]] [[package]]
name = "rb-sys" name = "rb-sys"
version = "0.9.31" version = "0.9.35"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfc41b26ea88da6100f538d31467941e41ab0c002999d687315e67d3b371b796" checksum = "2d2bde30824a18f2e68cd1c8004cec16656764c6efc385bc1c7fb4c904b276a5"
dependencies = [ dependencies = [
"bindgen",
"linkify",
"rb-sys-build", "rb-sys-build",
] ]
[[package]] [[package]]
name = "rb-sys-build" name = "rb-sys-build"
version = "0.9.31" version = "0.9.35"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79be4233eabd2bf9e19eb8116391aeaf4b89b87a7ab38e0ded44de9158006e46" checksum = "5ff5d3ba92624df9c66bf0d1f0251d96284f08ac9773b7723d370e3f225c1d38"
dependencies = [ dependencies = [
"bindgen",
"linkify",
"regex", "regex",
"shell-words", "shell-words",
] ]

View file

@ -7,4 +7,4 @@ edition = "2021"
crate-type = ["cdylib"] crate-type = ["cdylib"]
[dependencies] [dependencies]
rb-sys = { version = "0.9.31", features = ["gem"] } rb-sys = { version = "0.9.35", features = ["gem"] }

View file

@ -183,7 +183,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
assert_equal [dep("a")], @set.dependencies assert_equal [dep("a")], @set.dependencies
assert_equal %w[git://github.com/example/repository.git master], assert_equal %w[https://github.com/example/repository.git master],
@git_set.repositories["a"] @git_set.repositories["a"]
expected = { "a" => Gem::Requirement.create("!") } expected = { "a" => Gem::Requirement.create("!") }
@ -196,7 +196,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
assert_equal [dep("a")], @set.dependencies assert_equal [dep("a")], @set.dependencies
assert_equal %w[git://github.com/example/example.git master], assert_equal %w[https://github.com/example/example.git master],
@git_set.repositories["a"] @git_set.repositories["a"]
expected = { "a" => Gem::Requirement.create("!") } expected = { "a" => Gem::Requirement.create("!") }

View file

@ -63,6 +63,11 @@ class TestGemSourceGit < Gem::TestCase
end end
def test_checkout_submodules def test_checkout_submodules
# We need to allow to checkout submodules with file:// protocol
# CVE-2022-39253
# https://lore.kernel.org/lkml/xmqq4jw1uku5.fsf@gitster.g/
system(@git, *%W[config --global protocol.file.allow always])
source = Gem::Source::Git.new @name, @repository, "master", true source = Gem::Source::Git.new @name, @repository, "master", true
git_gem "b" git_gem "b"

View file

@ -53,4 +53,4 @@ DEPENDENCIES
webrick (~> 1.6) webrick (~> 1.6)
BUNDLED WITH BUNDLED WITH
2.3.24 2.3.25

View file

@ -65,4 +65,4 @@ DEPENDENCIES
test-unit test-unit
BUNDLED WITH BUNDLED WITH
2.3.24 2.3.25

View file

@ -71,4 +71,4 @@ DEPENDENCIES
test-unit test-unit
BUNDLED WITH BUNDLED WITH
2.3.24 2.3.25

View file

@ -43,4 +43,4 @@ DEPENDENCIES
webrick (= 1.7.0) webrick (= 1.7.0)
BUNDLED WITH BUNDLED WITH
2.3.24 2.3.25