bundler 4.0.23 → 4.0.24
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 +18 -0
- data/lib/bundler/build_metadata.rb +2 -2
- data/lib/bundler/cli/exec.rb +1 -1
- data/lib/bundler/cli/lock.rb +5 -1
- data/lib/bundler/definition.rb +3 -1
- data/lib/bundler/dsl.rb +6 -2
- data/lib/bundler/fetcher.rb +4 -1
- data/lib/bundler/man/gemfile.5 +2 -0
- data/lib/bundler/man/gemfile.5.ronn +6 -0
- data/lib/bundler/resolver.rb +2 -0
- data/lib/bundler/ruby_dsl.rb +2 -1
- data/lib/bundler/rubygems_ext.rb +15 -4
- data/lib/bundler/source/rubygems.rb +1 -1
- data/lib/bundler/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 567f97bf89a588c5a651c2b3f49298bb655349d8058b21d50c417b733485151d
|
|
4
|
+
data.tar.gz: 804d2843f77a7e567a90874cf52d528e2244b0ba7cbcb4966cf405d7d6121dfa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa6563d132a3f30113d97077ed5feb832306f9ef1511eb4a57c1017b55eedba715a3613426c7cc19bd4595f4ba71c1d6d0b1f204f95c6a4e903af9f33208ac9f
|
|
7
|
+
data.tar.gz: 55a6eaccc845bfd3a5154331a245da04956c05f8ddf3df029d3e4ce5a9742916a237fb5004f461e7b31cfc29ae4f7acd3bf0089bec1476224aa289a3a4723e3b
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.0.24 / 2026-11-05
|
|
4
|
+
|
|
5
|
+
### Enhancements:
|
|
6
|
+
|
|
7
|
+
* Read the Ruby version from mise's inline table form. Pull request [#9991](https://github.com/ruby/rubygems/pull/9991) by Hiroshi SHIBATA
|
|
8
|
+
* Report which locked gems can't be materialized for the current platform. Pull request [#9738](https://github.com/ruby/rubygems/pull/9738) by Muhammad Moussa
|
|
9
|
+
|
|
10
|
+
### Bug fixes:
|
|
11
|
+
|
|
12
|
+
* Fix `bundle exec` with no arguments for paths containing spaces. Pull request [#9996](https://github.com/ruby/rubygems/pull/9996) by Brandon Weiss
|
|
13
|
+
* Respect enclosing platforms and install_if for gemspec development dependencies. Pull request [#9992](https://github.com/ruby/rubygems/pull/9992) by Hiroshi SHIBATA
|
|
14
|
+
* Respect enclosing group and platforms for gemspec dependencies. Pull request [#9990](https://github.com/ruby/rubygems/pull/9990) by Denis Talakevich
|
|
15
|
+
* Don't report locked gems in the cooldown summary. Pull request [#9981](https://github.com/ruby/rubygems/pull/9981) by Patrik Ragnarsson
|
|
16
|
+
* Make `Bundler::Source::Rubygems#hash` agree with `eql?`. Pull request [#9983](https://github.com/ruby/rubygems/pull/9983) by Hiroshi SHIBATA
|
|
17
|
+
* Add checksums after platform changes in `bundle lock`. Pull request [#9960](https://github.com/ruby/rubygems/pull/9960) by Farid Zakaria
|
|
18
|
+
* Apply BUNDLE_RETRY to lazy gemspec downloads. Pull request [#9868](https://github.com/ruby/rubygems/pull/9868) by Islam Elsayed
|
|
19
|
+
* Fix file locks letting multiple processes in when lock files are removed. Pull request [#9930](https://github.com/ruby/rubygems/pull/9930) by Richard Janita and Hiroshi SHIBATA
|
|
20
|
+
|
|
3
21
|
## 4.0.23 / 2026-10-14
|
|
4
22
|
|
|
5
23
|
### Enhancements:
|
|
@@ -4,8 +4,8 @@ module Bundler
|
|
|
4
4
|
# Represents metadata from when the Bundler gem was built.
|
|
5
5
|
module BuildMetadata
|
|
6
6
|
# begin ivars
|
|
7
|
-
@built_at = "2026-
|
|
8
|
-
@git_commit_sha = "
|
|
7
|
+
@built_at = "2026-11-05".freeze
|
|
8
|
+
@git_commit_sha = "3b396e4".freeze
|
|
9
9
|
# end ivars
|
|
10
10
|
|
|
11
11
|
# A hash representation of the build metadata.
|
data/lib/bundler/cli/exec.rb
CHANGED
data/lib/bundler/cli/lock.rb
CHANGED
|
@@ -43,7 +43,6 @@ module Bundler
|
|
|
43
43
|
|
|
44
44
|
Bundler.settings.temporary(frozen: false) do
|
|
45
45
|
definition = Bundler.definition(update, Bundler.default_lockfile)
|
|
46
|
-
definition.add_checksums if options["add-checksums"]
|
|
47
46
|
|
|
48
47
|
Bundler::CLI::Common.configure_gem_version_promoter(definition, options) if options[:update]
|
|
49
48
|
|
|
@@ -65,6 +64,11 @@ module Bundler
|
|
|
65
64
|
raise InvalidOption, "Removing all platforms from the bundle is not allowed"
|
|
66
65
|
end
|
|
67
66
|
|
|
67
|
+
# Adding checksums resolves the bundle to fetch them, so it has to
|
|
68
|
+
# run after every platform change above has been recorded, or the
|
|
69
|
+
# new platforms are listed in the lockfile without their specs.
|
|
70
|
+
definition.add_checksums if options["add-checksums"]
|
|
71
|
+
|
|
68
72
|
definition.remotely! unless options[:local]
|
|
69
73
|
|
|
70
74
|
if options["normalize-platforms"]
|
data/lib/bundler/definition.rb
CHANGED
|
@@ -748,7 +748,9 @@ module Bundler
|
|
|
748
748
|
loop do
|
|
749
749
|
break if incomplete_specs.empty?
|
|
750
750
|
|
|
751
|
-
Bundler.ui.debug("The lockfile does not have all gems needed for the current platform though,
|
|
751
|
+
Bundler.ui.debug("The lockfile does not have all gems needed for the current platform (#{Bundler.local_platform}) though, " \
|
|
752
|
+
"Bundler will still re-resolve dependencies. The following locked gems could not be materialized for it: " \
|
|
753
|
+
"#{incomplete_specs.map(&:full_name).join(", ")}")
|
|
752
754
|
sources.remote!
|
|
753
755
|
reresolve_without(incomplete_specs)
|
|
754
756
|
specs = resolve.materialize(dependencies)
|
data/lib/bundler/dsl.rb
CHANGED
|
@@ -80,11 +80,15 @@ module Bundler
|
|
|
80
80
|
@gemspecs << spec
|
|
81
81
|
|
|
82
82
|
path path, "glob" => glob, "name" => spec.name, "gemspec" => spec do
|
|
83
|
-
|
|
83
|
+
options = {}
|
|
84
|
+
normalize_options(spec.name, [], options)
|
|
85
|
+
add_dependency spec.name, nil, options
|
|
84
86
|
end
|
|
85
87
|
|
|
86
88
|
spec.development_dependencies.each do |dep|
|
|
87
|
-
|
|
89
|
+
options = {}
|
|
90
|
+
normalize_options(dep.name, dep.requirement.as_list, options)
|
|
91
|
+
add_dependency dep.name, dep.requirement.as_list, options.merge("gemspec_dev_dep" => true, "group" => development_group)
|
|
88
92
|
end
|
|
89
93
|
when 0
|
|
90
94
|
raise InvalidOption, "There are no gemspecs at #{expanded_path}"
|
data/lib/bundler/fetcher.rb
CHANGED
|
@@ -156,7 +156,10 @@ module Bundler
|
|
|
156
156
|
elsif cached_spec_path = gemspec_cached_path(spec_file_name)
|
|
157
157
|
Bundler.load_gemspec(cached_spec_path)
|
|
158
158
|
else
|
|
159
|
-
|
|
159
|
+
body = Bundler::Retry.new("fetcher", FAIL_ERRORS).attempts do
|
|
160
|
+
downloader.fetch(uri).body
|
|
161
|
+
end
|
|
162
|
+
Bundler.safe_load_marshal Bundler.rubygems.inflate(body)
|
|
160
163
|
end
|
|
161
164
|
raise MarshalError, "is #{spec.inspect}" unless spec.is_a?(Gem::Specification)
|
|
162
165
|
spec
|
data/lib/bundler/man/gemfile.5
CHANGED
|
@@ -461,6 +461,8 @@ The \fBgemspec\fR method adds any runtime dependencies as gem requirements in th
|
|
|
461
461
|
.P
|
|
462
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\.
|
|
463
463
|
.P
|
|
464
|
+
When \fBgemspec\fR is called inside a \fBgroup\fR block, the gem requirement on your project goes into that group instead of the default group, and so do its runtime dependencies\. Development dependencies stay in the \fBdevelopment\fR group, or the group given by \fB:development_group\fR\. An enclosing \fBplatforms\fR or \fBinstall_if\fR block applies to the project and its development dependencies alike\.
|
|
465
|
+
.P
|
|
464
466
|
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
467
|
.SH "EVAL_GEMFILE"
|
|
466
468
|
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\.
|
|
@@ -546,6 +546,12 @@ options, which control where bundler looks for the `.gemspec`, the glob it uses
|
|
|
546
546
|
for the gemspec (defaults to: `{,*,*/*}.gemspec`), what named `.gemspec` it uses
|
|
547
547
|
(if more than one is present), and which group development dependencies are included in.
|
|
548
548
|
|
|
549
|
+
When `gemspec` is called inside a `group` block, the gem requirement on your
|
|
550
|
+
project goes into that group instead of the default group, and so do its runtime
|
|
551
|
+
dependencies. Development dependencies stay in the `development` group, or the
|
|
552
|
+
group given by `:development_group`. An enclosing `platforms` or `install_if`
|
|
553
|
+
block applies to the project and its development dependencies alike.
|
|
554
|
+
|
|
549
555
|
When a `gemspec` dependency encounters version conflicts during resolution, the
|
|
550
556
|
local version under development will always be selected -- even if there are
|
|
551
557
|
remote versions that better match other requirements for the `gemspec` gem.
|
data/lib/bundler/resolver.rb
CHANGED
|
@@ -499,6 +499,8 @@ module Bundler
|
|
|
499
499
|
@cooldown_skipped_specs.each do |(name, version), spec|
|
|
500
500
|
resolved = resolved_versions[name]
|
|
501
501
|
next unless resolved && version > resolved
|
|
502
|
+
package = @base.get_package(name)
|
|
503
|
+
next if !package.unlock? && package.locked_version == resolved
|
|
502
504
|
next unless requirements[name].all? {|req| req.satisfied_by?(version) }
|
|
503
505
|
newest = newest_skipped[name]
|
|
504
506
|
newest_skipped[name] = spec if newest.nil? || version > newest.version
|
data/lib/bundler/ruby_dsl.rb
CHANGED
|
@@ -42,11 +42,12 @@ 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", ruby = "3.2.2", ruby = '3.2.2' or "ruby 3.2.2" capturing version string up to the first space or comment
|
|
45
|
+
# match "ruby-3.2.2", ruby = "3.2.2", ruby = '3.2.2', ruby = { version = "3.2.2" } or "ruby 3.2.2" capturing version string up to the first space or comment
|
|
46
46
|
version_match = /^ # Start of line
|
|
47
47
|
ruby # Literal "ruby"
|
|
48
48
|
[\s-]* # Optional whitespace or hyphens (for "ruby-3.2.2" format)
|
|
49
49
|
(?:=\s*)? # Optional equals sign with whitespace (for ruby = "3.2.2" format)
|
|
50
|
+
(?:\{[^}]*?\bversion\s*=\s*)? # Optional inline table up to its version key (for ruby = { version = "3.2.2" } format)
|
|
50
51
|
(?:
|
|
51
52
|
"([^"]+)" # Double quoted version
|
|
52
53
|
|
|
data/lib/bundler/rubygems_ext.rb
CHANGED
|
@@ -40,11 +40,22 @@ module Gem
|
|
|
40
40
|
end
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
-
def open_file_with_lock(path
|
|
43
|
+
def open_file_with_lock(path)
|
|
44
44
|
file_lock = "#{path}.lock"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
|
|
46
|
+
loop do
|
|
47
|
+
open_file_with_flock(file_lock) do |io|
|
|
48
|
+
# The previous holder removed the file while we were waiting on it,
|
|
49
|
+
# so leave this block and try again on the file now at the lock path
|
|
50
|
+
next unless File.identical?(io, file_lock)
|
|
51
|
+
|
|
52
|
+
begin
|
|
53
|
+
return yield io
|
|
54
|
+
ensure
|
|
55
|
+
FileUtils.rm_f file_lock
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
48
59
|
end
|
|
49
60
|
end
|
|
50
61
|
end
|
data/lib/bundler/version.rb
CHANGED