bundler 4.0.16 → 4.0.17
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 +17 -0
- data/lib/bundler/build_metadata.rb +1 -1
- data/lib/bundler/cli/open.rb +12 -2
- data/lib/bundler/compact_index_client/cache_file.rb +1 -1
- data/lib/bundler/lockfile_generator.rb +27 -4
- data/lib/bundler/runtime.rb +11 -11
- data/lib/bundler/self_manager.rb +6 -1
- data/lib/bundler/shared_helpers.rb +6 -1
- data/lib/bundler/source/git.rb +1 -1
- data/lib/bundler/source/rubygems.rb +1 -1
- data/lib/bundler/version.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: a0e51552827f6a9e6f69879c84b28b5fc102157385d7b5acc8f76ccf23fc1d02
|
|
4
|
+
data.tar.gz: 580c4732a5106f1ac54652b7399e187a365a6b891e6b1eb5093093b7c0bcbbbd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 03f0b65a2e6655251ddd488cfe43983e7e94d1e72be6166ab5c4627f6075ee9d4aabf38e7e6c4514eb906a0ee524aaa6a3fbf2a598fdb7ecc8f3301b803cdf90
|
|
7
|
+
data.tar.gz: 36b037826c24cf525249954629c83c3d131a27a3d009d0a9af749e1108dcd043c151fa7f4f5786edc47a75c5526af6917a7da8ed0b222766e97749a4d298bbfd
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.0.17 / 2026-07-22
|
|
4
|
+
|
|
5
|
+
### Enhancements:
|
|
6
|
+
|
|
7
|
+
* Open compact index cache in binary mode when appending. Pull request [#9679](https://github.com/ruby/rubygems/pull/9679) by hsbt
|
|
8
|
+
|
|
9
|
+
### Bug fixes:
|
|
10
|
+
|
|
11
|
+
* Unquote Gem.ruby when spawning it as a separate argv element. Pull request [#9695](https://github.com/ruby/rubygems/pull/9695) by hsbt
|
|
12
|
+
* Escape glob metacharacters in install paths when globbing. Pull request [#9687](https://github.com/ruby/rubygems/pull/9687) by hsbt
|
|
13
|
+
* Avoid space-containing absolute path in RUBYOPT. Pull request [#9696](https://github.com/ruby/rubygems/pull/9696) by hsbt
|
|
14
|
+
* Preserve the locked Bundler checksum when the gem isn't cached. Pull request [#9658](https://github.com/ruby/rubygems/pull/9658) by rwstauner
|
|
15
|
+
|
|
16
|
+
### Documentation:
|
|
17
|
+
|
|
18
|
+
* Point Bundler gemspec metadata at the moved docs. Pull request [#9648](https://github.com/ruby/rubygems/pull/9648) by hsbt
|
|
19
|
+
|
|
3
20
|
## 4.0.16 / 2026-07-10
|
|
4
21
|
|
|
5
22
|
### Enhancements:
|
data/lib/bundler/cli/open.rb
CHANGED
|
@@ -18,12 +18,22 @@ module Bundler
|
|
|
18
18
|
Bundler.ui.info "Unable to open #{name} because it's a default gem, so the directory it would normally be installed to does not exist."
|
|
19
19
|
else
|
|
20
20
|
root_path = spec.full_gem_path
|
|
21
|
-
|
|
22
|
-
command = Shellwords.split(editor) << File.join([root_path, path].compact)
|
|
21
|
+
command = editor_command(editor) << File.join([root_path, path].compact)
|
|
23
22
|
Bundler.with_original_env do
|
|
24
23
|
system(*command, { chdir: root_path })
|
|
25
24
|
end || Bundler.ui.info("Could not run '#{command.join(" ")}'")
|
|
26
25
|
end
|
|
27
26
|
end
|
|
27
|
+
|
|
28
|
+
def editor_command(editor)
|
|
29
|
+
# On Windows an editor is often configured with a full path such as
|
|
30
|
+
# C:\Program Files\Microsoft VS Code\Code.exe, which shell splitting
|
|
31
|
+
# would corrupt. Take a value that names an existing file as a
|
|
32
|
+
# single word.
|
|
33
|
+
return [editor] if Gem.win_platform? && File.file?(editor)
|
|
34
|
+
|
|
35
|
+
require "shellwords"
|
|
36
|
+
Shellwords.split(editor)
|
|
37
|
+
end
|
|
28
38
|
end
|
|
29
39
|
end
|
|
@@ -103,7 +103,7 @@ module Bundler
|
|
|
103
103
|
# Returns false without appending when no digests since appending is too error prone to do without digests.
|
|
104
104
|
def append(data)
|
|
105
105
|
return false unless digests?
|
|
106
|
-
open("
|
|
106
|
+
open("ab") {|f| f.write data }
|
|
107
107
|
verify && commit
|
|
108
108
|
end
|
|
109
109
|
|
|
@@ -103,17 +103,40 @@ module Bundler
|
|
|
103
103
|
end
|
|
104
104
|
|
|
105
105
|
def bundler_checksum
|
|
106
|
+
# `.dev` versions and `SKIP_BUNDLER_CHECKSUM` are deliberate opt-outs (used
|
|
107
|
+
# by Bundler/RubyGems' own development and release tasks): never record a
|
|
108
|
+
# checksum for Bundler itself in those cases.
|
|
106
109
|
return [] if Bundler.gem_version.to_s.end_with?(".dev") || ENV["SKIP_BUNDLER_CHECKSUM"]
|
|
107
110
|
|
|
108
111
|
bundler_spec = definition.sources.metadata_source.specs.search(["bundler", Bundler.gem_version]).last
|
|
109
|
-
return [] unless File.exist?(bundler_spec.cache_file)
|
|
110
112
|
|
|
111
|
-
|
|
113
|
+
# Record a fresh checksum from the locally cached gem when it's available.
|
|
114
|
+
# When it isn't (e.g. a fresh checkout/CI that never downloaded the bundler
|
|
115
|
+
# gem), fall back to whatever checksum is already locked rather than
|
|
116
|
+
# dropping it, so the entry stays consistent across environments.
|
|
117
|
+
if File.exist?(bundler_spec.cache_file)
|
|
118
|
+
require "rubygems/package"
|
|
119
|
+
|
|
120
|
+
package = Gem::Package.new(bundler_spec.cache_file)
|
|
121
|
+
definition.sources.metadata_source.checksum_store.register(bundler_spec, Checksum.from_gem_package(package))
|
|
122
|
+
elsif bundled_with_changing?
|
|
123
|
+
# We can't compute a fresh checksum (the bundler gem isn't cached) and the
|
|
124
|
+
# BUNDLED WITH version is changing. Keeping the previously locked checksum
|
|
125
|
+
# would leave a `bundler (<old version>) sha256=...` entry that no longer
|
|
126
|
+
# matches the new BUNDLED WITH version, so drop it instead.
|
|
127
|
+
return []
|
|
128
|
+
end
|
|
112
129
|
|
|
113
|
-
|
|
114
|
-
definition.sources.metadata_source.checksum_store.register(bundler_spec, Checksum.from_gem_package(package))
|
|
130
|
+
return [] if definition.sources.metadata_source.checksum_store.missing?(bundler_spec)
|
|
115
131
|
|
|
116
132
|
[definition.sources.metadata_source.checksum_store.to_lock(bundler_spec)]
|
|
117
133
|
end
|
|
134
|
+
|
|
135
|
+
def bundled_with_changing?
|
|
136
|
+
locked_gems = definition.locked_gems
|
|
137
|
+
return false unless locked_gems
|
|
138
|
+
|
|
139
|
+
locked_gems.bundler_version != definition.bundler_version_to_lock
|
|
140
|
+
end
|
|
118
141
|
end
|
|
119
142
|
end
|
data/lib/bundler/runtime.rb
CHANGED
|
@@ -141,7 +141,7 @@ module Bundler
|
|
|
141
141
|
end
|
|
142
142
|
end
|
|
143
143
|
|
|
144
|
-
|
|
144
|
+
Gem::Util.glob_files_in_dir("*/.git", cache_path.to_s).each do |git_dir|
|
|
145
145
|
FileUtils.rm_rf(git_dir)
|
|
146
146
|
FileUtils.touch(File.expand_path("../.bundlecache", git_dir))
|
|
147
147
|
end
|
|
@@ -159,13 +159,13 @@ module Bundler
|
|
|
159
159
|
end
|
|
160
160
|
|
|
161
161
|
def clean(dry_run = false)
|
|
162
|
-
gem_bins =
|
|
163
|
-
git_dirs =
|
|
164
|
-
git_cache_dirs =
|
|
165
|
-
gem_dirs =
|
|
166
|
-
gem_files =
|
|
167
|
-
gemspec_files =
|
|
168
|
-
extension_dirs =
|
|
162
|
+
gem_bins = Gem::Util.glob_files_in_dir("bin/*", Gem.dir)
|
|
163
|
+
git_dirs = Gem::Util.glob_files_in_dir("bundler/gems/*", Gem.dir)
|
|
164
|
+
git_cache_dirs = Gem::Util.glob_files_in_dir("cache/bundler/git/*", Gem.dir)
|
|
165
|
+
gem_dirs = Gem::Util.glob_files_in_dir("gems/*", Gem.dir)
|
|
166
|
+
gem_files = Gem::Util.glob_files_in_dir("cache/*.gem", Gem.dir)
|
|
167
|
+
gemspec_files = Gem::Util.glob_files_in_dir("specifications/*.gemspec", Gem.dir)
|
|
168
|
+
extension_dirs = Gem::Util.glob_files_in_dir("extensions/*/*/*", Gem.dir) + Gem::Util.glob_files_in_dir("bundler/gems/extensions/*/*/*", Gem.dir)
|
|
169
169
|
spec_gem_paths = []
|
|
170
170
|
# need to keep git sources around
|
|
171
171
|
spec_git_paths = @definition.spec_git_paths
|
|
@@ -232,7 +232,7 @@ module Bundler
|
|
|
232
232
|
private
|
|
233
233
|
|
|
234
234
|
def prune_gem_cache(resolve, cache_path)
|
|
235
|
-
cached =
|
|
235
|
+
cached = Gem::Util.glob_files_in_dir("*.gem", cache_path.to_s)
|
|
236
236
|
|
|
237
237
|
cached = cached.delete_if do |path|
|
|
238
238
|
spec = Bundler.rubygems.spec_from_gem path
|
|
@@ -257,7 +257,7 @@ module Bundler
|
|
|
257
257
|
end
|
|
258
258
|
|
|
259
259
|
def prune_git_and_path_cache(resolve, cache_path)
|
|
260
|
-
cached =
|
|
260
|
+
cached = Gem::Util.glob_files_in_dir("*/.bundlecache", cache_path.to_s)
|
|
261
261
|
|
|
262
262
|
cached = cached.delete_if do |path|
|
|
263
263
|
name = File.basename(File.dirname(path))
|
|
@@ -283,7 +283,7 @@ module Bundler
|
|
|
283
283
|
# Add man/ subdirectories from activated bundles to MANPATH for man(1)
|
|
284
284
|
manuals = $LOAD_PATH.filter_map do |path|
|
|
285
285
|
man_subdir = path.sub(/lib$/, "man")
|
|
286
|
-
man_subdir unless Dir
|
|
286
|
+
man_subdir unless Dir.glob("man?/", base: man_subdir).empty?
|
|
287
287
|
end
|
|
288
288
|
|
|
289
289
|
return if manuals.empty?
|
data/lib/bundler/self_manager.rb
CHANGED
|
@@ -75,7 +75,12 @@ module Bundler
|
|
|
75
75
|
|
|
76
76
|
argv0 = File.exist?($PROGRAM_NAME) ? $PROGRAM_NAME : Process.argv0
|
|
77
77
|
cmd = [argv0, *ARGV]
|
|
78
|
-
|
|
78
|
+
unless File.executable?(argv0)
|
|
79
|
+
# Gem.ruby is quoted if it contains whitespace, so split it into argv
|
|
80
|
+
# elements to keep the quotes out of the exec'd command.
|
|
81
|
+
require "shellwords"
|
|
82
|
+
cmd.unshift(*Shellwords.split(Gem.ruby))
|
|
83
|
+
end
|
|
79
84
|
|
|
80
85
|
Bundler.with_original_env do
|
|
81
86
|
Kernel.exec(
|
|
@@ -346,7 +346,12 @@ module Bundler
|
|
|
346
346
|
|
|
347
347
|
def set_rubyopt
|
|
348
348
|
rubyopt = [ENV["RUBYOPT"]].compact
|
|
349
|
-
|
|
349
|
+
setup_path = File.expand_path("setup", __dir__)
|
|
350
|
+
# RUBYOPT is split on whitespace with no quoting mechanism, so an
|
|
351
|
+
# absolute path containing spaces would be torn apart. Fall back to
|
|
352
|
+
# requiring by feature name; set_rubylib puts our lib directory first
|
|
353
|
+
# on the child's load path.
|
|
354
|
+
setup_require = /\s/.match?(setup_path) ? "-rbundler/setup" : "-r#{setup_path}"
|
|
350
355
|
return if !rubyopt.empty? && rubyopt.first.include?(setup_require)
|
|
351
356
|
rubyopt.unshift setup_require
|
|
352
357
|
Bundler::SharedHelpers.set_env "RUBYOPT", rubyopt.join(" ")
|
data/lib/bundler/source/git.rb
CHANGED
|
@@ -320,7 +320,7 @@ module Bundler
|
|
|
320
320
|
|
|
321
321
|
def serialize_gemspecs_in(destination)
|
|
322
322
|
destination = destination.expand_path(Bundler.root) if destination.relative?
|
|
323
|
-
|
|
323
|
+
Gem::Util.glob_files_in_dir(@glob, destination.to_s).each do |spec_path|
|
|
324
324
|
# Evaluate gemspecs and cache the result. Gemspecs
|
|
325
325
|
# in git might require git or other dependencies.
|
|
326
326
|
# The gemspecs we cache should already be evaluated.
|
|
@@ -406,7 +406,7 @@ module Bundler
|
|
|
406
406
|
@cached_specs ||= begin
|
|
407
407
|
idx = Index.new
|
|
408
408
|
|
|
409
|
-
|
|
409
|
+
Gem::Util.glob_files_in_dir("*.gem", cache_path.to_s).each do |gemfile|
|
|
410
410
|
s ||= Bundler.rubygems.spec_from_gem(gemfile)
|
|
411
411
|
s.source = self
|
|
412
412
|
idx << s
|
data/lib/bundler/version.rb
CHANGED
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.17
|
|
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: 4.0.
|
|
404
|
+
rubygems_version: 4.0.16
|
|
405
405
|
specification_version: 4
|
|
406
406
|
summary: The best way to manage your application's dependencies
|
|
407
407
|
test_files: []
|