bundler 2.6.2 → 2.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +91 -0
- data/README.md +2 -2
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/checksum.rb +1 -1
- data/lib/bundler/cli/console.rb +8 -6
- data/lib/bundler/cli/doctor.rb +23 -19
- data/lib/bundler/cli/info.rb +4 -4
- data/lib/bundler/cli/inject.rb +2 -2
- data/lib/bundler/cli/issue.rb +1 -1
- data/lib/bundler/cli/lock.rb +2 -1
- data/lib/bundler/cli/outdated.rb +6 -4
- data/lib/bundler/cli/show.rb +1 -1
- data/lib/bundler/compact_index_client/updater.rb +2 -1
- data/lib/bundler/current_ruby.rb +23 -33
- data/lib/bundler/definition.rb +125 -112
- data/lib/bundler/dependency.rb +92 -47
- data/lib/bundler/dsl.rb +83 -78
- data/lib/bundler/endpoint_specification.rb +10 -3
- data/lib/bundler/errors.rb +22 -0
- data/lib/bundler/feature_flag.rb +2 -6
- data/lib/bundler/gem_helpers.rb +4 -10
- data/lib/bundler/gem_version_promoter.rb +0 -2
- data/lib/bundler/injector.rb +9 -9
- data/lib/bundler/installer.rb +16 -2
- data/lib/bundler/lazy_specification.rb +50 -45
- data/lib/bundler/man/bundle-add.1 +3 -3
- data/lib/bundler/man/bundle-binstubs.1 +3 -3
- data/lib/bundler/man/bundle-cache.1 +3 -3
- data/lib/bundler/man/bundle-check.1 +3 -3
- data/lib/bundler/man/bundle-clean.1 +3 -3
- data/lib/bundler/man/bundle-config.1 +8 -8
- data/lib/bundler/man/bundle-config.1.ronn +9 -4
- data/lib/bundler/man/bundle-console.1 +3 -3
- data/lib/bundler/man/bundle-doctor.1 +3 -3
- data/lib/bundler/man/bundle-env.1 +3 -3
- data/lib/bundler/man/bundle-exec.1 +5 -5
- data/lib/bundler/man/bundle-exec.1.ronn +2 -2
- data/lib/bundler/man/bundle-fund.1 +3 -3
- data/lib/bundler/man/bundle-gem.1 +3 -3
- data/lib/bundler/man/bundle-help.1 +3 -3
- data/lib/bundler/man/bundle-info.1 +3 -3
- data/lib/bundler/man/bundle-init.1 +3 -3
- data/lib/bundler/man/bundle-inject.1 +3 -3
- data/lib/bundler/man/bundle-install.1 +3 -3
- data/lib/bundler/man/bundle-issue.1 +3 -3
- data/lib/bundler/man/bundle-licenses.1 +3 -3
- data/lib/bundler/man/bundle-list.1 +3 -3
- data/lib/bundler/man/bundle-lock.1 +3 -3
- data/lib/bundler/man/bundle-open.1 +3 -3
- data/lib/bundler/man/bundle-outdated.1 +3 -3
- data/lib/bundler/man/bundle-platform.1 +3 -3
- data/lib/bundler/man/bundle-plugin.1 +3 -3
- data/lib/bundler/man/bundle-pristine.1 +3 -3
- data/lib/bundler/man/bundle-remove.1 +3 -3
- data/lib/bundler/man/bundle-show.1 +3 -3
- data/lib/bundler/man/bundle-update.1 +3 -3
- data/lib/bundler/man/bundle-version.1 +3 -3
- data/lib/bundler/man/bundle-viz.1 +3 -3
- data/lib/bundler/man/bundle.1 +3 -3
- data/lib/bundler/man/gemfile.5 +3 -3
- data/lib/bundler/match_metadata.rb +13 -0
- data/lib/bundler/plugin/index.rb +5 -1
- data/lib/bundler/resolver/base.rb +2 -1
- data/lib/bundler/resolver/candidate.rb +11 -8
- data/lib/bundler/resolver/package.rb +8 -4
- data/lib/bundler/resolver/spec_group.rb +1 -25
- data/lib/bundler/resolver.rb +14 -4
- data/lib/bundler/ruby_dsl.rb +12 -3
- data/lib/bundler/rubygems_ext.rb +82 -81
- data/lib/bundler/rubygems_integration.rb +2 -15
- data/lib/bundler/runtime.rb +19 -24
- data/lib/bundler/shared_helpers.rb +4 -0
- data/lib/bundler/source/git/git_proxy.rb +6 -0
- data/lib/bundler/source/git.rb +6 -1
- data/lib/bundler/source/rubygems/remote.rb +11 -3
- data/lib/bundler/source/rubygems.rb +19 -4
- data/lib/bundler/source.rb +2 -0
- data/lib/bundler/source_list.rb +4 -0
- data/lib/bundler/spec_set.rb +66 -29
- data/lib/bundler/templates/newgem/Gemfile.tt +1 -0
- data/lib/bundler/vendor/uri/lib/uri/common.rb +7 -3
- data/lib/bundler/vendor/uri/lib/uri/generic.rb +12 -11
- data/lib/bundler/vendor/uri/lib/uri/rfc2396_parser.rb +6 -6
- data/lib/bundler/vendor/uri/lib/uri/version.rb +1 -1
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler.rb +10 -30
- metadata +3 -3
@@ -79,6 +79,9 @@ The options that can be configured are:
|
|
79
79
|
|
80
80
|
* `only`:
|
81
81
|
A space-separated list of groups to install only gems of the specified groups.
|
82
|
+
Please check carefully if you want to install also gems without a group, cause
|
83
|
+
they get put inside `default` group. For example `only test:default` will install
|
84
|
+
all gems specified in test group and without one.
|
82
85
|
|
83
86
|
* `path`:
|
84
87
|
The location to install the specified gems to. This defaults to Rubygems'
|
@@ -88,10 +91,12 @@ The options that can be configured are:
|
|
88
91
|
installed to other locations will not get listed.
|
89
92
|
|
90
93
|
* `without`:
|
91
|
-
A space-separated list of groups referencing gems to skip during
|
94
|
+
A space-separated or `:`-separated list of groups referencing gems to skip during
|
95
|
+
installation.
|
92
96
|
|
93
97
|
* `with`:
|
94
|
-
|
98
|
+
A space-separated or `:`-separated list of **optional** groups referencing gems to
|
99
|
+
include during installation.
|
95
100
|
|
96
101
|
## BUILD OPTIONS
|
97
102
|
|
@@ -280,9 +285,9 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
|
|
280
285
|
`system` will use the system version of Bundler, and `x.y.z` will use
|
281
286
|
the specified version of Bundler.
|
282
287
|
* `with` (`BUNDLE_WITH`):
|
283
|
-
A `:`-separated list of groups whose gems bundler should install.
|
288
|
+
A space-separated or `:`-separated list of groups whose gems bundler should install.
|
284
289
|
* `without` (`BUNDLE_WITHOUT`):
|
285
|
-
A `:`-separated list of groups whose gems bundler should not install.
|
290
|
+
A space-separated or `:`-separated list of groups whose gems bundler should not install.
|
286
291
|
|
287
292
|
## LOCAL GIT REPOS
|
288
293
|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-CONSOLE" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-CONSOLE" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-console\fR \- Open an IRB session with the bundle pre\-loaded
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-DOCTOR" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-DOCTOR" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-doctor\fR \- Checks the bundle for common problems
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-ENV" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-ENV" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-env\fR \- Print information about the environment Bundler is running under
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-EXEC" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-EXEC" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-exec\fR \- Execute a command in the context of the bundle
|
6
6
|
.SH "SYNOPSIS"
|
@@ -74,8 +74,8 @@ end
|
|
74
74
|
Bundler provides convenience helpers that wrap \fBsystem\fR and \fBexec\fR, and they can be used like this:
|
75
75
|
.IP "" 4
|
76
76
|
.nf
|
77
|
-
Bundler\.
|
78
|
-
Bundler\.
|
77
|
+
Bundler\.unbundled_system('brew install wget')
|
78
|
+
Bundler\.unbundled_exec('brew install wget')
|
79
79
|
.fi
|
80
80
|
.IP "" 0
|
81
81
|
.SH "RUBYGEMS PLUGINS"
|
@@ -108,8 +108,8 @@ need to use `with_unbundled_env`.
|
|
108
108
|
Bundler provides convenience helpers that wrap `system` and `exec`, and they
|
109
109
|
can be used like this:
|
110
110
|
|
111
|
-
Bundler.
|
112
|
-
Bundler.
|
111
|
+
Bundler.unbundled_system('brew install wget')
|
112
|
+
Bundler.unbundled_exec('brew install wget')
|
113
113
|
|
114
114
|
|
115
115
|
## RUBYGEMS PLUGINS
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-FUND" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-FUND" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-fund\fR \- Lists information about gems seeking funding assistance
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-GEM" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-GEM" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-gem\fR \- Generate a project skeleton for creating a rubygem
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-HELP" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-HELP" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-help\fR \- Displays detailed help for each subcommand
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-INFO" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-INFO" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-info\fR \- Show information for the given gem in your bundle
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-INIT" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-INIT" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-init\fR \- Generates a Gemfile into the current working directory
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-INJECT" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-INJECT" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-inject\fR \- Add named gem(s) with version requirements to Gemfile
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-INSTALL" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-INSTALL" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-install\fR \- Install the dependencies specified in your Gemfile
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-ISSUE" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-ISSUE" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-issue\fR \- Get help reporting Bundler issues
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-LICENSES" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-LICENSES" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-licenses\fR \- Print the license of all gems in the bundle
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-LIST" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-LIST" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-list\fR \- List all the gems in the bundle
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-LOCK" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-LOCK" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-OPEN" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-OPEN" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-open\fR \- Opens the source directory for a gem in your bundle
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-OUTDATED" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-OUTDATED" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-outdated\fR \- List installed gems with newer versions available
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-PLATFORM" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-PLATFORM" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-platform\fR \- Displays platform compatibility information
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-PLUGIN" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-PLUGIN" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-plugin\fR \- Manage Bundler plugins
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-PRISTINE" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-PRISTINE" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-pristine\fR \- Restores installed gems to their pristine condition
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-REMOVE" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-REMOVE" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-remove\fR \- Removes gems from the Gemfile
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-SHOW" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-SHOW" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-show\fR \- Shows all the gems in your bundle, or the path to a gem
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-UPDATE" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-UPDATE" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-update\fR \- Update your gems to the latest available versions
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-VERSION" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-VERSION" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-version\fR \- Prints Bundler version information
|
6
6
|
.SH "SYNOPSIS"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE\-VIZ" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE\-VIZ" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\-viz\fR \- Generates a visual dependency graph for your Gemfile
|
6
6
|
.SH "SYNOPSIS"
|
data/lib/bundler/man/bundle.1
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "BUNDLE" "1" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "BUNDLE" "1" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBbundle\fR \- Ruby Dependency Management
|
6
6
|
.SH "SYNOPSIS"
|
data/lib/bundler/man/gemfile.5
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
.\" generated with
|
2
|
-
.\"
|
3
|
-
.TH "GEMFILE" "5" "
|
1
|
+
.\" generated with Ronn-NG/v0.10.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.10.1
|
3
|
+
.TH "GEMFILE" "5" "March 2025" ""
|
4
4
|
.SH "NAME"
|
5
5
|
\fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
|
6
6
|
.SH "SYNOPSIS"
|
@@ -13,5 +13,18 @@ module Bundler
|
|
13
13
|
def matches_current_rubygems?
|
14
14
|
@required_rubygems_version.satisfied_by?(Gem.rubygems_version)
|
15
15
|
end
|
16
|
+
|
17
|
+
def expanded_dependencies
|
18
|
+
runtime_dependencies + [
|
19
|
+
metadata_dependency("Ruby", @required_ruby_version),
|
20
|
+
metadata_dependency("RubyGems", @required_rubygems_version),
|
21
|
+
].compact
|
22
|
+
end
|
23
|
+
|
24
|
+
def metadata_dependency(name, requirement)
|
25
|
+
return if requirement.nil? || requirement.none?
|
26
|
+
|
27
|
+
Gem::Dependency.new("#{name}\0", requirement)
|
28
|
+
end
|
16
29
|
end
|
17
30
|
end
|
data/lib/bundler/plugin/index.rb
CHANGED
@@ -31,9 +31,13 @@ module Bundler
|
|
31
31
|
|
32
32
|
begin
|
33
33
|
load_index(global_index_file, true)
|
34
|
-
rescue
|
34
|
+
rescue PermissionError
|
35
35
|
# no need to fail when on a read-only FS, for example
|
36
36
|
nil
|
37
|
+
rescue ArgumentError => e
|
38
|
+
# ruby 3.4 checks writability in Dir.tmpdir
|
39
|
+
raise unless e.message&.include?("could not find a temporary directory")
|
40
|
+
nil
|
37
41
|
end
|
38
42
|
load_index(local_index_file) if SharedHelpers.in_bundle?
|
39
43
|
end
|
@@ -5,10 +5,11 @@ require_relative "package"
|
|
5
5
|
module Bundler
|
6
6
|
class Resolver
|
7
7
|
class Base
|
8
|
-
attr_reader :packages, :requirements, :source_requirements
|
8
|
+
attr_reader :packages, :requirements, :source_requirements, :locked_specs
|
9
9
|
|
10
10
|
def initialize(source_requirements, dependencies, base, platforms, options)
|
11
11
|
@source_requirements = source_requirements
|
12
|
+
@locked_specs = options[:locked_specs]
|
12
13
|
|
13
14
|
@base = base
|
14
15
|
|
@@ -48,35 +48,38 @@ module Bundler
|
|
48
48
|
@version.segments
|
49
49
|
end
|
50
50
|
|
51
|
-
def sort_obj
|
52
|
-
[@version, @priority]
|
53
|
-
end
|
54
|
-
|
55
51
|
def <=>(other)
|
56
52
|
return unless other.is_a?(self.class)
|
57
53
|
|
58
|
-
|
54
|
+
version_comparison = version <=> other.version
|
55
|
+
return version_comparison unless version_comparison.zero?
|
56
|
+
|
57
|
+
priority <=> other.priority
|
59
58
|
end
|
60
59
|
|
61
60
|
def ==(other)
|
62
61
|
return unless other.is_a?(self.class)
|
63
62
|
|
64
|
-
|
63
|
+
version == other.version && priority == other.priority
|
65
64
|
end
|
66
65
|
|
67
66
|
def eql?(other)
|
68
67
|
return unless other.is_a?(self.class)
|
69
68
|
|
70
|
-
|
69
|
+
version.eql?(other.version) && priority.eql?(other.priority)
|
71
70
|
end
|
72
71
|
|
73
72
|
def hash
|
74
|
-
|
73
|
+
[@version, @priority].hash
|
75
74
|
end
|
76
75
|
|
77
76
|
def to_s
|
78
77
|
@version.to_s
|
79
78
|
end
|
79
|
+
|
80
|
+
protected
|
81
|
+
|
82
|
+
attr_reader :priority
|
80
83
|
end
|
81
84
|
end
|
82
85
|
end
|
@@ -15,19 +15,23 @@ module Bundler
|
|
15
15
|
class Package
|
16
16
|
attr_reader :name, :platforms, :dependency, :locked_version
|
17
17
|
|
18
|
-
def initialize(name, platforms, locked_specs:, unlock:, prerelease: false, prefer_local: false, dependency: nil)
|
18
|
+
def initialize(name, platforms, locked_specs:, unlock:, prerelease: false, prefer_local: false, dependency: nil, new_platforms: [])
|
19
19
|
@name = name
|
20
20
|
@platforms = platforms
|
21
|
-
@locked_version = locked_specs
|
21
|
+
@locked_version = locked_specs.version_for(name)
|
22
22
|
@unlock = unlock
|
23
23
|
@dependency = dependency || Dependency.new(name, @locked_version)
|
24
24
|
@top_level = !dependency.nil?
|
25
25
|
@prerelease = @dependency.prerelease? || @locked_version&.prerelease? || prerelease ? :consider_first : :ignore
|
26
26
|
@prefer_local = prefer_local
|
27
|
+
@new_platforms = new_platforms
|
27
28
|
end
|
28
29
|
|
29
30
|
def platform_specs(specs)
|
30
|
-
platforms.map
|
31
|
+
platforms.map do |platform|
|
32
|
+
prefer_locked = @new_platforms.include?(platform) ? false : !unlock?
|
33
|
+
GemHelpers.select_best_platform_match(specs, platform, prefer_locked: prefer_locked)
|
34
|
+
end
|
31
35
|
end
|
32
36
|
|
33
37
|
def to_s
|
@@ -55,7 +59,7 @@ module Bundler
|
|
55
59
|
end
|
56
60
|
|
57
61
|
def unlock?
|
58
|
-
@unlock
|
62
|
+
@unlock == true || @unlock.include?(name)
|
59
63
|
end
|
60
64
|
|
61
65
|
def ignores_prereleases?
|
@@ -39,9 +39,7 @@ module Bundler
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def dependencies
|
42
|
-
@dependencies ||= @specs.flat_map
|
43
|
-
__dependencies(spec) + metadata_dependencies(spec)
|
44
|
-
end.uniq.sort
|
42
|
+
@dependencies ||= @specs.flat_map(&:expanded_dependencies).uniq.sort
|
45
43
|
end
|
46
44
|
|
47
45
|
def ==(other)
|
@@ -71,28 +69,6 @@ module Bundler
|
|
71
69
|
def exemplary_spec
|
72
70
|
@specs.first
|
73
71
|
end
|
74
|
-
|
75
|
-
def __dependencies(spec)
|
76
|
-
dependencies = []
|
77
|
-
spec.dependencies.each do |dep|
|
78
|
-
next if dep.type == :development
|
79
|
-
dependencies << Dependency.new(dep.name, dep.requirement)
|
80
|
-
end
|
81
|
-
dependencies
|
82
|
-
end
|
83
|
-
|
84
|
-
def metadata_dependencies(spec)
|
85
|
-
[
|
86
|
-
metadata_dependency("Ruby", spec.required_ruby_version),
|
87
|
-
metadata_dependency("RubyGems", spec.required_rubygems_version),
|
88
|
-
].compact
|
89
|
-
end
|
90
|
-
|
91
|
-
def metadata_dependency(name, requirement)
|
92
|
-
return if requirement.nil? || requirement.none?
|
93
|
-
|
94
|
-
Dependency.new("#{name}\0", requirement)
|
95
|
-
end
|
96
72
|
end
|
97
73
|
end
|
98
74
|
end
|
data/lib/bundler/resolver.rb
CHANGED
@@ -80,7 +80,8 @@ module Bundler
|
|
80
80
|
def solve_versions(root:, logger:)
|
81
81
|
solver = PubGrub::VersionSolver.new(source: self, root: root, logger: logger)
|
82
82
|
result = solver.solve
|
83
|
-
result.flat_map {|package, version| version.to_specs(package, @most_specific_locked_platform) }
|
83
|
+
resolved_specs = result.flat_map {|package, version| version.to_specs(package, @most_specific_locked_platform) }
|
84
|
+
SpecSet.new(resolved_specs).specs_with_additional_variants_from(@base.locked_specs)
|
84
85
|
rescue PubGrub::SolveFailure => e
|
85
86
|
incompatibility = e.incompatibility
|
86
87
|
|
@@ -236,7 +237,7 @@ module Bundler
|
|
236
237
|
sorted_versions[high]
|
237
238
|
end
|
238
239
|
|
239
|
-
range = PubGrub::VersionRange.new(min: low, max: high, include_min:
|
240
|
+
range = PubGrub::VersionRange.new(min: low, max: high, include_min: !low.nil?)
|
240
241
|
|
241
242
|
self_constraint = PubGrub::VersionConstraint.new(package, range: range)
|
242
243
|
|
@@ -388,9 +389,18 @@ module Bundler
|
|
388
389
|
end
|
389
390
|
|
390
391
|
def filter_remote_specs(specs, package)
|
391
|
-
|
392
|
+
if package.prefer_local?
|
393
|
+
local_specs = specs.select {|s| s.is_a?(StubSpecification) }
|
392
394
|
|
393
|
-
|
395
|
+
if local_specs.empty?
|
396
|
+
package.consider_remote_versions!
|
397
|
+
specs
|
398
|
+
else
|
399
|
+
local_specs
|
400
|
+
end
|
401
|
+
else
|
402
|
+
specs
|
403
|
+
end
|
394
404
|
end
|
395
405
|
|
396
406
|
# Ignore versions that depend on themselves incorrectly
|
data/lib/bundler/ruby_dsl.rb
CHANGED
@@ -42,9 +42,18 @@ module Bundler
|
|
42
42
|
# Loads the file relative to the dirname of the Gemfile itself.
|
43
43
|
def normalize_ruby_file(filename)
|
44
44
|
file_content = Bundler.read_file(gemfile.dirname.join(filename))
|
45
|
-
# match "ruby-3.2.2" or "ruby 3.2.2" capturing version string up to the first space or comment
|
46
|
-
if /^
|
47
|
-
|
45
|
+
# match "ruby-3.2.2", ruby = "3.2.2" or "ruby 3.2.2" capturing version string up to the first space or comment
|
46
|
+
if /^ # Start of line
|
47
|
+
ruby # Literal "ruby"
|
48
|
+
[\s-]* # Optional whitespace or hyphens (for "ruby-3.2.2" format)
|
49
|
+
(?:=\s*)? # Optional equals sign with whitespace (for ruby = "3.2.2" format)
|
50
|
+
"? # Optional opening quote
|
51
|
+
( # Start capturing group
|
52
|
+
[^\s#"]+ # One or more chars that aren't spaces, #, or quotes
|
53
|
+
) # End capturing group
|
54
|
+
"? # Optional closing quote
|
55
|
+
/x.match(file_content)
|
56
|
+
$1
|
48
57
|
else
|
49
58
|
file_content.strip
|
50
59
|
end
|