mirror of
https://github.com/ruby/ruby.git
synced 2025-09-21 11:33:58 +02:00
Merge RubyGems-3.3.25 and Bundler-2.3.25
This commit is contained in:
parent
6f59f0bebc
commit
b102175b4d
52 changed files with 183 additions and 81 deletions
|
@ -357,7 +357,7 @@ module Bundler
|
|||
"bundle config unset deployment"
|
||||
end
|
||||
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
|
||||
|
||||
added = []
|
||||
|
|
|
@ -79,9 +79,7 @@ module Bundler
|
|||
candidates = if source.is_a?(Source::Path) || !ruby_platform_materializes_to_ruby_platform?
|
||||
target_platform = ruby_platform_materializes_to_ruby_platform? ? platform : local_platform
|
||||
|
||||
source.specs.search(Dependency.new(name, version)).select do |spec|
|
||||
MatchPlatform.platforms_match?(spec.platform, target_platform)
|
||||
end
|
||||
GemHelpers.select_best_platform_match(source.specs.search(Dependency.new(name, version)), target_platform)
|
||||
else
|
||||
source.specs.search(self)
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-config\fR \- Set bundler configuration options
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-console\fR \- Deprecated way to open an IRB session with the bundle pre\-loaded
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-doctor\fR \- Checks the bundle for common problems
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-exec\fR \- Execute a command in the context of the bundle
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-help\fR \- Displays detailed help for each subcommand
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-info\fR \- Show information for the given gem in your bundle
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-init\fR \- Generates a Gemfile into the current working directory
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-list\fR \- List all the gems in the bundle
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-outdated\fR \- List installed gems with newer versions available
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-platform\fR \- Displays platform compatibility information
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-plugin\fR \- Manage Bundler plugins
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-remove\fR \- Removes gems from the Gemfile
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-update\fR \- Update your gems to the latest available versions
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-version\fR \- Prints Bundler version information
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.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"
|
||||
\fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "BUNDLE" "1" "September 2022" "" ""
|
||||
.TH "BUNDLE" "1" "October 2022" "" ""
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBbundle\fR \- Ruby Dependency Management
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "GEMFILE" "5" "September 2022" "" ""
|
||||
.TH "GEMFILE" "5" "October 2022" "" ""
|
||||
.
|
||||
.SH "NAME"
|
||||
\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\.
|
||||
.
|
||||
.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
|
||||
.
|
||||
.nf
|
||||
|
||||
ruby "1\.9\.3"
|
||||
ruby "3\.1\.2"
|
||||
.
|
||||
.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\.
|
||||
.
|
||||
.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
|
||||
.
|
||||
|
@ -106,20 +106,23 @@ Each application \fImay\fR specify a Ruby engine version\. If an engine version
|
|||
.
|
||||
.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
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.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
|
||||
.
|
||||
.nf
|
||||
|
||||
ruby "2\.0\.0", patchlevel: "247"
|
||||
ruby "3\.1\.2", patchlevel: "20"
|
||||
.
|
||||
.fi
|
||||
.
|
||||
|
@ -265,6 +268,14 @@ C Ruby (MRI) only, but not Windows
|
|||
Windows C Ruby (MRI), including RubyInstaller 32\-bit and 64\-bit versions
|
||||
.
|
||||
.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
|
||||
Rubinius
|
||||
.
|
||||
|
@ -277,13 +288,13 @@ JRuby
|
|||
TruffleRuby
|
||||
.
|
||||
.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
|
||||
.
|
||||
.nf
|
||||
|
||||
ruby_23
|
||||
ruby_31
|
||||
.
|
||||
.fi
|
||||
.
|
||||
|
@ -297,8 +308,8 @@ As with groups (above), you may specify one or more platforms:
|
|||
.nf
|
||||
|
||||
gem "weakling", platforms: :jruby
|
||||
gem "ruby\-debug", platforms: :mri_18
|
||||
gem "nokogiri", platforms: [:windows_26, :jruby]
|
||||
gem "ruby\-debug", platforms: :mri_31
|
||||
gem "nokogiri", platforms: [:windows_31, :jruby]
|
||||
.
|
||||
.fi
|
||||
.
|
||||
|
@ -497,7 +508,7 @@ Are both equivalent to
|
|||
.
|
||||
.nf
|
||||
|
||||
gem "rails", git: "git://github\.com/rails/rails\.git"
|
||||
gem "rails", git: "https://github\.com/rails/rails\.git"
|
||||
.
|
||||
.fi
|
||||
.
|
||||
|
|
|
@ -64,10 +64,10 @@ All parameters are `OPTIONAL` unless otherwise specified.
|
|||
### 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
|
||||
requires an alternate Ruby engine, such as JRuby, TruffleRuby, etc., this
|
||||
should be the Ruby version that the engine is compatible with.
|
||||
|
||||
ruby "1.9.3"
|
||||
ruby "3.1.2"
|
||||
|
||||
### ENGINE
|
||||
|
||||
|
@ -86,9 +86,10 @@ What exactly is an Engine?
|
|||
|
||||
- [Other implementations](https://www.ruby-lang.org/en/about/) of Ruby exist.
|
||||
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.
|
||||
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
|
||||
|
||||
|
@ -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
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
|
@ -195,6 +200,10 @@ There are a number of `Gemfile` platforms:
|
|||
C Ruby (MRI) only, but not Windows
|
||||
* `windows`:
|
||||
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`:
|
||||
Rubinius
|
||||
* `jruby`:
|
||||
|
@ -202,17 +211,18 @@ There are a number of `Gemfile` platforms:
|
|||
* `truffleruby`:
|
||||
TruffleRuby
|
||||
|
||||
On platforms `ruby`, `mri`, and `windows`, 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 `ruby` version 2.3, use:
|
||||
On platforms `ruby`, `mri`, `mswin`, `mswin64`, and `windows`, 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 `ruby` version 3.1, use:
|
||||
|
||||
ruby_23
|
||||
ruby_31
|
||||
|
||||
As with groups (above), you may specify one or more platforms:
|
||||
|
||||
gem "weakling", platforms: :jruby
|
||||
gem "ruby-debug", platforms: :mri_18
|
||||
gem "nokogiri", platforms: [:windows_26, :jruby]
|
||||
gem "ruby-debug", platforms: :mri_31
|
||||
gem "nokogiri", platforms: [:windows_31, :jruby]
|
||||
|
||||
All operations involving groups ([`bundle install`](bundle-install.1.html), `Bundler.setup`,
|
||||
`Bundler.require`) behave exactly the same as if any groups not
|
||||
|
@ -369,7 +379,7 @@ same, you can omit one.
|
|||
|
||||
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.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: false
|
||||
|
||||
module Bundler
|
||||
VERSION = "2.3.24".freeze
|
||||
VERSION = "2.3.25".freeze
|
||||
|
||||
def self.bundler_major_version
|
||||
@bundler_major_version ||= VERSION.split(".").first.to_i
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
require "rbconfig"
|
||||
|
||||
module Gem
|
||||
VERSION = "3.3.24".freeze
|
||||
VERSION = "3.3.25".freeze
|
||||
end
|
||||
|
||||
# Must be first since it unloads the prelude from 1.9.2
|
||||
|
|
|
@ -16,7 +16,7 @@ if RUBY_VERSION >= "2.5" && !Gem::KERNEL_WARN_IGNORES_INTERNAL_ENTRIES
|
|||
|
||||
module_function define_method(:warn) {|*messages, **kw|
|
||||
unless uplevel = kw[:uplevel]
|
||||
if Gem.java_platform?
|
||||
if Gem.java_platform? && RUBY_VERSION < "3.1"
|
||||
return original_warn.bind(self).call(*messages)
|
||||
else
|
||||
return original_warn.bind(self).call(*messages, **kw)
|
||||
|
|
|
@ -214,7 +214,7 @@ class Gem::RequestSet::GemDependencyAPI
|
|||
git_source :github do |repo_name|
|
||||
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include? "/"
|
||||
|
||||
"git://github.com/#{repo_name}.git"
|
||||
"https://github.com/#{repo_name}.git"
|
||||
end
|
||||
|
||||
git_source :bitbucket do |repo_name|
|
||||
|
|
3
spec/bundler/cache/git_spec.rb
vendored
3
spec/bundler/cache/git_spec.rb
vendored
|
@ -156,6 +156,9 @@ RSpec.describe "bundle cache with git" do
|
|||
end
|
||||
|
||||
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"
|
||||
|
||||
git = build_git "has_submodule", "1.0" do |s|
|
||||
|
|
|
@ -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).
|
||||
and match(/freeze \nby running `bundle config unset deployment`./m)
|
||||
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
|
||||
|
||||
describe "with --source option" do
|
||||
|
|
|
@ -865,6 +865,9 @@ RSpec.describe "bundle install with git sources" do
|
|||
end
|
||||
|
||||
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 "has_submodule", "1.0" do |s|
|
||||
s.add_dependency "submodule"
|
||||
|
@ -884,6 +887,9 @@ RSpec.describe "bundle install with git sources" do
|
|||
end
|
||||
|
||||
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 "has_submodule", "1.0" do |s|
|
||||
s.add_dependency "submodule"
|
||||
|
@ -902,6 +908,9 @@ RSpec.describe "bundle install with git sources" do
|
|||
end
|
||||
|
||||
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 "has_submodule", "1.0"
|
||||
|
||||
|
|
|
@ -148,6 +148,38 @@ RSpec.describe "bundle install with specific platforms" do
|
|||
expect(out).to include("Using libv8 8.4.255.0 (universal-darwin)")
|
||||
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
|
||||
setup_multiplatform_gem
|
||||
gemfile(google_protobuf)
|
||||
|
|
|
@ -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)
|
|
@ -124,6 +124,9 @@ RSpec.describe "bundle update" do
|
|||
|
||||
describe "with submodules" 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_gem "submodule" do |s|
|
||||
s.write "lib/submodule.rb", "puts 'GEM'"
|
||||
|
|
|
@ -160,21 +160,21 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "rb-sys"
|
||||
version = "0.9.31"
|
||||
version = "0.9.35"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bfc41b26ea88da6100f538d31467941e41ab0c002999d687315e67d3b371b796"
|
||||
checksum = "2d2bde30824a18f2e68cd1c8004cec16656764c6efc385bc1c7fb4c904b276a5"
|
||||
dependencies = [
|
||||
"bindgen",
|
||||
"linkify",
|
||||
"rb-sys-build",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rb-sys-build"
|
||||
version = "0.9.31"
|
||||
version = "0.9.35"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "79be4233eabd2bf9e19eb8116391aeaf4b89b87a7ab38e0ded44de9158006e46"
|
||||
checksum = "5ff5d3ba92624df9c66bf0d1f0251d96284f08ac9773b7723d370e3f225c1d38"
|
||||
dependencies = [
|
||||
"bindgen",
|
||||
"linkify",
|
||||
"regex",
|
||||
"shell-words",
|
||||
]
|
||||
|
|
|
@ -7,4 +7,4 @@ edition = "2021"
|
|||
crate-type = ["cdylib"]
|
||||
|
||||
[dependencies]
|
||||
rb-sys = { version = "0.9.31", features = ["gem"] }
|
||||
rb-sys = { version = "0.9.35", features = ["gem"] }
|
||||
|
|
|
@ -153,21 +153,21 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "rb-sys"
|
||||
version = "0.9.31"
|
||||
version = "0.9.35"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bfc41b26ea88da6100f538d31467941e41ab0c002999d687315e67d3b371b796"
|
||||
checksum = "2d2bde30824a18f2e68cd1c8004cec16656764c6efc385bc1c7fb4c904b276a5"
|
||||
dependencies = [
|
||||
"bindgen",
|
||||
"linkify",
|
||||
"rb-sys-build",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rb-sys-build"
|
||||
version = "0.9.31"
|
||||
version = "0.9.35"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "79be4233eabd2bf9e19eb8116391aeaf4b89b87a7ab38e0ded44de9158006e46"
|
||||
checksum = "5ff5d3ba92624df9c66bf0d1f0251d96284f08ac9773b7723d370e3f225c1d38"
|
||||
dependencies = [
|
||||
"bindgen",
|
||||
"linkify",
|
||||
"regex",
|
||||
"shell-words",
|
||||
]
|
||||
|
|
|
@ -7,4 +7,4 @@ edition = "2021"
|
|||
crate-type = ["cdylib"]
|
||||
|
||||
[dependencies]
|
||||
rb-sys = { version = "0.9.31", features = ["gem"] }
|
||||
rb-sys = { version = "0.9.35", features = ["gem"] }
|
||||
|
|
|
@ -183,7 +183,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|||
|
||||
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"]
|
||||
|
||||
expected = { "a" => Gem::Requirement.create("!") }
|
||||
|
@ -196,7 +196,7 @@ class TestGemRequestSetGemDependencyAPI < Gem::TestCase
|
|||
|
||||
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"]
|
||||
|
||||
expected = { "a" => Gem::Requirement.create("!") }
|
||||
|
|
|
@ -63,6 +63,11 @@ class TestGemSourceGit < Gem::TestCase
|
|||
end
|
||||
|
||||
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
|
||||
|
||||
git_gem "b"
|
||||
|
|
|
@ -53,4 +53,4 @@ DEPENDENCIES
|
|||
webrick (~> 1.6)
|
||||
|
||||
BUNDLED WITH
|
||||
2.3.24
|
||||
2.3.25
|
||||
|
|
|
@ -65,4 +65,4 @@ DEPENDENCIES
|
|||
test-unit
|
||||
|
||||
BUNDLED WITH
|
||||
2.3.24
|
||||
2.3.25
|
||||
|
|
|
@ -71,4 +71,4 @@ DEPENDENCIES
|
|||
test-unit
|
||||
|
||||
BUNDLED WITH
|
||||
2.3.24
|
||||
2.3.25
|
||||
|
|
|
@ -43,4 +43,4 @@ DEPENDENCIES
|
|||
webrick (= 1.7.0)
|
||||
|
||||
BUNDLED WITH
|
||||
2.3.24
|
||||
2.3.25
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue