bundler 4.0.9 → 4.0.11

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.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +32 -0
  3. data/lib/bundler/build_metadata.rb +1 -1
  4. data/lib/bundler/cli/gem.rb +1 -1
  5. data/lib/bundler/definition.rb +2 -0
  6. data/lib/bundler/injector.rb +1 -2
  7. data/lib/bundler/installer/parallel_installer.rb +11 -19
  8. data/lib/bundler/lockfile_generator.rb +16 -1
  9. data/lib/bundler/lockfile_parser.rb +8 -1
  10. data/lib/bundler/man/bundle-add.1 +1 -1
  11. data/lib/bundler/man/bundle-binstubs.1 +1 -1
  12. data/lib/bundler/man/bundle-cache.1 +1 -1
  13. data/lib/bundler/man/bundle-check.1 +1 -1
  14. data/lib/bundler/man/bundle-clean.1 +1 -1
  15. data/lib/bundler/man/bundle-config.1 +2 -2
  16. data/lib/bundler/man/bundle-config.1.ronn +1 -1
  17. data/lib/bundler/man/bundle-console.1 +1 -1
  18. data/lib/bundler/man/bundle-doctor.1 +1 -1
  19. data/lib/bundler/man/bundle-env.1 +1 -1
  20. data/lib/bundler/man/bundle-exec.1 +1 -1
  21. data/lib/bundler/man/bundle-fund.1 +1 -1
  22. data/lib/bundler/man/bundle-gem.1 +1 -1
  23. data/lib/bundler/man/bundle-help.1 +1 -1
  24. data/lib/bundler/man/bundle-info.1 +1 -1
  25. data/lib/bundler/man/bundle-init.1 +1 -1
  26. data/lib/bundler/man/bundle-install.1 +1 -1
  27. data/lib/bundler/man/bundle-issue.1 +1 -1
  28. data/lib/bundler/man/bundle-licenses.1 +1 -1
  29. data/lib/bundler/man/bundle-list.1 +1 -1
  30. data/lib/bundler/man/bundle-lock.1 +1 -1
  31. data/lib/bundler/man/bundle-open.1 +1 -1
  32. data/lib/bundler/man/bundle-outdated.1 +1 -1
  33. data/lib/bundler/man/bundle-platform.1 +1 -1
  34. data/lib/bundler/man/bundle-plugin.1 +1 -1
  35. data/lib/bundler/man/bundle-pristine.1 +1 -1
  36. data/lib/bundler/man/bundle-remove.1 +1 -1
  37. data/lib/bundler/man/bundle-show.1 +1 -1
  38. data/lib/bundler/man/bundle-update.1 +1 -1
  39. data/lib/bundler/man/bundle-version.1 +1 -1
  40. data/lib/bundler/man/bundle.1 +1 -1
  41. data/lib/bundler/man/gemfile.5 +1 -1
  42. data/lib/bundler/resolver/strategy.rb +6 -3
  43. data/lib/bundler/resolver.rb +18 -0
  44. data/lib/bundler/settings/validator.rb +7 -0
  45. data/lib/bundler/settings.rb +1 -0
  46. data/lib/bundler/source/metadata.rb +4 -0
  47. data/lib/bundler/source/rubygems.rb +1 -1
  48. data/lib/bundler/stub_specification.rb +1 -0
  49. data/lib/bundler/templates/newgem/newgem.gemspec.tt +10 -1
  50. data/lib/bundler/version.rb +1 -1
  51. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff315eb3319300026b3ab3422e82399e6b0ce63ef727f94e125a226623101c27
4
- data.tar.gz: 00bb903a5564f2565ebcbc350837283f724d1ef42d4f586b37a972fe568015da
3
+ metadata.gz: 1eb2d32f3dd6dc576ac4fc1cf263101ae709911da9a91d58d05e51f94a22f94a
4
+ data.tar.gz: 0df681b631b0be9801622df725900061a487c8a8855cc932c0bf1c978d1c6fe2
5
5
  SHA512:
6
- metadata.gz: c6a4c93541bd76ee07370d4995487fe663f10d8aa021f1d9104d6adfeb373a36bbc47fd3498094da011c561702d7a84ebb1854c80c99176578b0fbc666e2dba2
7
- data.tar.gz: 29943339931f1e5b37c836346171c51f2a00a2cadbd7d7b5f30da5dd5bacb1f1024b7601ded1e1d895a3da4e11cf1d6ea35768a7196b351e237179d63759cd13
6
+ metadata.gz: '0852662046057ee2680a9a0b975f169493da3681b08e2ce4b08cbad86ef1537b7598b87e24109a3b51c3c6b93dbc2863ca7259a18c45126b849a2e1885eefedf'
7
+ data.tar.gz: 00f14095e674ce91531777ab01f883de1e3e612fbbb3ee3a59a6eccfa6188be0fcbfadf237a7cf8133d05ed360ad6cc8fa6a7d0da588c3aad73501fb7af36a8b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.0.11 / 2026-04-30
4
+
5
+ ### Enhancements:
6
+
7
+ * Update gem creation guide URL to rubygems.org. Pull request [#9500](https://github.com/ruby/rubygems/pull/9500) by nissyi-gh
8
+ * Lock the checksum of Bundler itself in the lockfile. Pull request [#9366](https://github.com/ruby/rubygems/pull/9366) by Edouard-chin
9
+
10
+ ### Bug fixes:
11
+
12
+ * Fix installing gems with native extensions + transitive dependencies. Pull request [#9477](https://github.com/ruby/rubygems/pull/9477) by nicholasdower
13
+ * Fix the bundler version not being updated in dev/test lockfile. Pull request [#9463](https://github.com/ruby/rubygems/pull/9463) by Edouard-chin
14
+ * Ensure the release CI doesn't break due to the Bundler checksum feature. Pull request [#9436](https://github.com/ruby/rubygems/pull/9436) by Edouard-chin
15
+
16
+ ### Documentation:
17
+
18
+ * Fix formatting for BUNDLE_PREFER_PATCH variable in man page. Pull request [#9474](https://github.com/ruby/rubygems/pull/9474) by toy
19
+
20
+ ## 4.0.10 / 2026-04-08
21
+
22
+ ### Enhancements:
23
+
24
+ * Ignore warnings with spec different platforms. Pull request [#8508](https://github.com/ruby/rubygems/pull/8508) by hsbt
25
+ * Improve error message when current platform is not in lockfile. Pull request [#9439](https://github.com/ruby/rubygems/pull/9439) by 55728
26
+ * Cache package version selection. Pull request [#9410](https://github.com/ruby/rubygems/pull/9410) by Edouard-chin
27
+ * Check happy path first when comparing gem version. Pull request [#9417](https://github.com/ruby/rubygems/pull/9417) by Edouard-chin
28
+ * [feature] default_cli_command for config what command bundler runs when no specific command is provided. Pull request [#8886](https://github.com/ruby/rubygems/pull/8886) by jonbarlo
29
+ * Introduce a fast path for comparing Gem::Version. Pull request [#9414](https://github.com/ruby/rubygems/pull/9414) by Edouard-chin
30
+
31
+ ### Bug fixes:
32
+
33
+ * Restore rb_sys dependency for Rust. Pull request [#9416](https://github.com/ruby/rubygems/pull/9416) by bangseongbeom
34
+
3
35
  ## 4.0.9 / 2026-03-25
4
36
 
5
37
  ### Enhancements:
@@ -5,7 +5,7 @@ module Bundler
5
5
  module BuildMetadata
6
6
  # begin ivars
7
7
  @built_at = nil
8
- @git_commit_sha = "3ce4a32411".freeze
8
+ @git_commit_sha = "b7155a3865".freeze
9
9
  # end ivars
10
10
 
11
11
  # A hash representation of the build metadata.
@@ -288,7 +288,7 @@ module Bundler
288
288
  open_editor(options["edit"], target.join("#{name}.gemspec")) if options[:edit]
289
289
 
290
290
  Bundler.ui.info "\nGem '#{name}' was successfully created. " \
291
- "For more information on making a RubyGem visit https://bundler.io/guides/creating_gem.html"
291
+ "For more information on making a RubyGem visit https://guides.rubygems.org/make-your-own-gem/"
292
292
  end
293
293
 
294
294
  private
@@ -988,6 +988,8 @@ module Bundler
988
988
  end
989
989
  end
990
990
 
991
+ sources.metadata_source.checksum_store.merge!(@locked_gems.metadata_source.checksum_store) if @locked_gems
992
+
991
993
  changes
992
994
  end
993
995
 
@@ -80,11 +80,10 @@ module Bundler
80
80
  def conservative_version(spec)
81
81
  version = spec.version
82
82
  return ">= 0" if version.nil?
83
- segments = version.segments
84
83
  seg_end_index = version >= Gem::Version.new("1.0") ? 1 : 2
85
84
 
86
85
  prerelease_suffix = version.to_s.delete_prefix(version.release.to_s) if version.prerelease?
87
- "#{version_prefix}#{segments[0..seg_end_index].join(".")}#{prerelease_suffix}"
86
+ "#{version_prefix}#{version.segments[0..seg_end_index].join(".")}#{prerelease_suffix}"
88
87
  end
89
88
 
90
89
  def version_prefix
@@ -6,7 +6,7 @@ require_relative "gem_installer"
6
6
  module Bundler
7
7
  class ParallelInstaller
8
8
  class SpecInstallation
9
- attr_accessor :spec, :name, :full_name, :post_install_message, :state, :error
9
+ attr_accessor :spec, :name, :full_name, :post_install_message, :state, :error, :dependencies
10
10
  def initialize(spec)
11
11
  @spec = spec
12
12
  @name = spec.name
@@ -46,25 +46,11 @@ module Bundler
46
46
  !post_install_message.empty?
47
47
  end
48
48
 
49
- def ignorable_dependency?(dep)
50
- dep.type == :development || dep.name == @name
51
- end
52
-
53
- # Checks installed dependencies against spec's dependencies to make
54
- # sure needed dependencies have been installed.
49
+ # Recursively checks that all dependencies (direct and transitive) have been installed.
55
50
  def dependencies_installed?(installed_specs)
56
- dependencies.all? {|d| installed_specs.include? d.name }
57
- end
58
-
59
- # Represents only the non-development dependencies, the ones that are
60
- # itself and are in the total list.
61
- def dependencies
62
- @dependencies ||= all_dependencies.reject {|dep| ignorable_dependency? dep }
63
- end
64
-
65
- # Represents all dependencies
66
- def all_dependencies
67
- @spec.dependencies
51
+ dependencies.all? do |dep|
52
+ installed_specs.include?(dep.name) && dep.dependencies_installed?(installed_specs)
53
+ end
68
54
  end
69
55
 
70
56
  def to_s
@@ -85,6 +71,12 @@ module Bundler
85
71
  @force = force
86
72
  @local = local
87
73
  @specs = all_specs.map {|s| SpecInstallation.new(s) }
74
+ specs_by_name = @specs.to_h {|s| [s.name, s] }
75
+ @specs.each do |spec_install|
76
+ spec_install.dependencies = spec_install.spec.dependencies.filter_map do |dep|
77
+ specs_by_name[dep.name] unless dep.type == :development || dep.name == spec_install.name
78
+ end
79
+ end
88
80
  @specs.each do |spec_install|
89
81
  spec_install.state = :installed if skip.include?(spec_install.name)
90
82
  end if skip
@@ -71,7 +71,8 @@ module Bundler
71
71
  checksums = definition.resolve.map do |spec|
72
72
  spec.source.checksum_store.to_lock(spec)
73
73
  end
74
- add_section("CHECKSUMS", checksums)
74
+
75
+ add_section("CHECKSUMS", checksums + bundler_checksum)
75
76
  end
76
77
 
77
78
  def add_locked_ruby_version
@@ -100,5 +101,19 @@ module Bundler
100
101
  raise ArgumentError, "#{value.inspect} can't be serialized in a lockfile"
101
102
  end
102
103
  end
104
+
105
+ def bundler_checksum
106
+ return [] if Bundler.gem_version.to_s.end_with?(".dev") || ENV["SKIP_BUNDLER_CHECKSUM"]
107
+
108
+ bundler_spec = definition.sources.metadata_source.specs.search(["bundler", Bundler.gem_version]).last
109
+ return [] unless File.exist?(bundler_spec.cache_file)
110
+
111
+ require "rubygems/package"
112
+
113
+ package = Gem::Package.new(bundler_spec.cache_file)
114
+ definition.sources.metadata_source.checksum_store.register(bundler_spec, Checksum.from_gem_package(package))
115
+
116
+ [definition.sources.metadata_source.checksum_store.to_lock(bundler_spec)]
117
+ end
103
118
  end
104
119
  end
@@ -28,6 +28,7 @@ module Bundler
28
28
 
29
29
  attr_reader(
30
30
  :sources,
31
+ :metadata_source,
31
32
  :dependencies,
32
33
  :specs,
33
34
  :platforms,
@@ -97,6 +98,7 @@ module Bundler
97
98
  def initialize(lockfile, strict: false)
98
99
  @platforms = []
99
100
  @sources = []
101
+ @metadata_source = Source::Metadata.new
100
102
  @dependencies = {}
101
103
  @parse_method = nil
102
104
  @specs = {}
@@ -252,7 +254,12 @@ module Bundler
252
254
  version = Gem::Version.new(version)
253
255
  platform = platform ? Gem::Platform.new(platform) : Gem::Platform::RUBY
254
256
  full_name = Gem::NameTuple.new(name, version, platform).full_name
255
- return unless spec = @specs[full_name]
257
+ spec = @specs[full_name]
258
+
259
+ if name == "bundler"
260
+ spec ||= LazySpecification.new(name, version, platform, @metadata_source)
261
+ end
262
+ return unless spec
256
263
 
257
264
  if checksums
258
265
  checksums.split(",") do |lock_checksum|
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-ADD" "1" "March 2026" ""
3
+ .TH "BUNDLE\-ADD" "1" "April 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-add\fR \- Add gem to the Gemfile and run bundle install
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-BINSTUBS" "1" "March 2026" ""
3
+ .TH "BUNDLE\-BINSTUBS" "1" "April 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-binstubs\fR \- Install the binstubs of the listed gems
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-CACHE" "1" "March 2026" ""
3
+ .TH "BUNDLE\-CACHE" "1" "April 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-cache\fR \- Package your needed \fB\.gem\fR files into your application
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-CHECK" "1" "March 2026" ""
3
+ .TH "BUNDLE\-CHECK" "1" "April 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-check\fR \- Verifies if dependencies are satisfied by installed gems
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-CLEAN" "1" "March 2026" ""
3
+ .TH "BUNDLE\-CLEAN" "1" "April 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-clean\fR \- Cleans up unused gems in your bundler directory
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-CONFIG" "1" "March 2026" ""
3
+ .TH "BUNDLE\-CONFIG" "1" "April 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-config\fR \- Set bundler configuration options
6
6
  .SH "SYNOPSIS"
@@ -172,7 +172,7 @@ Whether Bundler will install gems into the default system path (\fBGem\.dir\fR)\
172
172
  \fBplugins\fR (\fBBUNDLE_PLUGINS\fR)
173
173
  Enable Bundler's experimental plugin system\.
174
174
  .TP
175
- \fBprefer_patch\fR (BUNDLE_PREFER_PATCH)
175
+ \fBprefer_patch\fR (\fBBUNDLE_PREFER_PATCH\fR)
176
176
  Prefer updating only to next patch version during updates\. Makes \fBbundle update\fR calls equivalent to \fBbundler update \-\-patch\fR\.
177
177
  .TP
178
178
  \fBredirect\fR (\fBBUNDLE_REDIRECT\fR)
@@ -223,7 +223,7 @@ learn more about their operation in [bundle install(1)](bundle-install.1.html).
223
223
  Whether Bundler will install gems into the default system path (`Gem.dir`).
224
224
  * `plugins` (`BUNDLE_PLUGINS`):
225
225
  Enable Bundler's experimental plugin system.
226
- * `prefer_patch` (BUNDLE_PREFER_PATCH):
226
+ * `prefer_patch` (`BUNDLE_PREFER_PATCH`):
227
227
  Prefer updating only to next patch version during updates. Makes `bundle update` calls equivalent to `bundler update --patch`.
228
228
  * `redirect` (`BUNDLE_REDIRECT`):
229
229
  The number of redirects allowed for network requests. Defaults to `5`.
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-CONSOLE" "1" "March 2026" ""
3
+ .TH "BUNDLE\-CONSOLE" "1" "April 2026" ""
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
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-DOCTOR" "1" "March 2026" ""
3
+ .TH "BUNDLE\-DOCTOR" "1" "April 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-doctor\fR \- Checks the bundle for common problems
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-ENV" "1" "March 2026" ""
3
+ .TH "BUNDLE\-ENV" "1" "April 2026" ""
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
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-EXEC" "1" "March 2026" ""
3
+ .TH "BUNDLE\-EXEC" "1" "April 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-exec\fR \- Execute a command in the context of the bundle
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-FUND" "1" "March 2026" ""
3
+ .TH "BUNDLE\-FUND" "1" "April 2026" ""
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
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-GEM" "1" "March 2026" ""
3
+ .TH "BUNDLE\-GEM" "1" "April 2026" ""
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
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-HELP" "1" "March 2026" ""
3
+ .TH "BUNDLE\-HELP" "1" "April 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-help\fR \- Displays detailed help for each subcommand
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-INFO" "1" "March 2026" ""
3
+ .TH "BUNDLE\-INFO" "1" "April 2026" ""
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
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-INIT" "1" "March 2026" ""
3
+ .TH "BUNDLE\-INIT" "1" "April 2026" ""
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
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-INSTALL" "1" "March 2026" ""
3
+ .TH "BUNDLE\-INSTALL" "1" "April 2026" ""
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
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-ISSUE" "1" "March 2026" ""
3
+ .TH "BUNDLE\-ISSUE" "1" "April 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-issue\fR \- Get help reporting Bundler issues
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-LICENSES" "1" "March 2026" ""
3
+ .TH "BUNDLE\-LICENSES" "1" "April 2026" ""
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
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-LIST" "1" "March 2026" ""
3
+ .TH "BUNDLE\-LIST" "1" "April 2026" ""
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
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-LOCK" "1" "March 2026" ""
3
+ .TH "BUNDLE\-LOCK" "1" "April 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-lock\fR \- Creates / Updates a lockfile without installing
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-OPEN" "1" "March 2026" ""
3
+ .TH "BUNDLE\-OPEN" "1" "April 2026" ""
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
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-OUTDATED" "1" "March 2026" ""
3
+ .TH "BUNDLE\-OUTDATED" "1" "April 2026" ""
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
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-PLATFORM" "1" "March 2026" ""
3
+ .TH "BUNDLE\-PLATFORM" "1" "April 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-platform\fR \- Displays platform compatibility information
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-PLUGIN" "1" "March 2026" ""
3
+ .TH "BUNDLE\-PLUGIN" "1" "April 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-plugin\fR \- Manage Bundler plugins
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-PRISTINE" "1" "March 2026" ""
3
+ .TH "BUNDLE\-PRISTINE" "1" "April 2026" ""
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
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-REMOVE" "1" "March 2026" ""
3
+ .TH "BUNDLE\-REMOVE" "1" "April 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-remove\fR \- Removes gems from the Gemfile
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-SHOW" "1" "March 2026" ""
3
+ .TH "BUNDLE\-SHOW" "1" "April 2026" ""
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
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-UPDATE" "1" "March 2026" ""
3
+ .TH "BUNDLE\-UPDATE" "1" "April 2026" ""
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
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE\-VERSION" "1" "March 2026" ""
3
+ .TH "BUNDLE\-VERSION" "1" "April 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\-version\fR \- Prints Bundler version information
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "BUNDLE" "1" "March 2026" ""
3
+ .TH "BUNDLE" "1" "April 2026" ""
4
4
  .SH "NAME"
5
5
  \fBbundle\fR \- Ruby Dependency Management
6
6
  .SH "SYNOPSIS"
@@ -1,6 +1,6 @@
1
1
  .\" generated with Ronn-NG/v0.10.1
2
2
  .\" http://github.com/apjanke/ronn-ng/tree/0.10.1
3
- .TH "GEMFILE" "5" "March 2026" ""
3
+ .TH "GEMFILE" "5" "April 2026" ""
4
4
  .SH "NAME"
5
5
  \fBGemfile\fR \- A format for describing gem dependencies for Ruby programs
6
6
  .SH "SYNOPSIS"
@@ -5,6 +5,7 @@ module Bundler
5
5
  class Strategy
6
6
  def initialize(source)
7
7
  @source = source
8
+ @package_priority_cache = {}
8
9
  end
9
10
 
10
11
  def next_package_and_version(unsatisfied)
@@ -17,10 +18,12 @@ module Bundler
17
18
 
18
19
  def next_term_to_try_from(unsatisfied)
19
20
  unsatisfied.min_by do |package, range|
20
- matching_versions = @source.versions_for(package, range)
21
- higher_versions = @source.versions_for(package, range.upper_invert)
21
+ @package_priority_cache[[package, range]] ||= begin
22
+ matching_versions = @source.versions_for(package, range)
23
+ higher_versions = @source.versions_for(package, range.upper_invert)
22
24
 
23
- [matching_versions.count <= 1 ? 0 : 1, higher_versions.count]
25
+ [matching_versions.count <= 1 ? 0 : 1, higher_versions.count]
26
+ end
24
27
  end
25
28
  end
26
29
 
@@ -353,9 +353,27 @@ module Bundler
353
353
  message << "\n#{other_specs_matching_message(specs, matching_part)}"
354
354
  end
355
355
 
356
+ if specs_matching_requirement.any? && (hint = platform_mismatch_hint)
357
+ message << "\n\n#{hint}"
358
+ end
359
+
356
360
  raise GemNotFound, message
357
361
  end
358
362
 
363
+ def platform_mismatch_hint
364
+ locked_platforms = Bundler.locked_gems&.platforms
365
+ return unless locked_platforms
366
+
367
+ local_platform = Bundler.local_platform
368
+ return if locked_platforms.include?(local_platform)
369
+ return if locked_platforms.any? {|p| p == Gem::Platform::RUBY }
370
+
371
+ "Your current platform (#{local_platform}) is not included in the lockfile's platforms (#{locked_platforms.join(", ")}). " \
372
+ "Add the current platform to the lockfile with\n`bundle lock --add-platform #{local_platform}` and try again."
373
+ rescue GemfileNotFound
374
+ nil
375
+ end
376
+
359
377
  def filtered_versions_for(package)
360
378
  @gem_version_promoter.filter_versions(package, @all_versions[package])
361
379
  end
@@ -74,6 +74,13 @@ module Bundler
74
74
  fail!(key, value, "`#{other_key}` is current set to #{other_setting.inspect}", "the `#{conflicting.join("`, `")}` groups conflict")
75
75
  end
76
76
  end
77
+
78
+ rule %w[default_cli_command], "default_cli_command must be either 'install' or 'cli_help'" do |key, value, _settings|
79
+ valid_values = %w[install cli_help]
80
+ if !value.nil? && !valid_values.include?(value.to_s)
81
+ fail!(key, value, "must be one of: #{valid_values.join(", ")}")
82
+ end
83
+ end
77
84
  end
78
85
  end
79
86
  end
@@ -59,6 +59,7 @@ module Bundler
59
59
  bin
60
60
  cache_path
61
61
  console
62
+ default_cli_command
62
63
  gem.ci
63
64
  gem.github_username
64
65
  gem.linter
@@ -58,6 +58,10 @@ module Bundler
58
58
  def version_message(spec)
59
59
  "#{spec.name} #{spec.version}"
60
60
  end
61
+
62
+ def checksum_store
63
+ @checksum_store ||= Checksum::Store.new
64
+ end
61
65
  end
62
66
  end
63
67
  end
@@ -508,7 +508,7 @@ module Bundler
508
508
 
509
509
  # We are using a mutex to reaed and write from/to the hash.
510
510
  # The reason this double synchronization was added is for performance
511
- # and lock the mutex for the shortest possible amount of time. Otherwise,
511
+ # and to lock the mutex for the shortest possible amount of time. Otherwise,
512
512
  # all threads are fighting over this mutex and when it gets acquired it gets locked
513
513
  # until a threads finishes downloading a gem, leaving the other threads waiting
514
514
  # doing nothing.
@@ -52,6 +52,7 @@ module Bundler
52
52
 
53
53
  # This is defined directly to avoid having to loading the full spec
54
54
  def missing_extensions?
55
+ return false if RUBY_ENGINE == "jruby"
55
56
  return false if default_gem?
56
57
  return false if extensions.empty?
57
58
  return false if File.exist? gem_build_complete_path
@@ -22,6 +22,12 @@ Gem::Specification.new do |spec|
22
22
  spec.metadata["changelog_uri"] = "<%= config[:changelog_uri] %>"
23
23
  <%- end -%>
24
24
 
25
+ # Uncomment the line below to require MFA for gem pushes.
26
+ # This helps protect your gem from supply chain attacks by ensuring
27
+ # no one can publish a new version without multi-factor authentication.
28
+ # See: https://guides.rubygems.org/mfa-requirement-opt-in/
29
+ # spec.metadata["rubygems_mfa_required"] = "true"
30
+
25
31
  # Specify which files should be added to the gem when it is released.
26
32
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
27
33
  gemspec = File.basename(__FILE__)
@@ -40,10 +46,13 @@ Gem::Specification.new do |spec|
40
46
 
41
47
  # Uncomment to register a new dependency of your gem
42
48
  # spec.add_dependency "example-gem", "~> 1.0"
49
+ <%- if config[:ext] == 'rust' -%>
50
+ spec.add_dependency "rb_sys", "~> 0.9.91"
51
+ <%- end -%>
43
52
  <%- if config[:ext] == 'go' -%>
44
53
  spec.add_dependency "go_gem", "~> 0.2"
45
54
  <%- end -%>
46
55
 
47
56
  # For more information and examples about making a new gem, check out our
48
- # guide at: https://bundler.io/guides/creating_gem.html
57
+ # guide at: https://guides.rubygems.org/make-your-own-gem/
49
58
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "4.0.9".freeze
4
+ VERSION = "4.0.11".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= gem_version.segments.first
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.9
4
+ version: 4.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Arko