bundler 4.0.17 → 4.0.18
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 +25 -0
- data/lib/bundler/build_metadata.rb +1 -1
- data/lib/bundler/cli/check.rb +1 -3
- data/lib/bundler/cli/issue.rb +2 -2
- data/lib/bundler/cli/lock.rb +3 -0
- data/lib/bundler/cli.rb +2 -0
- data/lib/bundler/compact_index_client/cache.rb +11 -0
- data/lib/bundler/endpoint_specification.rb +6 -1
- data/lib/bundler/fetcher.rb +7 -1
- data/lib/bundler/installer/parallel_installer.rb +9 -1
- data/lib/bundler/man/bundle-add.1 +1 -1
- data/lib/bundler/man/bundle-add.1.ronn +1 -1
- data/lib/bundler/man/bundle-cache.1 +3 -0
- data/lib/bundler/man/bundle-cache.1.ronn +6 -0
- data/lib/bundler/man/bundle-config.1 +1 -1
- data/lib/bundler/man/bundle-config.1.ronn +2 -0
- data/lib/bundler/man/bundle-console.1 +2 -2
- data/lib/bundler/man/bundle-console.1.ronn +2 -2
- data/lib/bundler/man/bundle-init.1 +1 -1
- data/lib/bundler/man/bundle-init.1.ronn +1 -1
- data/lib/bundler/man/bundle-lock.1 +4 -1
- data/lib/bundler/man/bundle-lock.1.ronn +6 -0
- data/lib/bundler/man/bundle-plugin.1 +1 -1
- data/lib/bundler/man/bundle-plugin.1.ronn +1 -1
- data/lib/bundler/man/bundle.1 +22 -1
- data/lib/bundler/man/bundle.1.ronn +22 -1
- data/lib/bundler/man/gemfile.5 +12 -1
- data/lib/bundler/man/gemfile.5.ronn +20 -1
- data/lib/bundler/source_list.rb +30 -1
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ce6bf9b503cf8fbe56890d80055e7b66389f1454eb93c13b4fb18dfc62158cd1
|
|
4
|
+
data.tar.gz: e1f51fdb265c4717df5797824a7a4b89693fa259655f95e33d04a3596157b886
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9382209cbfdbddee4c21dcb2d9f22039ebcc2079b0998ff3cf133b14efa93ae146ebcc5570a9d157ce1cd383bcd6b0192ea89ff7590b990e21490f0c874aff8e
|
|
7
|
+
data.tar.gz: 9889c94bcbf7c3eb0d91aeaf650c1bfdbcd3f42c0386c3a603bbc777552b95cd973511d700814e1ecceb881a931c2b1045da9059d3b1eb33bbf88babda3b5a81
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.0.18 / 2026-08-05
|
|
4
|
+
|
|
5
|
+
### Enhancements:
|
|
6
|
+
|
|
7
|
+
* Don't mask install errors when no Gemfile can be located. Pull request [#9757](https://github.com/ruby/rubygems/pull/9757) by hsbt
|
|
8
|
+
* Warn when duplicate source declarations conflict on cooldown. Pull request [#9736](https://github.com/ruby/rubygems/pull/9736) by hsbt
|
|
9
|
+
* Redact URI userinfo from settings names in Bundler User-Agent. Pull request [#9716](https://github.com/ruby/rubygems/pull/9716) by hsbt
|
|
10
|
+
* Validate gem name before building compact index cache paths. Pull request [#9717](https://github.com/ruby/rubygems/pull/9717) by hsbt
|
|
11
|
+
|
|
12
|
+
### Bug fixes:
|
|
13
|
+
|
|
14
|
+
* Fail `bundle check` when frozen mode needs lockfile changes. Pull request [#9715](https://github.com/ruby/rubygems/pull/9715) by hsbt
|
|
15
|
+
* Skip empty checksum values in compact index metadata. Pull request [#9713](https://github.com/ruby/rubygems/pull/9713) by hsbt
|
|
16
|
+
|
|
17
|
+
### Security:
|
|
18
|
+
|
|
19
|
+
* Add --cooldown flag to bundle lock and bundle cache. Pull request [#9725](https://github.com/ruby/rubygems/pull/9725) by hsbt
|
|
20
|
+
|
|
21
|
+
### Documentation:
|
|
22
|
+
|
|
23
|
+
* Point bundler.io URLs at guides.rubygems.org. Pull request [#9737](https://github.com/ruby/rubygems/pull/9737) by hsbt
|
|
24
|
+
* Document Bundler checksum behavior for default gems. Pull request [#9735](https://github.com/ruby/rubygems/pull/9735) by p-linnane
|
|
25
|
+
* List missing subcommands in bundle(1) UTILITIES section. Pull request [#9721](https://github.com/ruby/rubygems/pull/9721) by hsbt
|
|
26
|
+
* Document pessimistic operator and eval_gemfile in gemfile(5). Pull request [#9719](https://github.com/ruby/rubygems/pull/9719) by hsbt
|
|
27
|
+
|
|
3
28
|
## 4.0.17 / 2026-07-22
|
|
4
29
|
|
|
5
30
|
### Enhancements:
|
data/lib/bundler/cli/check.rb
CHANGED
|
@@ -12,6 +12,7 @@ module Bundler
|
|
|
12
12
|
Bundler.settings.set_command_option_if_given :path, options[:path]
|
|
13
13
|
|
|
14
14
|
definition = Bundler.definition
|
|
15
|
+
definition.ensure_equivalent_gemfile_and_lockfile
|
|
15
16
|
definition.validate_runtime!
|
|
16
17
|
|
|
17
18
|
begin
|
|
@@ -28,9 +29,6 @@ module Bundler
|
|
|
28
29
|
not_installed.each {|s| Bundler.ui.error " * #{s.name} (#{s.version})" }
|
|
29
30
|
Bundler.ui.warn "Install missing gems with `bundle install`"
|
|
30
31
|
exit 1
|
|
31
|
-
elsif !Bundler.default_lockfile.file? && Bundler.frozen_bundle?
|
|
32
|
-
Bundler.ui.error "This bundle has been frozen, but there is no #{SharedHelpers.relative_lockfile_path} present"
|
|
33
|
-
exit 1
|
|
34
32
|
else
|
|
35
33
|
definition.lock(true) unless options[:"dry-run"]
|
|
36
34
|
Bundler.ui.info "The Gemfile's dependencies are satisfied"
|
data/lib/bundler/cli/issue.rb
CHANGED
|
@@ -13,10 +13,10 @@ module Bundler
|
|
|
13
13
|
https://github.com/ruby/rubygems/blob/master/doc/bundler/TROUBLESHOOTING.md
|
|
14
14
|
|
|
15
15
|
2. Instructions for common Bundler uses can be found on the documentation
|
|
16
|
-
site: https://
|
|
16
|
+
site: https://guides.rubygems.org/
|
|
17
17
|
|
|
18
18
|
3. Information about each Bundler command can be found in the Bundler
|
|
19
|
-
man pages: https://
|
|
19
|
+
man pages: https://guides.rubygems.org/command-reference/bundle/
|
|
20
20
|
|
|
21
21
|
Hopefully the troubleshooting steps above resolved your problem! If things
|
|
22
22
|
still aren't working the way you expect them to, please let us know so
|
data/lib/bundler/cli/lock.rb
CHANGED
|
@@ -16,6 +16,9 @@ module Bundler
|
|
|
16
16
|
|
|
17
17
|
check_for_conflicting_options
|
|
18
18
|
|
|
19
|
+
Bundler::CLI::Common.validate_cooldown!(options[:cooldown])
|
|
20
|
+
Bundler.settings.set_command_option_if_given :cooldown, options[:cooldown]
|
|
21
|
+
|
|
19
22
|
print = options[:print]
|
|
20
23
|
previous_output_stream = Bundler.ui.output_stream
|
|
21
24
|
Bundler.ui.output_stream = :stderr if print
|
data/lib/bundler/cli.rb
CHANGED
|
@@ -461,6 +461,7 @@ module Bundler
|
|
|
461
461
|
method_option "path", type: :string, banner: "Specify a different path than the system default, namely, $BUNDLE_PATH or $GEM_HOME (removed)."
|
|
462
462
|
method_option "quiet", type: :boolean, banner: "Only output warnings and errors."
|
|
463
463
|
method_option "frozen", type: :boolean, banner: "Do not allow the Gemfile.lock to be updated after this bundle cache operation's install (removed)"
|
|
464
|
+
method_option "cooldown", type: :numeric, banner: "Only consider gem versions published at least N days ago. Use 0 to disable."
|
|
464
465
|
long_desc <<-D
|
|
465
466
|
The cache command will copy the .gem files for every gem in the bundle into the
|
|
466
467
|
directory ./vendor/cache. If you then check that directory into your source
|
|
@@ -642,6 +643,7 @@ module Bundler
|
|
|
642
643
|
method_option "strict", type: :boolean, banner: "If updating, do not allow any gem to be updated past latest --patch | --minor | --major"
|
|
643
644
|
method_option "conservative", type: :boolean, banner: "If updating, use bundle install conservative update behavior and do not allow shared dependencies to be updated"
|
|
644
645
|
method_option "bundler", type: :string, lazy_default: "> 0.a", banner: "Update the locked version of bundler"
|
|
646
|
+
method_option "cooldown", type: :numeric, banner: "Only consider gem versions published at least N days ago. Use 0 to disable."
|
|
645
647
|
def lock
|
|
646
648
|
require_relative "cli/lock"
|
|
647
649
|
Lock.new(options).run
|
|
@@ -50,6 +50,7 @@ module Bundler
|
|
|
50
50
|
|
|
51
51
|
def info_path(name)
|
|
52
52
|
name = name.to_s
|
|
53
|
+
validate_name!(name)
|
|
53
54
|
# TODO: converge this into the info_root by hashing all filenames like info_etag_path
|
|
54
55
|
if /[^a-z0-9_-]/.match?(name)
|
|
55
56
|
name += "-#{SharedHelpers.digest(:MD5).hexdigest(name).downcase}"
|
|
@@ -61,9 +62,19 @@ module Bundler
|
|
|
61
62
|
|
|
62
63
|
def info_etag_path(name)
|
|
63
64
|
name = name.to_s
|
|
65
|
+
validate_name!(name)
|
|
64
66
|
@info_etag_root.join("#{name}-#{SharedHelpers.digest(:MD5).hexdigest(name).downcase}")
|
|
65
67
|
end
|
|
66
68
|
|
|
69
|
+
# Gem names come from the remote index and are not otherwise
|
|
70
|
+
# validated, so refuse anything that would escape the cache
|
|
71
|
+
# directory when used as a path component.
|
|
72
|
+
def validate_name!(name)
|
|
73
|
+
return if File.basename(name) == name
|
|
74
|
+
|
|
75
|
+
raise SecurityError, "malformed gem name: #{name.inspect}"
|
|
76
|
+
end
|
|
77
|
+
|
|
67
78
|
def mkdir(name)
|
|
68
79
|
directory.join(name).tap do |dir|
|
|
69
80
|
SharedHelpers.filesystem_access(dir) do
|
|
@@ -153,8 +153,13 @@ module Bundler
|
|
|
153
153
|
next unless v
|
|
154
154
|
case k.to_s
|
|
155
155
|
when "checksum"
|
|
156
|
+
# Some registries send empty checksum values, treat them as if the
|
|
157
|
+
# checksum was not included at all
|
|
158
|
+
checksum = v.last
|
|
159
|
+
next unless checksum
|
|
160
|
+
|
|
156
161
|
begin
|
|
157
|
-
@checksum = Checksum.from_api(
|
|
162
|
+
@checksum = Checksum.from_api(checksum, @spec_fetcher.uri)
|
|
158
163
|
rescue ArgumentError => e
|
|
159
164
|
raise ArgumentError, "Invalid checksum for #{full_name}: #{e.message}"
|
|
160
165
|
end
|
data/lib/bundler/fetcher.rb
CHANGED
|
@@ -215,7 +215,13 @@ module Bundler
|
|
|
215
215
|
agent << " #{ruby.engine}/#{ruby.versions_string(engine_version)}"
|
|
216
216
|
end
|
|
217
217
|
|
|
218
|
-
|
|
218
|
+
# Some settings keys embed a URI (e.g. `mirror.<uri>`) whose userinfo can
|
|
219
|
+
# carry credentials. Strip the userinfo before advertising the setting
|
|
220
|
+
# names so we don't leak secrets to every gem source we talk to.
|
|
221
|
+
options = Bundler.settings.all.map do |key|
|
|
222
|
+
key.include?("://") ? key.gsub(%r{//[^/@]+@}, "//") : key
|
|
223
|
+
end
|
|
224
|
+
agent << " options/#{options.join(",")}"
|
|
219
225
|
|
|
220
226
|
agent << " ci/#{cis.join(",")}" if cis.any?
|
|
221
227
|
|
|
@@ -255,7 +255,15 @@ module Bundler
|
|
|
255
255
|
|
|
256
256
|
def require_tree_for_spec(spec)
|
|
257
257
|
tree = @spec_set.what_required(spec)
|
|
258
|
-
|
|
258
|
+
gemfile_name = begin
|
|
259
|
+
File.basename(SharedHelpers.default_gemfile)
|
|
260
|
+
rescue GemfileNotFound
|
|
261
|
+
# This runs while reporting an install error. When no Gemfile can be
|
|
262
|
+
# located (e.g. Bundler used as a library), raising here would mask
|
|
263
|
+
# the original error, so fall back to a generic header instead.
|
|
264
|
+
"Gemfile"
|
|
265
|
+
end
|
|
266
|
+
t = String.new("In #{gemfile_name}:\n")
|
|
259
267
|
tree.each_with_index do |s, depth|
|
|
260
268
|
t << " " * depth.succ << s.name
|
|
261
269
|
unless tree.last == s
|
|
@@ -76,4 +76,4 @@ You can assign the gem to more than one group\.
|
|
|
76
76
|
\fBbundle add rails \-\-group "development, test"\fR
|
|
77
77
|
.IP "" 0
|
|
78
78
|
.SH "SEE ALSO"
|
|
79
|
-
Gemfile(5) \fIhttps://
|
|
79
|
+
Gemfile(5) \fIhttps://guides\.rubygems\.org/gemfile/\fR, bundle\-remove(1) \fIbundle\-remove\.1\.html\fR
|
|
@@ -17,6 +17,9 @@ Include gems for all platforms present in the lockfile, not only the current one
|
|
|
17
17
|
\fB\-\-cache\-path=CACHE\-PATH\fR
|
|
18
18
|
Specify a different cache path than the default (vendor/cache)\.
|
|
19
19
|
.TP
|
|
20
|
+
\fB\-\-cooldown=<number>\fR
|
|
21
|
+
Only consider gem versions published at least \fInumber\fR days ago when resolving before caching\. Pass \fB0\fR to disable cooldown for this run, overriding any per\-source or global configuration\. See \fBcooldown\fR in bundle\-config(1)\.
|
|
22
|
+
.TP
|
|
20
23
|
\fB\-\-gemfile=GEMFILE\fR
|
|
21
24
|
Use the specified gemfile instead of Gemfile\.
|
|
22
25
|
.TP
|
|
@@ -21,6 +21,12 @@ use the gems in the cache in preference to the ones on `rubygems.org`.
|
|
|
21
21
|
* `--cache-path=CACHE-PATH`:
|
|
22
22
|
Specify a different cache path than the default (vendor/cache).
|
|
23
23
|
|
|
24
|
+
* `--cooldown=<number>`:
|
|
25
|
+
Only consider gem versions published at least <number> days ago when
|
|
26
|
+
resolving before caching. Pass `0` to disable cooldown for this run,
|
|
27
|
+
overriding any per-source or global configuration. See `cooldown` in
|
|
28
|
+
bundle-config(1).
|
|
29
|
+
|
|
24
30
|
* `--gemfile=GEMFILE`:
|
|
25
31
|
Use the specified gemfile instead of Gemfile.
|
|
26
32
|
|
|
@@ -139,7 +139,7 @@ Cooldown filtering depends on the gem server providing a per\-version \fBcreated
|
|
|
139
139
|
.IP "\(bu" 4
|
|
140
140
|
\fBlockfile\fR (\fBBUNDLE_LOCKFILE\fR): The path to the lockfile that bundler should use\. By default, Bundler adds \fB\.lock\fR to the end of the \fBgemfile\fR entry\. Can be set to \fBfalse\fR in the Gemfile to disable lockfile creation entirely (see gemfile(5))\.
|
|
141
141
|
.IP "\(bu" 4
|
|
142
|
-
\fBlockfile_checksums\fR (\fBBUNDLE_LOCKFILE_CHECKSUMS\fR): Whether Bundler should include a checksums section in new lockfiles, to protect from compromised gem sources\. Defaults to true\.
|
|
142
|
+
\fBlockfile_checksums\fR (\fBBUNDLE_LOCKFILE_CHECKSUMS\fR): Whether Bundler should include a checksums section in new lockfiles, to protect from compromised gem sources\. Defaults to true\. Bundler's own checksum is only included when its \fB\.gem\fR file is cached, which may not be the case when Bundler is installed as a default gem\.
|
|
143
143
|
.IP "\(bu" 4
|
|
144
144
|
\fBno_install\fR (\fBBUNDLE_NO_INSTALL\fR): Whether \fBbundle package\fR should skip installing gems\.
|
|
145
145
|
.IP "\(bu" 4
|
|
@@ -230,6 +230,8 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
|
|
|
230
230
|
Gemfile to disable lockfile creation entirely (see gemfile(5)).
|
|
231
231
|
* `lockfile_checksums` (`BUNDLE_LOCKFILE_CHECKSUMS`):
|
|
232
232
|
Whether Bundler should include a checksums section in new lockfiles, to protect from compromised gem sources. Defaults to true.
|
|
233
|
+
Bundler's own checksum is only included when its `.gem` file is cached, which
|
|
234
|
+
may not be the case when Bundler is installed as a default gem.
|
|
233
235
|
* `no_install` (`BUNDLE_NO_INSTALL`):
|
|
234
236
|
Whether `bundle package` should skip installing gems.
|
|
235
237
|
* `no_prune` (`BUNDLE_NO_PRUNE`):
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
.SH "DESCRIPTION"
|
|
9
9
|
Starts an interactive Ruby console session in the context of the current bundle\.
|
|
10
10
|
.P
|
|
11
|
-
If no \fBGROUP\fR is specified, all gems in the \fBdefault\fR group in the Gemfile(5) \fIhttps://
|
|
11
|
+
If no \fBGROUP\fR is specified, all gems in the \fBdefault\fR group in the Gemfile(5) \fIhttps://guides\.rubygems\.org/gemfile/\fR are preliminarily loaded\.
|
|
12
12
|
.P
|
|
13
13
|
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\.
|
|
14
14
|
.P
|
|
@@ -30,4 +30,4 @@ Resolving dependencies\|\.\|\.\|\.
|
|
|
30
30
|
[1] pry(main)>
|
|
31
31
|
.fi
|
|
32
32
|
.SH "SEE ALSO"
|
|
33
|
-
Gemfile(5) \fIhttps://
|
|
33
|
+
Gemfile(5) \fIhttps://guides\.rubygems\.org/gemfile/\fR
|
|
@@ -9,7 +9,7 @@ bundle-console(1) -- Open an IRB session with the bundle pre-loaded
|
|
|
9
9
|
|
|
10
10
|
Starts an interactive Ruby console session in the context of the current bundle.
|
|
11
11
|
|
|
12
|
-
If no `GROUP` is specified, all gems in the `default` group in the [Gemfile(5)](https://
|
|
12
|
+
If no `GROUP` is specified, all gems in the `default` group in the [Gemfile(5)](https://guides.rubygems.org/gemfile/) are
|
|
13
13
|
preliminarily loaded.
|
|
14
14
|
|
|
15
15
|
If `GROUP` is specified, all gems in the given group in the Gemfile in addition
|
|
@@ -36,4 +36,4 @@ the shell from the following:
|
|
|
36
36
|
|
|
37
37
|
## SEE ALSO
|
|
38
38
|
|
|
39
|
-
[Gemfile(5)](https://
|
|
39
|
+
[Gemfile(5)](https://guides.rubygems.org/gemfile/)
|
|
@@ -17,4 +17,4 @@ Use the specified name for the gemfile instead of \fBGemfile\fR
|
|
|
17
17
|
.SH "FILES"
|
|
18
18
|
Included in the default [\fBGemfile(5)\fR][Gemfile(5)] generated is the line \fB# frozen_string_literal: true\fR\. This is a magic comment supported for the first time in Ruby 2\.3\. The presence of this line results in all string literals in the file being implicitly frozen\.
|
|
19
19
|
.SH "SEE ALSO"
|
|
20
|
-
Gemfile(5) \fIhttps://
|
|
20
|
+
Gemfile(5) \fIhttps://guides\.rubygems\.org/gemfile/\fR
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
.SH "NAME"
|
|
5
5
|
\fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
|
|
6
6
|
.SH "SYNOPSIS"
|
|
7
|
-
\fBbundle lock\fR [\-\-update] [\-\-bundler[=BUNDLER]] [\-\-local] [\-\-print] [\-\-lockfile=PATH] [\-\-full\-index] [\-\-gemfile=GEMFILE] [\-\-add\-checksums] [\-\-add\-platform] [\-\-remove\-platform] [\-\-normalize\-platforms] [\-\-patch] [\-\-minor] [\-\-major] [\-\-pre] [\-\-strict] [\-\-conservative]
|
|
7
|
+
\fBbundle lock\fR [\-\-update] [\-\-bundler[=BUNDLER]] [\-\-local] [\-\-print] [\-\-lockfile=PATH] [\-\-full\-index] [\-\-gemfile=GEMFILE] [\-\-add\-checksums] [\-\-add\-platform] [\-\-remove\-platform] [\-\-normalize\-platforms] [\-\-patch] [\-\-minor] [\-\-major] [\-\-pre] [\-\-strict] [\-\-conservative] [\-\-cooldown=NUMBER]
|
|
8
8
|
.SH "DESCRIPTION"
|
|
9
9
|
Lock the gems specified in Gemfile\.
|
|
10
10
|
.SH "OPTIONS"
|
|
@@ -59,6 +59,9 @@ If updating, do not allow any gem to be updated past latest \-\-patch | \-\-mino
|
|
|
59
59
|
.TP
|
|
60
60
|
\fB\-\-conservative\fR
|
|
61
61
|
If updating, use bundle install conservative update behavior and do not allow shared dependencies to be updated\.
|
|
62
|
+
.TP
|
|
63
|
+
\fB\-\-cooldown=<number>\fR
|
|
64
|
+
Only consider gem versions published at least \fInumber\fR days ago when resolving\. Pass \fB0\fR to disable cooldown for this run, overriding any per\-source or global configuration\. See \fBcooldown\fR in bundle\-config(1)\.
|
|
62
65
|
.SH "UPDATING ALL GEMS"
|
|
63
66
|
If you run \fBbundle lock\fR with \fB\-\-update\fR option without list of gems, bundler will ignore any previously installed gems and resolve all dependencies again based on the latest versions of all gems available in the sources\.
|
|
64
67
|
.SH "UPDATING A LIST OF GEMS"
|
|
@@ -20,6 +20,7 @@ bundle-lock(1) -- Creates / Updates a lockfile without installing
|
|
|
20
20
|
[--pre]
|
|
21
21
|
[--strict]
|
|
22
22
|
[--conservative]
|
|
23
|
+
[--cooldown=NUMBER]
|
|
23
24
|
|
|
24
25
|
## DESCRIPTION
|
|
25
26
|
|
|
@@ -84,6 +85,11 @@ Lock the gems specified in Gemfile.
|
|
|
84
85
|
* `--conservative`:
|
|
85
86
|
If updating, use bundle install conservative update behavior and do not allow shared dependencies to be updated.
|
|
86
87
|
|
|
88
|
+
* `--cooldown=<number>`:
|
|
89
|
+
Only consider gem versions published at least <number> days ago when
|
|
90
|
+
resolving. Pass `0` to disable cooldown for this run, overriding any
|
|
91
|
+
per-source or global configuration. See `cooldown` in bundle-config(1).
|
|
92
|
+
|
|
87
93
|
## UPDATING ALL GEMS
|
|
88
94
|
|
|
89
95
|
If you run `bundle lock` with `--update` option without list of gems, bundler will
|
|
@@ -71,6 +71,6 @@ Describe subcommands or one specific subcommand\.
|
|
|
71
71
|
No options\.
|
|
72
72
|
.SH "SEE ALSO"
|
|
73
73
|
.IP "\(bu" 4
|
|
74
|
-
How to write a Bundler plugin \fIhttps://
|
|
74
|
+
How to write a Bundler plugin \fIhttps://guides\.rubygems\.org/bundler_plugins/\fR
|
|
75
75
|
.IP "" 0
|
|
76
76
|
|
data/lib/bundler/man/bundle.1
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
.SH "DESCRIPTION"
|
|
9
9
|
Bundler manages an \fBapplication's dependencies\fR through its entire life across many machines systematically and repeatably\.
|
|
10
10
|
.P
|
|
11
|
-
See the
|
|
11
|
+
See the RubyGems guides \fIhttps://guides\.rubygems\.org/\fR for information on getting started, and Gemfile(5) for more information on the \fBGemfile\fR format\.
|
|
12
12
|
.SH "OPTIONS"
|
|
13
13
|
.TP
|
|
14
14
|
\fB\-\-no\-color\fR
|
|
@@ -54,6 +54,18 @@ Determine whether the requirements for your application are installed and availa
|
|
|
54
54
|
\fBbundle show(1)\fR \fIbundle\-show\.1\.html\fR
|
|
55
55
|
Show the source location of a particular gem in the bundle
|
|
56
56
|
.TP
|
|
57
|
+
\fBbundle info(1)\fR \fIbundle\-info\.1\.html\fR
|
|
58
|
+
Show information for the given gem in your bundle
|
|
59
|
+
.TP
|
|
60
|
+
\fBbundle list(1)\fR \fIbundle\-list\.1\.html\fR
|
|
61
|
+
List all the gems in the bundle
|
|
62
|
+
.TP
|
|
63
|
+
\fBbundle licenses(1)\fR \fIbundle\-licenses\.1\.html\fR
|
|
64
|
+
Print the license of all gems in the bundle
|
|
65
|
+
.TP
|
|
66
|
+
\fBbundle fund(1)\fR \fIbundle\-fund\.1\.html\fR
|
|
67
|
+
Lists information about gems seeking funding assistance
|
|
68
|
+
.TP
|
|
57
69
|
\fBbundle outdated(1)\fR \fIbundle\-outdated\.1\.html\fR
|
|
58
70
|
Show all of the outdated gems in the current bundle
|
|
59
71
|
.TP
|
|
@@ -78,9 +90,18 @@ Display platform compatibility information
|
|
|
78
90
|
\fBbundle clean(1)\fR \fIbundle\-clean\.1\.html\fR
|
|
79
91
|
Clean up unused gems in your Bundler directory
|
|
80
92
|
.TP
|
|
93
|
+
\fBbundle pristine(1)\fR \fIbundle\-pristine\.1\.html\fR
|
|
94
|
+
Restores installed gems to their pristine condition
|
|
95
|
+
.TP
|
|
81
96
|
\fBbundle doctor(1)\fR \fIbundle\-doctor\.1\.html\fR
|
|
82
97
|
Display warnings about common problems
|
|
83
98
|
.TP
|
|
99
|
+
\fBbundle env(1)\fR \fIbundle\-env\.1\.html\fR
|
|
100
|
+
Print information about the environment Bundler is running under
|
|
101
|
+
.TP
|
|
102
|
+
\fBbundle issue(1)\fR \fIbundle\-issue\.1\.html\fR
|
|
103
|
+
Get help reporting Bundler issues
|
|
104
|
+
.TP
|
|
84
105
|
\fBbundle remove(1)\fR \fIbundle\-remove\.1\.html\fR
|
|
85
106
|
Removes gems from the Gemfile
|
|
86
107
|
.TP
|
|
@@ -10,7 +10,7 @@ bundle(1) -- Ruby Dependency Management
|
|
|
10
10
|
Bundler manages an `application's dependencies` through its entire life
|
|
11
11
|
across many machines systematically and repeatably.
|
|
12
12
|
|
|
13
|
-
See [the
|
|
13
|
+
See [the RubyGems guides](https://guides.rubygems.org/) for information on getting
|
|
14
14
|
started, and Gemfile(5) for more information on the `Gemfile` format.
|
|
15
15
|
|
|
16
16
|
## OPTIONS
|
|
@@ -64,6 +64,18 @@ We divide `bundle` subcommands into primary commands and utilities:
|
|
|
64
64
|
* [`bundle show(1)`](bundle-show.1.html):
|
|
65
65
|
Show the source location of a particular gem in the bundle
|
|
66
66
|
|
|
67
|
+
* [`bundle info(1)`](bundle-info.1.html):
|
|
68
|
+
Show information for the given gem in your bundle
|
|
69
|
+
|
|
70
|
+
* [`bundle list(1)`](bundle-list.1.html):
|
|
71
|
+
List all the gems in the bundle
|
|
72
|
+
|
|
73
|
+
* [`bundle licenses(1)`](bundle-licenses.1.html):
|
|
74
|
+
Print the license of all gems in the bundle
|
|
75
|
+
|
|
76
|
+
* [`bundle fund(1)`](bundle-fund.1.html):
|
|
77
|
+
Lists information about gems seeking funding assistance
|
|
78
|
+
|
|
67
79
|
* [`bundle outdated(1)`](bundle-outdated.1.html):
|
|
68
80
|
Show all of the outdated gems in the current bundle
|
|
69
81
|
|
|
@@ -88,9 +100,18 @@ We divide `bundle` subcommands into primary commands and utilities:
|
|
|
88
100
|
* [`bundle clean(1)`](bundle-clean.1.html):
|
|
89
101
|
Clean up unused gems in your Bundler directory
|
|
90
102
|
|
|
103
|
+
* [`bundle pristine(1)`](bundle-pristine.1.html):
|
|
104
|
+
Restores installed gems to their pristine condition
|
|
105
|
+
|
|
91
106
|
* [`bundle doctor(1)`](bundle-doctor.1.html):
|
|
92
107
|
Display warnings about common problems
|
|
93
108
|
|
|
109
|
+
* [`bundle env(1)`](bundle-env.1.html):
|
|
110
|
+
Print information about the environment Bundler is running under
|
|
111
|
+
|
|
112
|
+
* [`bundle issue(1)`](bundle-issue.1.html):
|
|
113
|
+
Get help reporting Bundler issues
|
|
114
|
+
|
|
94
115
|
* [`bundle remove(1)`](bundle-remove.1.html):
|
|
95
116
|
Removes gems from the Gemfile
|
|
96
117
|
|
data/lib/bundler/man/gemfile.5
CHANGED
|
@@ -107,6 +107,8 @@ gem "nokogiri", ">= 1\.4\.2"
|
|
|
107
107
|
gem "RedCloth", ">= 4\.1\.0", "< 4\.2\.0"
|
|
108
108
|
.fi
|
|
109
109
|
.IP "" 0
|
|
110
|
+
.P
|
|
111
|
+
Most version specifiers, like \fB>= 1\.0\fR, are self\-explanatory\. The pessimistic specifier \fB~>\fR constrains both a lower and an upper bound: \fB~> 2\.0\.3\fR is identical to \fB>= 2\.0\.3\fR and \fB< 2\.1\fR, and \fB~> 2\.1\fR is identical to \fB>= 2\.1\fR and \fB< 3\.0\fR\. A pessimistic specifier with a prerelease component, like \fB~> 2\.2\.beta\fR, will match prerelease versions like \fB2\.2\.beta\.12\fR\. \fB~> 0\fR is identical to \fB>= 0\.0\fR and \fB< 1\.0\fR\.
|
|
110
112
|
.SS "REQUIRE AS"
|
|
111
113
|
Each \fIgem\fR \fBMAY\fR specify files that should be used when autorequiring via \fBBundler\.require\fR\. You may pass an array with multiple files or \fBtrue\fR if the file you want \fBrequired\fR has the same name as \fIgem\fR or \fBfalse\fR to prevent any file from being autorequired\.
|
|
112
114
|
.IP "" 4
|
|
@@ -164,7 +166,7 @@ bundle config set \-\-local without development test
|
|
|
164
166
|
.P
|
|
165
167
|
Also, calling \fBBundler\.setup\fR with no parameters, or calling \fBrequire "bundler/setup"\fR will setup all groups except for the ones you excluded via \fB\-\-without\fR (since they are not available)\.
|
|
166
168
|
.P
|
|
167
|
-
Note that on \fBbundle install\fR, bundler downloads and evaluates all gems, in order to create a single canonical list of all of the required gems and their dependencies\. This means that you cannot list different versions of the same gems in different groups\. For more details, see
|
|
169
|
+
Note that on \fBbundle install\fR, bundler downloads and evaluates all gems, in order to create a single canonical list of all of the required gems and their dependencies\. This means that you cannot list different versions of the same gems in different groups\. For more details, see Dependency management \fIhttps://guides\.rubygems\.org/dependency_management/\fR\.
|
|
168
170
|
.SS "PLATFORMS"
|
|
169
171
|
If a gem should only be used in a particular platform or set of platforms, you can specify them\. Platforms are essentially identical to groups, except that you do not need to use the \fB\-\-without\fR install\-time flag to exclude groups of gems for other platforms\.
|
|
170
172
|
.P
|
|
@@ -460,6 +462,15 @@ The \fBgemspec\fR method adds any runtime dependencies as gem requirements in th
|
|
|
460
462
|
The \fBgemspec\fR method supports optional \fB:path\fR, \fB:glob\fR, \fB:name\fR, and \fB:development_group\fR options, which control where bundler looks for the \fB\.gemspec\fR, the glob it uses to look for the gemspec (defaults to: \fB{,*,*/*}\.gemspec\fR), what named \fB\.gemspec\fR it uses (if more than one is present), and which group development dependencies are included in\.
|
|
461
463
|
.P
|
|
462
464
|
When a \fBgemspec\fR dependency encounters version conflicts during resolution, the local version under development will always be selected \-\- even if there are remote versions that better match other requirements for the \fBgemspec\fR gem\.
|
|
465
|
+
.SH "EVAL_GEMFILE"
|
|
466
|
+
A Gemfile \fBMAY\fR be split across multiple files\. The \fBeval_gemfile\fR method reads the contents of another file as if they appeared in the current Gemfile\. A relative path is resolved against the directory of the file containing the call\.
|
|
467
|
+
.IP "" 4
|
|
468
|
+
.nf
|
|
469
|
+
eval_gemfile "another\.gemfile"
|
|
470
|
+
.fi
|
|
471
|
+
.IP "" 0
|
|
472
|
+
.P
|
|
473
|
+
This can be useful to run tests against multiple combinations of dependencies, or to load per\-developer gems from an untracked gemfile\.
|
|
463
474
|
.SH "SOURCE PRIORITY"
|
|
464
475
|
When attempting to locate a gem to satisfy a gem requirement, bundler uses the following priority order:
|
|
465
476
|
.IP "1." 4
|
|
@@ -137,6 +137,13 @@ Each _gem_ `MAY` have one or more version specifiers.
|
|
|
137
137
|
gem "nokogiri", ">= 1.4.2"
|
|
138
138
|
gem "RedCloth", ">= 4.1.0", "< 4.2.0"
|
|
139
139
|
|
|
140
|
+
Most version specifiers, like `>= 1.0`, are self-explanatory. The pessimistic
|
|
141
|
+
specifier `~>` constrains both a lower and an upper bound: `~> 2.0.3` is
|
|
142
|
+
identical to `>= 2.0.3` and `< 2.1`, and `~> 2.1` is identical to `>= 2.1` and
|
|
143
|
+
`< 3.0`. A pessimistic specifier with a prerelease component, like
|
|
144
|
+
`~> 2.2.beta`, will match prerelease versions like `2.2.beta.12`. `~> 0` is
|
|
145
|
+
identical to `>= 0.0` and `< 1.0`.
|
|
146
|
+
|
|
140
147
|
### REQUIRE AS
|
|
141
148
|
|
|
142
149
|
Each _gem_ `MAY` specify files that should be used when autorequiring via
|
|
@@ -193,7 +200,7 @@ are not available).
|
|
|
193
200
|
Note that on `bundle install`, bundler downloads and evaluates all gems, in order to
|
|
194
201
|
create a single canonical list of all of the required gems and their dependencies.
|
|
195
202
|
This means that you cannot list different versions of the same gems in different
|
|
196
|
-
groups. For more details, see [
|
|
203
|
+
groups. For more details, see [Dependency management](https://guides.rubygems.org/dependency_management/).
|
|
197
204
|
|
|
198
205
|
### PLATFORMS
|
|
199
206
|
|
|
@@ -541,6 +548,18 @@ When a `gemspec` dependency encounters version conflicts during resolution, the
|
|
|
541
548
|
local version under development will always be selected -- even if there are
|
|
542
549
|
remote versions that better match other requirements for the `gemspec` gem.
|
|
543
550
|
|
|
551
|
+
## EVAL_GEMFILE
|
|
552
|
+
|
|
553
|
+
A Gemfile `MAY` be split across multiple files. The `eval_gemfile` method reads
|
|
554
|
+
the contents of another file as if they appeared in the current Gemfile. A
|
|
555
|
+
relative path is resolved against the directory of the file containing the
|
|
556
|
+
call.
|
|
557
|
+
|
|
558
|
+
eval_gemfile "another.gemfile"
|
|
559
|
+
|
|
560
|
+
This can be useful to run tests against multiple combinations of dependencies,
|
|
561
|
+
or to load per-developer gems from an untracked gemfile.
|
|
562
|
+
|
|
544
563
|
## SOURCE PRIORITY
|
|
545
564
|
|
|
546
565
|
When attempting to locate a gem to satisfy a gem requirement,
|
data/lib/bundler/source_list.rb
CHANGED
|
@@ -50,7 +50,13 @@ module Bundler
|
|
|
50
50
|
|
|
51
51
|
def add_rubygems_source(options = {})
|
|
52
52
|
new_source = Source::Rubygems.new(options)
|
|
53
|
-
|
|
53
|
+
if @global_rubygems_source == new_source
|
|
54
|
+
warn_on_cooldown_conflict(new_source, @global_rubygems_source)
|
|
55
|
+
return @global_rubygems_source
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
existing_source = @rubygems_sources.find {|s| s == new_source }
|
|
59
|
+
warn_on_cooldown_conflict(new_source, existing_source) if existing_source
|
|
54
60
|
|
|
55
61
|
add_source_to_list new_source, @rubygems_sources
|
|
56
62
|
end
|
|
@@ -60,6 +66,13 @@ module Bundler
|
|
|
60
66
|
end
|
|
61
67
|
|
|
62
68
|
def add_global_rubygems_remote(uri, cooldown: nil)
|
|
69
|
+
unless cooldown.nil?
|
|
70
|
+
new_source = source_class.new("remotes" => uri, "cooldown" => cooldown)
|
|
71
|
+
[global_rubygems_source, *@rubygems_sources].find do |existing_source|
|
|
72
|
+
warn_on_cooldown_conflict(new_source, existing_source)
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
63
76
|
global_rubygems_source.add_remote(uri, cooldown: cooldown)
|
|
64
77
|
global_rubygems_source
|
|
65
78
|
end
|
|
@@ -222,6 +235,22 @@ module Bundler
|
|
|
222
235
|
end
|
|
223
236
|
end
|
|
224
237
|
|
|
238
|
+
def warn_on_cooldown_conflict(new_source, existing_source)
|
|
239
|
+
new_source.remote_cooldowns.any? do |uri, cooldown|
|
|
240
|
+
next false unless existing_source.remotes.include?(uri)
|
|
241
|
+
|
|
242
|
+
existing_cooldown = existing_source.cooldown_for(uri)
|
|
243
|
+
next false if existing_cooldown == cooldown
|
|
244
|
+
|
|
245
|
+
previous = existing_cooldown ? "`cooldown: #{existing_cooldown}`" : "no cooldown"
|
|
246
|
+
Bundler.ui.warn "The source #{uri} is declared more than once with different cooldown " \
|
|
247
|
+
"values (`cooldown: #{cooldown}` here, #{previous} previously). All declarations of " \
|
|
248
|
+
"the same source URL share a single cooldown, so only one of these values will apply " \
|
|
249
|
+
"to all gems from this source."
|
|
250
|
+
true
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
|
|
225
254
|
def warn_on_git_protocol(source)
|
|
226
255
|
return if Bundler.settings["git.allow_insecure"]
|
|
227
256
|
|
data/lib/bundler/version.rb
CHANGED
data/lib/bundler.rb
CHANGED
|
@@ -26,7 +26,7 @@ require_relative "bundler/build_metadata"
|
|
|
26
26
|
# or Bundler.setup to setup environment where only specified gems and their
|
|
27
27
|
# specified versions could be used.
|
|
28
28
|
#
|
|
29
|
-
# See {Bundler
|
|
29
|
+
# See {Bundler documentation}[https://guides.rubygems.org/command-reference/bundle/] for extensive documentation
|
|
30
30
|
# on gemfiles creation and Bundler usage.
|
|
31
31
|
#
|
|
32
32
|
# As a standard library inside project, Bundler could be used for introspection
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bundler
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0.
|
|
4
|
+
version: 4.0.18
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- André Arko
|
|
@@ -401,7 +401,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
401
401
|
- !ruby/object:Gem::Version
|
|
402
402
|
version: 3.4.1
|
|
403
403
|
requirements: []
|
|
404
|
-
rubygems_version:
|
|
404
|
+
rubygems_version: 3.6.9
|
|
405
405
|
specification_version: 4
|
|
406
406
|
summary: The best way to manage your application's dependencies
|
|
407
407
|
test_files: []
|