Resync Bundler & RubyGems

This commit is contained in:
David Rodríguez 2022-09-07 07:13:04 +02:00 committed by Hiroshi SHIBATA
parent 2d57447ae8
commit 24fd2f73d0
Notes: git 2022-09-08 11:25:46 +09:00
86 changed files with 814 additions and 662 deletions

View File

@ -22,14 +22,12 @@ Gem::Specification.new do |s|
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/",
"source_code_uri" => "https://github.com/rubygems/rubygems/tree/master/bundler",
}
end
s.required_ruby_version = ">= 2.3.0"
s.required_rubygems_version = ">= 2.5.2"

View File

@ -517,7 +517,7 @@ module Bundler
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")

View File

@ -9,91 +9,22 @@ module Bundler
attr_reader :autorequire
attr_reader :groups, :platforms, :gemfile, :path, :git, :github, :branch, :ref, :force_ruby_platform
# rubocop:disable Naming/VariableNumber
ALL_RUBY_VERSIONS = ((18..27).to_a + (30..31).to_a).freeze
PLATFORM_MAP = {
:ruby => Gem::Platform::RUBY,
:ruby_18 => Gem::Platform::RUBY,
:ruby_19 => Gem::Platform::RUBY,
:ruby_20 => Gem::Platform::RUBY,
:ruby_21 => Gem::Platform::RUBY,
:ruby_22 => Gem::Platform::RUBY,
:ruby_23 => Gem::Platform::RUBY,
:ruby_24 => Gem::Platform::RUBY,
:ruby_25 => Gem::Platform::RUBY,
:ruby_26 => Gem::Platform::RUBY,
:ruby_27 => Gem::Platform::RUBY,
:ruby_30 => Gem::Platform::RUBY,
:ruby_31 => Gem::Platform::RUBY,
:mri => Gem::Platform::RUBY,
:mri_18 => Gem::Platform::RUBY,
:mri_19 => Gem::Platform::RUBY,
:mri_20 => Gem::Platform::RUBY,
:mri_21 => Gem::Platform::RUBY,
:mri_22 => Gem::Platform::RUBY,
:mri_23 => Gem::Platform::RUBY,
:mri_24 => Gem::Platform::RUBY,
:mri_25 => Gem::Platform::RUBY,
:mri_26 => Gem::Platform::RUBY,
:mri_27 => Gem::Platform::RUBY,
:mri_30 => Gem::Platform::RUBY,
:mri_31 => Gem::Platform::RUBY,
:rbx => Gem::Platform::RUBY,
:truffleruby => Gem::Platform::RUBY,
:jruby => Gem::Platform::JAVA,
:jruby_18 => Gem::Platform::JAVA,
:jruby_19 => Gem::Platform::JAVA,
:windows => Gem::Platform::WINDOWS,
:mswin => Gem::Platform::MSWIN,
:mswin_18 => Gem::Platform::MSWIN,
:mswin_19 => Gem::Platform::MSWIN,
:mswin_20 => Gem::Platform::MSWIN,
:mswin_21 => Gem::Platform::MSWIN,
:mswin_22 => Gem::Platform::MSWIN,
:mswin_23 => Gem::Platform::MSWIN,
:mswin_24 => Gem::Platform::MSWIN,
:mswin_25 => Gem::Platform::MSWIN,
:mswin_26 => Gem::Platform::MSWIN,
:mswin_27 => Gem::Platform::MSWIN,
:mswin_30 => Gem::Platform::MSWIN,
:mswin_31 => Gem::Platform::MSWIN,
:mswin64 => Gem::Platform::MSWIN64,
:mswin64_19 => Gem::Platform::MSWIN64,
:mswin64_20 => Gem::Platform::MSWIN64,
:mswin64_21 => Gem::Platform::MSWIN64,
:mswin64_22 => Gem::Platform::MSWIN64,
:mswin64_23 => Gem::Platform::MSWIN64,
:mswin64_24 => Gem::Platform::MSWIN64,
:mswin64_25 => Gem::Platform::MSWIN64,
:mswin64_26 => Gem::Platform::MSWIN64,
:mswin64_27 => Gem::Platform::MSWIN64,
:mswin64_30 => Gem::Platform::MSWIN64,
:mswin64_31 => Gem::Platform::MSWIN64,
:mingw => Gem::Platform::MINGW,
:mingw_18 => Gem::Platform::MINGW,
:mingw_19 => Gem::Platform::MINGW,
:mingw_20 => Gem::Platform::MINGW,
:mingw_21 => Gem::Platform::MINGW,
:mingw_22 => Gem::Platform::MINGW,
:mingw_23 => Gem::Platform::MINGW,
:mingw_24 => Gem::Platform::MINGW,
:mingw_25 => Gem::Platform::MINGW,
:mingw_26 => Gem::Platform::MINGW,
:mingw_27 => Gem::Platform::MINGW,
:mingw_30 => Gem::Platform::MINGW,
:mingw_31 => Gem::Platform::MINGW,
:x64_mingw => Gem::Platform::X64_MINGW,
:x64_mingw_20 => Gem::Platform::X64_MINGW,
:x64_mingw_21 => Gem::Platform::X64_MINGW,
:x64_mingw_22 => Gem::Platform::X64_MINGW,
:x64_mingw_23 => Gem::Platform::X64_MINGW,
:x64_mingw_24 => Gem::Platform::X64_MINGW,
:x64_mingw_25 => Gem::Platform::X64_MINGW,
:x64_mingw_26 => Gem::Platform::X64_MINGW,
:x64_mingw_27 => Gem::Platform::X64_MINGW,
:x64_mingw_30 => Gem::Platform::X64_MINGW,
:x64_mingw_31 => Gem::Platform::X64_MINGW,
}.freeze
# rubocop:enable Naming/VariableNumber
:ruby => [Gem::Platform::RUBY, ALL_RUBY_VERSIONS],
:mri => [Gem::Platform::RUBY, ALL_RUBY_VERSIONS],
:rbx => [Gem::Platform::RUBY],
:truffleruby => [Gem::Platform::RUBY],
:jruby => [Gem::Platform::JAVA, [18, 19]],
:windows => [Gem::Platform::WINDOWS, ALL_RUBY_VERSIONS],
:mswin => [Gem::Platform::MSWIN, ALL_RUBY_VERSIONS],
:mswin64 => [Gem::Platform::MSWIN64, ALL_RUBY_VERSIONS - [18]],
:mingw => [Gem::Platform::MINGW, ALL_RUBY_VERSIONS],
:x64_mingw => [Gem::Platform::X64_MINGW, ALL_RUBY_VERSIONS - [18, 19]],
}.each_with_object({}) do |(platform, spec), hash|
hash[platform] = spec[0]
spec[1]&.each {|version| hash[:"#{platform}_#{version}"] = spec[0] }
end.freeze
def initialize(name, version, options = {}, &blk)
type = options["type"] || :runtime

View File

@ -12,7 +12,7 @@ module Bundler
super()
@name = name
@version = Gem::Version.create version
@platform = platform.nil? ? nil : Gem::Platform.new(platform)
@platform = Gem::Platform.new(platform)
@spec_fetcher = spec_fetcher
@dependencies = dependencies.map {|dep, reqs| build_dependency(dep, reqs) }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,53 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-CONSOLE" "1" "September 2022" "" ""
.
.SH "NAME"
\fBbundle\-console\fR \- Deprecated way to open an IRB session with the bundle pre\-loaded
.
.SH "SYNOPSIS"
\fBbundle console\fR [GROUP]
.
.SH "DESCRIPTION"
Starts an interactive Ruby console session in the context of the current bundle\.
.
.P
If no \fBGROUP\fR is specified, all gems in the \fBdefault\fR group in the Gemfile(5) \fIhttps://bundler\.io/man/gemfile\.5\.html\fR are preliminarily loaded\.
.
.P
If \fBGROUP\fR is specified, all gems in the given group in the Gemfile in addition to the gems in \fBdefault\fR group are loaded\. Even if the given group does not exist in the Gemfile, IRB console starts without any warning or error\.
.
.P
The environment variable \fBBUNDLE_CONSOLE\fR or \fBbundle config set console\fR can be used to change the shell from the following:
.
.IP "\(bu" 4
\fBirb\fR (default)
.
.IP "\(bu" 4
\fBpry\fR (https://github\.com/pry/pry)
.
.IP "\(bu" 4
\fBripl\fR (https://github\.com/cldwalker/ripl)
.
.IP "" 0
.
.P
\fBbundle console\fR uses irb by default\. An alternative Pry or Ripl can be used with \fBbundle console\fR by adjusting the \fBconsole\fR Bundler setting\. Also make sure that \fBpry\fR or \fBripl\fR is in your Gemfile\.
.
.SH "EXAMPLE"
.
.nf
$ bundle config set console pry
$ bundle console
Resolving dependencies\.\.\.
[1] pry(main)>
.
.fi
.
.SH "NOTES"
This command was deprecated in Bundler 2\.1 and will be removed in 3\.0\. Use \fBbin/console\fR script, which can be generated by \fBbundle gem <NAME>\fR\.
.
.SH "SEE ALSO"
Gemfile(5) \fIhttps://bundler\.io/man/gemfile\.5\.html\fR

View File

@ -0,0 +1,44 @@
bundle-console(1) -- Deprecated way to open an IRB session with the bundle pre-loaded
=====================================================================================
## SYNOPSIS
`bundle console` [GROUP]
## DESCRIPTION
Starts an interactive Ruby console session in the context of the current bundle.
If no `GROUP` is specified, all gems in the `default` group in the [Gemfile(5)](https://bundler.io/man/gemfile.5.html) are
preliminarily loaded.
If `GROUP` is specified, all gems in the given group in the Gemfile in addition
to the gems in `default` group are loaded. Even if the given group does not
exist in the Gemfile, IRB console starts without any warning or error.
The environment variable `BUNDLE_CONSOLE` or `bundle config set console` can be used to change
the shell from the following:
* `irb` (default)
* `pry` (https://github.com/pry/pry)
* `ripl` (https://github.com/cldwalker/ripl)
`bundle console` uses irb by default. An alternative Pry or Ripl can be used with
`bundle console` by adjusting the `console` Bundler setting. Also make sure that
`pry` or `ripl` is in your Gemfile.
## EXAMPLE
$ bundle config set console pry
$ bundle console
Resolving dependencies...
[1] pry(main)>
## NOTES
This command was deprecated in Bundler 2.1 and will be removed in 3.0.
Use `bin/console` script, which can be generated by `bundle gem <NAME>`.
## SEE ALSO
[Gemfile(5)](https://bundler.io/man/gemfile.5.html)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,35 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE\-VERSION" "1" "September 2022" "" ""
.
.SH "NAME"
\fBbundle\-version\fR \- Prints Bundler version information
.
.SH "SYNOPSIS"
\fBbundle version\fR
.
.SH "DESCRIPTION"
Prints Bundler version information\.
.
.SH "OPTIONS"
No options\.
.
.SH "EXAMPLE"
Print the version of Bundler with build date and commit hash of the in the Git source\.
.
.IP "" 4
.
.nf
bundle version
.
.fi
.
.IP "" 0
.
.P
shows \fBBundler version 2\.3\.21 (2022\-08\-24 commit d54be5fdd8)\fR for example\.
.
.P
cf\. \fBbundle \-\-version\fR shows \fBBundler version 2\.3\.21\fR\.

View File

@ -0,0 +1,24 @@
bundle-version(1) -- Prints Bundler version information
=======================================================
## SYNOPSIS
`bundle version`
## DESCRIPTION
Prints Bundler version information.
## OPTIONS
No options.
## EXAMPLE
Print the version of Bundler with build date and commit hash of the in the Git source.
bundle version
shows `Bundler version 2.3.21 (2022-08-24 commit d54be5fdd8)` for example.
cf. `bundle --version` shows `Bundler version 2.3.21`.

View File

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

View File

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BUNDLE" "1" "August 2022" "" ""
.TH "BUNDLE" "1" "September 2022" "" ""
.
.SH "NAME"
\fBbundle\fR \- Ruby Dependency Management
@ -124,6 +124,10 @@ Removes gems from the Gemfile
\fBbundle plugin(1)\fR \fIbundle\-plugin\.1\.html\fR
Manage Bundler plugins
.
.TP
\fBbundle version(1)\fR \fIbundle\-version\.1\.html\fR
Prints Bundler version information
.
.SH "PLUGINS"
When running a command that isn\'t listed in PRIMARY COMMANDS or UTILITIES, Bundler will try to find an executable on your path named \fBbundler\-<command>\fR and execute it, passing down any extra arguments to it\.
.

View File

@ -100,6 +100,9 @@ We divide `bundle` subcommands into primary commands and utilities:
* [`bundle plugin(1)`](bundle-plugin.1.html):
Manage Bundler plugins
* [`bundle version(1)`](bundle-version.1.html):
Prints Bundler version information
## PLUGINS
When running a command that isn't listed in PRIMARY COMMANDS or UTILITIES,

View File

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GEMFILE" "5" "August 2022" "" ""
.TH "GEMFILE" "5" "September 2022" "" ""
.
.SH "NAME"
\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
@ -254,19 +254,15 @@ There are a number of \fBGemfile\fR platforms:
.
.TP
\fBruby\fR
C Ruby (MRI), Rubinius or TruffleRuby, but \fBNOT\fR Windows
C Ruby (MRI), Rubinius, or TruffleRuby, but not Windows
.
.TP
\fBmri\fR
Same as \fIruby\fR, but only C Ruby (MRI)
C Ruby (MRI) only, but not Windows
.
.TP
\fBmingw\fR
Windows 32 bit \'mingw32\' platform (aka RubyInstaller)
.
.TP
\fBx64_mingw\fR
Windows 64 bit \'mingw32\' platform (aka RubyInstaller x64)
\fBwindows\fR
Windows C Ruby (MRI), including RubyInstaller 32\-bit and 64\-bit versions
.
.TP
\fBrbx\fR
@ -280,15 +276,8 @@ JRuby
\fBtruffleruby\fR
TruffleRuby
.
.TP
\fBmswin\fR
Windows
.
.P
You can restrict further by platform and version for all platforms \fIexcept\fR for \fBrbx\fR, \fBjruby\fR, \fBtruffleruby\fR and \fBmswin\fR\.
.
.P
To specify a version in addition to a platform, append the version number without the delimiter to the platform\. For example, to specify that a gem should only be used on platforms with Ruby 2\.3, use:
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:
.
.IP "" 4
.
@ -301,26 +290,7 @@ ruby_23
.IP "" 0
.
.P
The full list of platforms and supported versions includes:
.
.TP
\fBruby\fR
1\.8, 1\.9, 2\.0, 2\.1, 2\.2, 2\.3, 2\.4, 2\.5, 2\.6
.
.TP
\fBmri\fR
1\.8, 1\.9, 2\.0, 2\.1, 2\.2, 2\.3, 2\.4, 2\.5, 2\.6
.
.TP
\fBmingw\fR
1\.8, 1\.9, 2\.0, 2\.1, 2\.2, 2\.3, 2\.4, 2\.5, 2\.6
.
.TP
\fBx64_mingw\fR
2\.0, 2\.1, 2\.2, 2\.3, 2\.4, 2\.5, 2\.6
.
.P
As with groups, you can specify one or more platforms:
As with groups (above), you may specify one or more platforms:
.
.IP "" 4
.
@ -328,7 +298,7 @@ As with groups, you can specify one or more platforms:
gem "weakling", platforms: :jruby
gem "ruby\-debug", platforms: :mri_18
gem "nokogiri", platforms: [:mri_18, :jruby]
gem "nokogiri", platforms: [:windows_26, :jruby]
.
.fi
.

View File

@ -190,47 +190,29 @@ platforms.
There are a number of `Gemfile` platforms:
* `ruby`:
C Ruby (MRI), Rubinius or TruffleRuby, but `NOT` Windows
C Ruby (MRI), Rubinius, or TruffleRuby, but not Windows
* `mri`:
Same as _ruby_, but only C Ruby (MRI)
* `mingw`:
Windows 32 bit 'mingw32' platform (aka RubyInstaller)
* `x64_mingw`:
Windows 64 bit 'mingw32' platform (aka RubyInstaller x64)
C Ruby (MRI) only, but not Windows
* `windows`:
Windows C Ruby (MRI), including RubyInstaller 32-bit and 64-bit versions
* `rbx`:
Rubinius
* `jruby`:
JRuby
* `truffleruby`:
TruffleRuby
* `mswin`:
Windows
You can restrict further by platform and version for all platforms *except* for
`rbx`, `jruby`, `truffleruby` and `mswin`.
To specify a version in addition to a platform, append the version number without
the delimiter to the platform. For example, to specify that a gem should only be
used on platforms with Ruby 2.3, use:
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:
ruby_23
The full list of platforms and supported versions includes:
* `ruby`:
1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
* `mri`:
1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
* `mingw`:
1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
* `x64_mingw`:
2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
As with groups, you can specify one or more platforms:
As with groups (above), you may specify one or more platforms:
gem "weakling", platforms: :jruby
gem "ruby-debug", platforms: :mri_18
gem "nokogiri", platforms: [:mri_18, :jruby]
gem "nokogiri", platforms: [:windows_26, :jruby]
All operations involving groups ([`bundle install`](bundle-install.1.html), `Bundler.setup`,
`Bundler.require`) behave exactly the same as if any groups not

View File

@ -6,6 +6,7 @@ bundle-cache(1) bundle-cache.1
bundle-check(1) bundle-check.1
bundle-clean(1) bundle-clean.1
bundle-config(1) bundle-config.1
bundle-console(1) bundle-console.1
bundle-doctor(1) bundle-doctor.1
bundle-exec(1) bundle-exec.1
bundle-gem(1) bundle-gem.1
@ -24,4 +25,5 @@ bundle-pristine(1) bundle-pristine.1
bundle-remove(1) bundle-remove.1
bundle-show(1) bundle-show.1
bundle-update(1) bundle-update.1
bundle-version(1) bundle-version.1
bundle-viz(1) bundle-viz.1

View File

@ -34,4 +34,110 @@ RSpec.describe Bundler::Dependency do
end
end
end
describe "PLATFORM_MAP" do
subject { described_class::PLATFORM_MAP }
# rubocop:disable Naming/VariableNumber
let(:platforms) do
{ :ruby => Gem::Platform::RUBY,
:ruby_18 => Gem::Platform::RUBY,
:ruby_19 => Gem::Platform::RUBY,
:ruby_20 => Gem::Platform::RUBY,
:ruby_21 => Gem::Platform::RUBY,
:ruby_22 => Gem::Platform::RUBY,
:ruby_23 => Gem::Platform::RUBY,
:ruby_24 => Gem::Platform::RUBY,
:ruby_25 => Gem::Platform::RUBY,
:ruby_26 => Gem::Platform::RUBY,
:ruby_27 => Gem::Platform::RUBY,
:ruby_30 => Gem::Platform::RUBY,
:ruby_31 => Gem::Platform::RUBY,
:mri => Gem::Platform::RUBY,
:mri_18 => Gem::Platform::RUBY,
:mri_19 => Gem::Platform::RUBY,
:mri_20 => Gem::Platform::RUBY,
:mri_21 => Gem::Platform::RUBY,
:mri_22 => Gem::Platform::RUBY,
:mri_23 => Gem::Platform::RUBY,
:mri_24 => Gem::Platform::RUBY,
:mri_25 => Gem::Platform::RUBY,
:mri_26 => Gem::Platform::RUBY,
:mri_27 => Gem::Platform::RUBY,
:mri_30 => Gem::Platform::RUBY,
:mri_31 => Gem::Platform::RUBY,
:rbx => Gem::Platform::RUBY,
:truffleruby => Gem::Platform::RUBY,
:jruby => Gem::Platform::JAVA,
:jruby_18 => Gem::Platform::JAVA,
:jruby_19 => Gem::Platform::JAVA,
:windows => Gem::Platform::WINDOWS,
:windows_18 => Gem::Platform::WINDOWS,
:windows_19 => Gem::Platform::WINDOWS,
:windows_20 => Gem::Platform::WINDOWS,
:windows_21 => Gem::Platform::WINDOWS,
:windows_22 => Gem::Platform::WINDOWS,
:windows_23 => Gem::Platform::WINDOWS,
:windows_24 => Gem::Platform::WINDOWS,
:windows_25 => Gem::Platform::WINDOWS,
:windows_26 => Gem::Platform::WINDOWS,
:windows_27 => Gem::Platform::WINDOWS,
:windows_30 => Gem::Platform::WINDOWS,
:windows_31 => Gem::Platform::WINDOWS,
:mswin => Gem::Platform::MSWIN,
:mswin_18 => Gem::Platform::MSWIN,
:mswin_19 => Gem::Platform::MSWIN,
:mswin_20 => Gem::Platform::MSWIN,
:mswin_21 => Gem::Platform::MSWIN,
:mswin_22 => Gem::Platform::MSWIN,
:mswin_23 => Gem::Platform::MSWIN,
:mswin_24 => Gem::Platform::MSWIN,
:mswin_25 => Gem::Platform::MSWIN,
:mswin_26 => Gem::Platform::MSWIN,
:mswin_27 => Gem::Platform::MSWIN,
:mswin_30 => Gem::Platform::MSWIN,
:mswin_31 => Gem::Platform::MSWIN,
:mswin64 => Gem::Platform::MSWIN64,
:mswin64_19 => Gem::Platform::MSWIN64,
:mswin64_20 => Gem::Platform::MSWIN64,
:mswin64_21 => Gem::Platform::MSWIN64,
:mswin64_22 => Gem::Platform::MSWIN64,
:mswin64_23 => Gem::Platform::MSWIN64,
:mswin64_24 => Gem::Platform::MSWIN64,
:mswin64_25 => Gem::Platform::MSWIN64,
:mswin64_26 => Gem::Platform::MSWIN64,
:mswin64_27 => Gem::Platform::MSWIN64,
:mswin64_30 => Gem::Platform::MSWIN64,
:mswin64_31 => Gem::Platform::MSWIN64,
:mingw => Gem::Platform::MINGW,
:mingw_18 => Gem::Platform::MINGW,
:mingw_19 => Gem::Platform::MINGW,
:mingw_20 => Gem::Platform::MINGW,
:mingw_21 => Gem::Platform::MINGW,
:mingw_22 => Gem::Platform::MINGW,
:mingw_23 => Gem::Platform::MINGW,
:mingw_24 => Gem::Platform::MINGW,
:mingw_25 => Gem::Platform::MINGW,
:mingw_26 => Gem::Platform::MINGW,
:mingw_27 => Gem::Platform::MINGW,
:mingw_30 => Gem::Platform::MINGW,
:mingw_31 => Gem::Platform::MINGW,
:x64_mingw => Gem::Platform::X64_MINGW,
:x64_mingw_20 => Gem::Platform::X64_MINGW,
:x64_mingw_21 => Gem::Platform::X64_MINGW,
:x64_mingw_22 => Gem::Platform::X64_MINGW,
:x64_mingw_23 => Gem::Platform::X64_MINGW,
:x64_mingw_24 => Gem::Platform::X64_MINGW,
:x64_mingw_25 => Gem::Platform::X64_MINGW,
:x64_mingw_26 => Gem::Platform::X64_MINGW,
:x64_mingw_27 => Gem::Platform::X64_MINGW,
:x64_mingw_30 => Gem::Platform::X64_MINGW,
:x64_mingw_31 => Gem::Platform::X64_MINGW }
end
# rubocop:enable Naming/VariableNumber
it "includes all platforms" do
expect(subject).to eq(platforms)
end
end
end

View File

@ -23,8 +23,8 @@ RSpec.describe "bundle help" do
end
it "still outputs the old help for commands that do not have man pages yet" do
bundle "help version"
expect(out).to include("Prints the bundler's version information")
bundle "help fund"
expect(out).to include("Lists information about gems seeking funding assistance")
end
it "looks for a binary and executes it with --help option if it's named bundler-<task>" do

View File

@ -475,7 +475,7 @@ RSpec.describe "bundle install with platform conditionals" do
gemfile <<-G
source "#{file_uri_for(gem_repo1)}"
gem "rack", :platform => [:mingw, :mswin, :x64_mingw, :jruby]
gem "rack", :platform => [:windows, :mingw, :mswin, :x64_mingw, :jruby]
G
bundle "install"

View File

@ -68,14 +68,14 @@ module Spec
if RUBY_PLATFORM == "java"
:jruby
elsif ["x64-mingw32", "x64-mingw-ucrt"].include?(RUBY_PLATFORM)
:x64_mingw
:windows
else
:ruby
end
end
def not_local_tag
[:jruby, :x64_mingw, :ruby].find {|tag| tag != local_tag }
[:jruby, :windows, :ruby].find {|tag| tag != local_tag }
end
def local_ruby_engine
@ -88,7 +88,7 @@ module Spec
def not_local_engine_version
case not_local_tag
when :ruby, :x64_mingw
when :ruby, :windows
not_local_ruby_version
when :jruby
"1.6.1"