bundler 4.0.21 → 4.0.22
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 +2 -2
- data/lib/bundler/cli/platform.rb +15 -1
- data/lib/bundler/cli.rb +17 -5
- data/lib/bundler/fetcher/downloader.rb +1 -1
- data/lib/bundler/installer.rb +4 -0
- data/lib/bundler/man/bundle-lock.1 +1 -1
- data/lib/bundler/man/bundle-lock.1.ronn +1 -1
- data/lib/bundler/man/bundle-outdated.1 +1 -1
- data/lib/bundler/man/bundle-outdated.1.ronn +1 -1
- data/lib/bundler/man/bundle-update.1 +2 -2
- data/lib/bundler/man/bundle-update.1.ronn +2 -2
- data/lib/bundler/templates/newgem/ext/newgem/Cargo.toml.tt +1 -1
- data/lib/bundler/version.rb +1 -1
- data/lib/bundler.rb +1 -3
- 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: ce74f459384799eda3343da15c0d6bf655b5fcf2187e2ddaf1b3147aebfea1de
|
|
4
|
+
data.tar.gz: 6db3f22f6acb9d79523eb10d02f09e813d38c966e8453b6b8a4ee2ab7cf9fb68
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d3f31182a84dc873e148b3ea4c8bd2e4fde0abc5bc5a116ea99f76519a55680fc41bf3f801bcd83055d084dd6f766ecd40d02b6afe8f51e68edf553bbbe90f99
|
|
7
|
+
data.tar.gz: c34dc9b81612b1e6a23947545c089c40e03d2fdd8e5111dd04701c992b90d7cd5fd8f6fd0564ac340d961ab9bb030cdbfa81e44a9d2178ce3316c1d19ea07ffc
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.0.22 / 2026-09-30
|
|
4
|
+
|
|
5
|
+
### Enhancements:
|
|
6
|
+
|
|
7
|
+
* Report the effective platform in `bundle platform`. Pull request [#9898](https://github.com/ruby/rubygems/pull/9898) by Islam Elsayed
|
|
8
|
+
* Keep credentials on redirects only within the same origin. Pull request [#9909](https://github.com/ruby/rubygems/pull/9909) by Hiroshi SHIBATA
|
|
9
|
+
* Update Magnus version in Rust extension gem template. Pull request [#9904](https://github.com/ruby/rubygems/pull/9904) by Mat Sadler and Hiroshi SHIBATA
|
|
10
|
+
|
|
11
|
+
### Bug fixes:
|
|
12
|
+
|
|
13
|
+
* Stop `Bundler.bin_path` creating the directory it reports. Pull request [#9887](https://github.com/ruby/rubygems/pull/9887) by Islam Elsayed and Hiroshi SHIBATA
|
|
14
|
+
* Look up `bundler-<command>` executables only in PATH. Pull request [#9874](https://github.com/ruby/rubygems/pull/9874) by Hiroshi SHIBATA
|
|
15
|
+
|
|
16
|
+
### Documentation:
|
|
17
|
+
|
|
18
|
+
* Describe `--major` as preferring the latest major version. Pull request [#9891](https://github.com/ruby/rubygems/pull/9891) by Hiroshi SHIBATA
|
|
19
|
+
|
|
3
20
|
## 4.0.21 / 2026-09-16
|
|
4
21
|
|
|
5
22
|
### 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-09-
|
|
8
|
-
@git_commit_sha = "
|
|
7
|
+
@built_at = "2026-09-30".freeze
|
|
8
|
+
@git_commit_sha = "ff2bd50".freeze
|
|
9
9
|
# end ivars
|
|
10
10
|
|
|
11
11
|
# A hash representation of the build metadata.
|
data/lib/bundler/cli/platform.rb
CHANGED
|
@@ -25,7 +25,7 @@ module Bundler
|
|
|
25
25
|
else
|
|
26
26
|
platforms = Bundler.definition.platforms.map {|p| "* #{p}" }
|
|
27
27
|
|
|
28
|
-
output <<
|
|
28
|
+
output << platform_info
|
|
29
29
|
output << "Your app has gems that work on these platforms:\n#{platforms.join("\n")}"
|
|
30
30
|
|
|
31
31
|
if ruby_version
|
|
@@ -44,5 +44,19 @@ module Bundler
|
|
|
44
44
|
|
|
45
45
|
Bundler.ui.info output.join("\n\n")
|
|
46
46
|
end
|
|
47
|
+
|
|
48
|
+
private
|
|
49
|
+
|
|
50
|
+
def platform_info
|
|
51
|
+
info = "Your platform is: #{Gem::Platform.local}"
|
|
52
|
+
return info if Bundler.local_platform == Gem::Platform.local
|
|
53
|
+
|
|
54
|
+
info + "\nHowever, your effective platform is: #{Bundler.local_platform} " \
|
|
55
|
+
"(because force_ruby_platform is #{force_ruby_platform_origin})"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def force_ruby_platform_origin
|
|
59
|
+
Bundler.settings.pretty_values_for(:force_ruby_platform).first.sub(/\ASet /, "set ")
|
|
60
|
+
end
|
|
47
61
|
end
|
|
48
62
|
end
|
data/lib/bundler/cli.rb
CHANGED
|
@@ -177,7 +177,7 @@ module Bundler
|
|
|
177
177
|
else
|
|
178
178
|
puts File.read("#{man_path}/#{File.basename(man_page)}.ronn")
|
|
179
179
|
end
|
|
180
|
-
elsif command_path =
|
|
180
|
+
elsif command_path = self.class.bundler_command_path(cli)
|
|
181
181
|
Kernel.exec(command_path, "--help")
|
|
182
182
|
else
|
|
183
183
|
super
|
|
@@ -189,11 +189,23 @@ module Bundler
|
|
|
189
189
|
return Bundler::Plugin.exec_command(command, ARGV[1..-1])
|
|
190
190
|
end
|
|
191
191
|
|
|
192
|
-
return super unless command_path =
|
|
192
|
+
return super unless command_path = bundler_command_path(command)
|
|
193
193
|
|
|
194
194
|
Kernel.exec(command_path, *ARGV[1..-1])
|
|
195
195
|
end
|
|
196
196
|
|
|
197
|
+
# Only PATH is searched, unlike Bundler.which, which also finds a file in
|
|
198
|
+
# the current directory and returns a bare name that Kernel.exec cannot run.
|
|
199
|
+
def self.bundler_command_path(command)
|
|
200
|
+
ENV.fetch("PATH", "").split(File::PATH_SEPARATOR).each do |path|
|
|
201
|
+
path = path[1..-2] if path.start_with?('"') && path.end_with?('"')
|
|
202
|
+
command_path = Bundler.find_executable(File.expand_path("bundler-#{command}", path))
|
|
203
|
+
return command_path if command_path
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
nil
|
|
207
|
+
end
|
|
208
|
+
|
|
197
209
|
desc "init [OPTIONS]", "Generates a Gemfile into the current working directory"
|
|
198
210
|
long_desc <<-D
|
|
199
211
|
Init generates a default Gemfile in the current working directory. When adding a
|
|
@@ -320,7 +332,7 @@ module Bundler
|
|
|
320
332
|
method_option "bundler", type: :string, lazy_default: ">= #{Bundler::VERSION}", banner: "Update the locked version of bundler"
|
|
321
333
|
method_option "patch", type: :boolean, banner: "Prefer updating only to next patch version"
|
|
322
334
|
method_option "minor", type: :boolean, banner: "Prefer updating only to next minor version"
|
|
323
|
-
method_option "major", type: :boolean, banner: "Prefer updating to
|
|
335
|
+
method_option "major", type: :boolean, banner: "Prefer updating to latest major version (default)"
|
|
324
336
|
method_option "pre", type: :boolean, banner: "Always choose the highest allowed version when updating gems, regardless of prerelease status"
|
|
325
337
|
method_option "strict", type: :boolean, banner: "Do not allow any gem to be updated past latest --patch | --minor | --major"
|
|
326
338
|
method_option "conservative", type: :boolean, banner: "Use bundle install conservative update behavior and do not allow shared dependencies to be updated."
|
|
@@ -431,7 +443,7 @@ module Bundler
|
|
|
431
443
|
method_option "filter-strict", type: :boolean, aliases: "--strict", banner: "Only list newer versions allowed by your Gemfile requirements"
|
|
432
444
|
method_option "update-strict", type: :boolean, banner: "Strict conservative resolution, do not allow any gem to be updated past latest --patch | --minor | --major"
|
|
433
445
|
method_option "minor", type: :boolean, banner: "Prefer updating only to next minor version"
|
|
434
|
-
method_option "major", type: :boolean, banner: "Prefer updating to
|
|
446
|
+
method_option "major", type: :boolean, banner: "Prefer updating to latest major version (default)"
|
|
435
447
|
method_option "patch", type: :boolean, banner: "Prefer updating only to next patch version"
|
|
436
448
|
method_option "filter-major", type: :boolean, banner: "Only list major newer versions"
|
|
437
449
|
method_option "filter-minor", type: :boolean, banner: "Only list minor newer versions"
|
|
@@ -638,7 +650,7 @@ module Bundler
|
|
|
638
650
|
method_option "normalize-platforms", type: :boolean, default: false, banner: "Normalize lockfile platforms"
|
|
639
651
|
method_option "patch", type: :boolean, banner: "If updating, prefer updating only to next patch version"
|
|
640
652
|
method_option "minor", type: :boolean, banner: "If updating, prefer updating only to next minor version"
|
|
641
|
-
method_option "major", type: :boolean, banner: "If updating, prefer updating to
|
|
653
|
+
method_option "major", type: :boolean, banner: "If updating, prefer updating to latest major version (default)"
|
|
642
654
|
method_option "pre", type: :boolean, banner: "If updating, always choose the highest allowed version, regardless of prerelease status"
|
|
643
655
|
method_option "strict", type: :boolean, banner: "If updating, do not allow any gem to be updated past latest --patch | --minor | --major"
|
|
644
656
|
method_option "conservative", type: :boolean, banner: "If updating, use bundle install conservative update behavior and do not allow shared dependencies to be updated"
|
|
@@ -51,7 +51,7 @@ module Bundler
|
|
|
51
51
|
if https?(uri) && !https?(new_uri)
|
|
52
52
|
raise HTTPError, "Redirecting to a non-https URI is not allowed: #{URICredentialsFilter.credential_filtered_uri(new_uri)}"
|
|
53
53
|
end
|
|
54
|
-
if new_uri.host == uri.host
|
|
54
|
+
if [new_uri.scheme, new_uri.host, new_uri.port] == [uri.scheme, uri.host, uri.port]
|
|
55
55
|
new_uri.user = uri.user
|
|
56
56
|
new_uri.password = uri.password
|
|
57
57
|
end
|
data/lib/bundler/installer.rb
CHANGED
|
@@ -127,6 +127,8 @@ module Bundler
|
|
|
127
127
|
template_path = File.expand_path("templates/Executable", __dir__)
|
|
128
128
|
template = File.read(template_path)
|
|
129
129
|
|
|
130
|
+
Bundler.mkdir_p(bin_path)
|
|
131
|
+
|
|
130
132
|
exists = []
|
|
131
133
|
spec.executables.each do |executable|
|
|
132
134
|
binstub_path = "#{bin_path}/#{executable}"
|
|
@@ -173,6 +175,8 @@ module Bundler
|
|
|
173
175
|
ruby_command = Thor::Util.ruby_command
|
|
174
176
|
ruby_command = ruby_command
|
|
175
177
|
|
|
178
|
+
Bundler.mkdir_p(bin_path)
|
|
179
|
+
|
|
176
180
|
spec.executables.each do |executable|
|
|
177
181
|
next if executable == "bundle"
|
|
178
182
|
executable_path = Pathname(spec.full_gem_path).join(spec.bindir, executable).relative_path_from(bin_path)
|
|
@@ -49,7 +49,7 @@ If updating, prefer updating only to next patch version\.
|
|
|
49
49
|
If updating, prefer updating only to next minor version\.
|
|
50
50
|
.TP
|
|
51
51
|
\fB\-\-major\fR
|
|
52
|
-
If updating, prefer updating to
|
|
52
|
+
If updating, prefer updating to latest major version (default)\.
|
|
53
53
|
.TP
|
|
54
54
|
\fB\-\-pre\fR
|
|
55
55
|
If updating, always choose the highest allowed version, regardless of prerelease status\.
|
|
@@ -75,7 +75,7 @@ Lock the gems specified in Gemfile.
|
|
|
75
75
|
If updating, prefer updating only to next minor version.
|
|
76
76
|
|
|
77
77
|
* `--major`:
|
|
78
|
-
If updating, prefer updating to
|
|
78
|
+
If updating, prefer updating to latest major version (default).
|
|
79
79
|
|
|
80
80
|
* `--pre`:
|
|
81
81
|
If updating, always choose the highest allowed version, regardless of prerelease status.
|
|
@@ -37,7 +37,7 @@ List gems organized by groups\.
|
|
|
37
37
|
Prefer updating only to next minor version\.
|
|
38
38
|
.TP
|
|
39
39
|
\fB\-\-major\fR
|
|
40
|
-
Prefer updating to
|
|
40
|
+
Prefer updating to latest major version (default)\.
|
|
41
41
|
.TP
|
|
42
42
|
\fB\-\-patch\fR
|
|
43
43
|
Prefer updating only to next patch version\.
|
|
@@ -55,7 +55,7 @@ are up to date, Bundler will exit with a status of 0. Otherwise, it will exit 1.
|
|
|
55
55
|
Prefer updating only to next minor version.
|
|
56
56
|
|
|
57
57
|
* `--major`:
|
|
58
|
-
Prefer updating to
|
|
58
|
+
Prefer updating to latest major version (default).
|
|
59
59
|
|
|
60
60
|
* `--patch`:
|
|
61
61
|
Prefer updating only to next patch version.
|
|
@@ -54,7 +54,7 @@ Prefer updating only to next patch version\.
|
|
|
54
54
|
Prefer updating only to next minor version\.
|
|
55
55
|
.TP
|
|
56
56
|
\fB\-\-major\fR
|
|
57
|
-
Prefer updating to
|
|
57
|
+
Prefer updating to latest major version (default)\.
|
|
58
58
|
.TP
|
|
59
59
|
\fB\-\-pre\fR
|
|
60
60
|
Always choose the highest allowed version, regardless of prerelease status\.
|
|
@@ -175,7 +175,7 @@ Prefer updating only to next patch version\.
|
|
|
175
175
|
Prefer updating only to next minor version\.
|
|
176
176
|
.TP
|
|
177
177
|
\fB\-\-major\fR
|
|
178
|
-
Prefer updating to
|
|
178
|
+
Prefer updating to latest major version (default)\.
|
|
179
179
|
.TP
|
|
180
180
|
\fB\-\-strict\fR
|
|
181
181
|
Do not allow any gem to be updated past latest \fB\-\-patch\fR | \fB\-\-minor\fR | \fB\-\-major\fR\.
|
|
@@ -83,7 +83,7 @@ gem.
|
|
|
83
83
|
Prefer updating only to next minor version.
|
|
84
84
|
|
|
85
85
|
* `--major`:
|
|
86
|
-
Prefer updating to
|
|
86
|
+
Prefer updating to latest major version (default).
|
|
87
87
|
|
|
88
88
|
* `--pre`:
|
|
89
89
|
Always choose the highest allowed version, regardless of prerelease status.
|
|
@@ -238,7 +238,7 @@ versions are resolved. One of the following options can be used: `--patch`,
|
|
|
238
238
|
Prefer updating only to next minor version.
|
|
239
239
|
|
|
240
240
|
* `--major`:
|
|
241
|
-
Prefer updating to
|
|
241
|
+
Prefer updating to latest major version (default).
|
|
242
242
|
|
|
243
243
|
* `--strict`:
|
|
244
244
|
Do not allow any gem to be updated past latest `--patch` | `--minor` | `--major`.
|
data/lib/bundler/version.rb
CHANGED
data/lib/bundler.rb
CHANGED
|
@@ -119,9 +119,7 @@ module Bundler
|
|
|
119
119
|
def bin_path
|
|
120
120
|
@bin_path ||= begin
|
|
121
121
|
path = Bundler.settings[:bin] || "bin"
|
|
122
|
-
|
|
123
|
-
mkdir_p(path)
|
|
124
|
-
path
|
|
122
|
+
Pathname.new(path).expand_path(root).expand_path
|
|
125
123
|
end
|
|
126
124
|
end
|
|
127
125
|
|