bundler 4.0.0.beta2 → 4.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 634a5d5342f3171f45785382c66e37eadd9e233782cf590ebe1163a857d7d75c
4
- data.tar.gz: 2a4f5c89ba76155d05341c6651cf3583cb778f1912adf64647c752fafad03a46
3
+ metadata.gz: b33d66a9c2eb47416c1c3a4b32d7e66a4cf1239e8e899783c35f1cafe8eff20e
4
+ data.tar.gz: 82936b62cddb391a1b1f84492a6ef1be7ab4520fb6e51eaf1d016b9f33bb89ee
5
5
  SHA512:
6
- metadata.gz: 4ef623469cfa6abb93f3bb7932a739824ae25285f29f59895786b041347b23d01b8f0f604ad133a5827b9f84862b0ac75a313376fbb20f480b5c44fb10a063bb
7
- data.tar.gz: 2b07593c43df7d7b8e1cd4f4fbe6a83e44656804c6b10a9f5ce908057bd8c175e4f0f8683c3251bbcdd05d7aec607a43cb21e4674c405c5a7dbbea6cde669ef7
6
+ metadata.gz: d8795b477c774ce5552d81c222ce0fa363def747cb224394842b0adfd344846b10dc5d9c2cfe5f1aaaa41da787458f949a83fb1726587e8460b8a1ee8750c02f
7
+ data.tar.gz: 502655e746eb8ce71d2282c7487a7ccac711e733ddc64984a4980ddeb684668171ac72c3726884a16aea16309fd4d616d1d5b36576ad54b5e0fc737d23344185
data/CHANGELOG.md CHANGED
@@ -1,27 +1,77 @@
1
1
  # Changelog
2
2
 
3
- ## 4.0.0.beta2 (2025-11-26)
3
+ ## 4.0.1 (2025-12-09)
4
+
5
+ ### Performance:
6
+
7
+ - Increase connection pool to allow for up to 70% speed increase on `bundle install` [#9087](https://github.com/ruby/rubygems/pull/9087)
8
+
9
+ ### Enhancements:
10
+
11
+ - Fix the config suggestion in the warning for `$ bundle` [#9164](https://github.com/ruby/rubygems/pull/9164)
12
+ - Fix native extension loading in newgem template for RHEL-based systems [#9156](https://github.com/ruby/rubygems/pull/9156)
13
+
14
+ ### Bug fixes:
15
+
16
+ - Fix Bundler removing executables after creating them [#9169](https://github.com/ruby/rubygems/pull/9169)
17
+
18
+ ## 4.0.0 (2025-12-03)
4
19
 
5
20
  ### Features:
6
21
 
7
22
  - Support bundle install --lockfile option [#9111](https://github.com/ruby/rubygems/pull/9111)
8
23
  - Add support for lockfile in Gemfile and bundle install --no-lock [#9059](https://github.com/ruby/rubygems/pull/9059)
24
+ - Add `--ext=go` to `bundle gem` [#8183](https://github.com/ruby/rubygems/pull/8183)
25
+ - Update Bundler::CurrentRuby::ALL_RUBY_VERSIONS [#9058](https://github.com/ruby/rubygems/pull/9058)
26
+ - Introduce `bundle list --format=json` [#8728](https://github.com/ruby/rubygems/pull/8728)
9
27
 
10
28
  ### Performance:
11
29
 
12
30
  - Run git operations in parallel to speed things up: [#9100](https://github.com/ruby/rubygems/pull/9100)
31
+ - Replace instance method look up in plugin installer [#9094](https://github.com/ruby/rubygems/pull/9094)
32
+ - Adjust the API_REQUEST_LIMIT to make less network roundtrip [#9071](https://github.com/ruby/rubygems/pull/9071)
13
33
 
14
34
  ### Enhancements:
15
35
 
16
- - Fixup GH-9085 [#9108](https://github.com/ruby/rubygems/pull/9108)
17
- - Add go_gem/rake_task for Go native extention gem skeleton [#9105](https://github.com/ruby/rubygems/pull/9105)
18
- - Keep legacy windows platform, not removed them [#9104](https://github.com/ruby/rubygems/pull/9104)
36
+ - Make BUNDLE_LOCKFILE environment variable have precedence over lockfile method in Gemfile [#9146](https://github.com/ruby/rubygems/pull/9146)
37
+ - Improve banner message for the default command [#9145](https://github.com/ruby/rubygems/pull/9145)
38
+ - Introduce `install_or_cli_help` and use it default `bundle` command [#9136](https://github.com/ruby/rubygems/pull/9136)
39
+ - Add go_gem/rake_task for Go native extension gem skeleton [#9105](https://github.com/ruby/rubygems/pull/9105)
40
+ - Warn users that `bundle` now display the help: [#9092](https://github.com/ruby/rubygems/pull/9092)
41
+ - Use DidYouMean::SpellChecker for gem suggestions in Bundler [#3857](https://github.com/ruby/rubygems/pull/3857)
42
+ - Update all vendored libraries to latest version [#9089](https://github.com/ruby/rubygems/pull/9089)
43
+ - We don't need to allow some warning now [#9074](https://github.com/ruby/rubygems/pull/9074)
44
+ - Support to embedded Pathname [#9056](https://github.com/ruby/rubygems/pull/9056)
45
+ - Enforce activation of irb when running with bundle console [#9033](https://github.com/ruby/rubygems/pull/9033)
46
+ - Update Magnus version in Rust extension gem template [#9025](https://github.com/ruby/rubygems/pull/9025)
47
+ - Add checksum of gems hosted on private servers: [#9004](https://github.com/ruby/rubygems/pull/9004)
48
+ - Loading support on Windows [#8254](https://github.com/ruby/rubygems/pull/8254)
49
+ - Improve error message when the same source is specified through `gemspec` and `path` [#8460](https://github.com/ruby/rubygems/pull/8460)
50
+ - Raise an error in frozen mode if some registry gems have empty checksums [#8888](https://github.com/ruby/rubygems/pull/8888)
51
+ - Bump vendored thor to 1.4.0 [#8883](https://github.com/ruby/rubygems/pull/8883)
52
+ - Delay default path and global cache changes to Bundler 5 [#8867](https://github.com/ruby/rubygems/pull/8867)
53
+ - Fix spacing in bundle gem newgem.gemspec.tt [#8865](https://github.com/ruby/rubygems/pull/8865)
54
+ - Add some missing deprecation messages [#8844](https://github.com/ruby/rubygems/pull/8844)
19
55
 
20
56
  ### Bug fixes:
21
57
 
58
+ - Fixed checksums generation issue when no source is specified [#9133](https://github.com/ruby/rubygems/pull/9133)
22
59
  - Check for file existence before deletion from cache [#9095](https://github.com/ruby/rubygems/pull/9095)
23
-
24
- ## 4.0.0.beta1 (2025-11-20)
60
+ - Use method_defined?(:method, false) [#9098](https://github.com/ruby/rubygems/pull/9098)
61
+ - Handle BUNDLER_VERSION being set to an empty string [#6928](https://github.com/ruby/rubygems/pull/6928)
62
+ - Fix `bundle install` when the Gemfile contains "install_if" git gems: [#8992](https://github.com/ruby/rubygems/pull/8992)
63
+ - Fix installation issue related to path sources and precompiled gems [#8973](https://github.com/ruby/rubygems/pull/8973)
64
+ - Fix outdated lockfile during `bundle lock` when source changes [#8962](https://github.com/ruby/rubygems/pull/8962)
65
+ - Raise error on missing version file [#8963](https://github.com/ruby/rubygems/pull/8963)
66
+ - Fix `bundle cache --frozen` and `bundle cache --no-prune` not printing a deprecation message [#8926](https://github.com/ruby/rubygems/pull/8926)
67
+ - Fix local installation incorrectly forced if there's a `vendor/cache` directory and frozen mode is set [#8925](https://github.com/ruby/rubygems/pull/8925)
68
+ - Fix `bundle lock --update <gem>` with `--lockfile` flag updating all gems [#8922](https://github.com/ruby/rubygems/pull/8922)
69
+ - Fix `bundle show --verbose` and recommend it as an alternative to `bundle show --outdated` [#8915](https://github.com/ruby/rubygems/pull/8915)
70
+ - Fix `bundle cache --no-all` not printing a deprecation warning [#8912](https://github.com/ruby/rubygems/pull/8912)
71
+ - Fix `bundle update foo` unable to update foo in an edge case [#8897](https://github.com/ruby/rubygems/pull/8897)
72
+ - Fix Bundler printing more flags than actually passed in verbose mode [#8914](https://github.com/ruby/rubygems/pull/8914)
73
+ - Fix bundler failing to install sorbet-static in truffleruby when there's no lockfile [#8872](https://github.com/ruby/rubygems/pull/8872)
74
+ - Cancel deprecation of `--force` flag to `bundle install` and `bundle update` [#8843](https://github.com/ruby/rubygems/pull/8843)
25
75
 
26
76
  ### Security:
27
77
 
@@ -35,14 +85,12 @@
35
85
  - Pick and add extra changes for 4.0.0 version [#9018](https://github.com/ruby/rubygems/pull/9018)
36
86
  - Replaced Bundler::SharedHelpers.major_deprecation to feature_removed! or feature_deprecated! [#9016](https://github.com/ruby/rubygems/pull/9016)
37
87
  - Removed legacy_check option from SpecSet#for [#9015](https://github.com/ruby/rubygems/pull/9015)
38
- - Removed deprecated legacy windows platform support [#9013](https://github.com/ruby/rubygems/pull/9013)
39
88
  - Make update_requires_all_flag to settings [#9011](https://github.com/ruby/rubygems/pull/9011)
40
89
  - Make default cli command settings [#9010](https://github.com/ruby/rubygems/pull/9010)
41
90
  - Make global_gem_cache flag to settings [#9009](https://github.com/ruby/rubygems/pull/9009)
42
91
  - Consolidate removal of `Bundler.rubygems.all_specs` [#9008](https://github.com/ruby/rubygems/pull/9008)
43
92
  - Consolidate removal of `Bundler::SpecSet#-` and `Bundler::SpecSet#<<` [#9007](https://github.com/ruby/rubygems/pull/9007)
44
93
  - Replaced Bundler.feature_flag.plugins? to Bundler.settings [#9006](https://github.com/ruby/rubygems/pull/9006)
45
- - Switch to 4.0.0.dev in development version [#9002](https://github.com/ruby/rubygems/pull/9002)
46
94
  - Make `bundle show --outdated` raise an error [#8980](https://github.com/ruby/rubygems/pull/8980)
47
95
  - Make `--local-git` flag to `bundle plugin install` raise an error [#8979](https://github.com/ruby/rubygems/pull/8979)
48
96
  - Switch `cache_all` to be `true` by default [#8975](https://github.com/ruby/rubygems/pull/8975)
@@ -59,40 +107,17 @@
59
107
  - Remove deprecated `bundle viz` and `bundle inject` commands [#8923](https://github.com/ruby/rubygems/pull/8923)
60
108
  - Removed to workaround for Bundler 2.2 [#8903](https://github.com/ruby/rubygems/pull/8903)
61
109
 
62
- ### Features:
63
-
64
- - Update Bundler::CurrentRuby::ALL_RUBY_VERSIONS [#9058](https://github.com/ruby/rubygems/pull/9058)
65
- - Introduce `bundle list --format=json` [#8728](https://github.com/ruby/rubygems/pull/8728)
66
-
67
- ### Performance:
68
-
69
- - Replace instance method look up in plugin installer [#9094](https://github.com/ruby/rubygems/pull/9094)
70
- - Adjust the API_REQUEST_LIMIT to make less network roundtrip [#9071](https://github.com/ruby/rubygems/pull/9071)
71
-
72
- ### Enhancements:
73
-
74
- - Use DidYouMean::SpellChecker for gem suggestions in Bundler [#3857](https://github.com/ruby/rubygems/pull/3857)
75
- - Update all vendored libraries to latest version [#9089](https://github.com/ruby/rubygems/pull/9089)
76
- - We don't need to allow some warning now [#9074](https://github.com/ruby/rubygems/pull/9074)
77
- - Shell out fewer times [#9068](https://github.com/ruby/rubygems/pull/9068)
78
- - Build gems directly instead of shelling out [#9053](https://github.com/ruby/rubygems/pull/9053)
79
- - Support to embedded Pathname [#9056](https://github.com/ruby/rubygems/pull/9056)
80
- - Forcely activate irb when running with bundle console [#9033](https://github.com/ruby/rubygems/pull/9033)
81
- - Update Magnus version in Rust extension gem template [#9025](https://github.com/ruby/rubygems/pull/9025)
82
- - Postpone to remove legacy mingw platform [#9023](https://github.com/ruby/rubygems/pull/9023)
83
- - Add checksum of gems hosted on private servers: [#9004](https://github.com/ruby/rubygems/pull/9004)
84
- - Loading support on Windows [#8254](https://github.com/ruby/rubygems/pull/8254)
85
-
86
- ### Bug fixes:
87
-
88
- - Fix `bundle install` when the Gemfile contains "install_if" git gems: [#8992](https://github.com/ruby/rubygems/pull/8992)
89
- - Fix installation issue related to path sources and precompiled gems [#8973](https://github.com/ruby/rubygems/pull/8973)
90
- - Fix outdated lockfile during `bundle lock` when source changes [#8962](https://github.com/ruby/rubygems/pull/8962)
91
- - Raise error on missing version file [#8963](https://github.com/ruby/rubygems/pull/8963)
92
-
93
110
  ### Documentation:
94
111
 
112
+ - Unified UPGRADING.md and extract blog.rubygems.org [#9148](https://github.com/ruby/rubygems/pull/9148)
113
+ - Remove italic formatting from changelog section headers [#9128](https://github.com/ruby/rubygems/pull/9128)
95
114
  - Small clarifications to Bundler 4 upgrade docs [#8964](https://github.com/ruby/rubygems/pull/8964)
115
+ - Improve documentation of `bundle doctor`, `bundle plugin`, and `bundle config` [#8919](https://github.com/ruby/rubygems/pull/8919)
116
+ - Make sure all CLI flags and subcommands are documented [#8861](https://github.com/ruby/rubygems/pull/8861)
117
+ - Clarify documentation about new default gem installation directory in Bundler 4 [#8857](https://github.com/ruby/rubygems/pull/8857)
118
+ - Use mailto link in Code of Conduct [#8849](https://github.com/ruby/rubygems/pull/8849)
119
+ - Update Code of Conduct email to conduct@rubygems.org [#8848](https://github.com/ruby/rubygems/pull/8848)
120
+ - Add missing link to `irb` repo in DEBUGGING.md [#8842](https://github.com/ruby/rubygems/pull/8842)
96
121
 
97
122
  ## 2.7.2 (2025-09-09)
98
123
 
@@ -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 = "2025-11-26".freeze
8
- @git_commit_sha = "743810236c".freeze
7
+ @built_at = "2025-12-09".freeze
8
+ @git_commit_sha = "f3e5ebf5af".freeze
9
9
  # end ivars
10
10
 
11
11
  # A hash representation of the build metadata.
data/lib/bundler/cli.rb CHANGED
@@ -69,7 +69,7 @@ module Bundler
69
69
 
70
70
  # lock --lockfile works differently than install --lockfile
71
71
  unless current_cmd == "lock"
72
- custom_lockfile = options[:lockfile] || Bundler.settings[:lockfile]
72
+ custom_lockfile = options[:lockfile] || ENV["BUNDLE_LOCKFILE"] || Bundler.settings[:lockfile]
73
73
  if custom_lockfile && !custom_lockfile.empty?
74
74
  Bundler::SharedHelpers.set_env "BUNDLE_LOCKFILE", File.expand_path(custom_lockfile)
75
75
  reset_settings = true
@@ -120,20 +120,31 @@ module Bundler
120
120
  self.class.send(:class_options_help, shell)
121
121
  end
122
122
 
123
+ desc "install_or_cli_help", "Deprecated alias of install", hide: true
124
+ def install_or_cli_help
125
+ Bundler.ui.warn <<~MSG
126
+ `bundle install_or_cli_help` is a deprecated alias of `bundle install`.
127
+ It might be called due to the 'default_cli_command' being set to 'install_or_cli_help',
128
+ if so fix that by running `bundle config set default_cli_command install --global`.
129
+ MSG
130
+ invoke_other_command("install")
131
+ end
132
+
123
133
  def self.default_command(meth = nil)
124
134
  return super if meth
125
135
 
126
- default_cli_command = Bundler.settings[:default_cli_command]
127
- return default_cli_command if default_cli_command
136
+ unless Bundler.settings[:default_cli_command]
137
+ Bundler.ui.info <<~MSG
138
+ In a future version of Bundler, running `bundle` without argument will no longer run `bundle install`.
139
+ Instead, the `cli_help` command will be displayed. Please use `bundle install` explicitly for scripts like CI/CD.
140
+ You can use the future behavior now with `bundle config set default_cli_command cli_help --global`,
141
+ or you can continue to use the current behavior with `bundle config set default_cli_command install --global`.
142
+ This message will be removed after a default_cli_command value is set.
128
143
 
129
- Bundler.ui.warn(<<~MSG)
130
- In the next version of Bundler, running `bundle` without argument will no longer run `bundle install`.
131
- Instead, the `help` command will be displayed.
132
-
133
- If you'd like to keep the previous behaviour please run `bundle config set default_cli_command install --global`.
134
- MSG
144
+ MSG
145
+ end
135
146
 
136
- "install"
147
+ Bundler.settings[:default_cli_command] || "install"
137
148
  end
138
149
 
139
150
  class_option "no-color", type: :boolean, desc: "Disable colorization in output"
@@ -274,9 +285,14 @@ module Bundler
274
285
  end
275
286
 
276
287
  require_relative "cli/install"
288
+ options = self.options.dup
289
+ options["lockfile"] ||= ENV["BUNDLE_LOCKFILE"]
277
290
  Bundler.settings.temporary(no_install: false) do
278
- Install.new(options.dup).run
291
+ Install.new(options).run
279
292
  end
293
+ rescue GemfileNotFound => error
294
+ invoke_other_command("cli_help")
295
+ raise error # re-raise to show the error and get a failing exit status
280
296
  end
281
297
 
282
298
  map aliases_for("install")
@@ -723,6 +739,19 @@ module Bundler
723
739
  config[:current_command]
724
740
  end
725
741
 
742
+ def invoke_other_command(name)
743
+ _, _, config = @_initializer
744
+ original_command = config[:current_command]
745
+ command = self.class.all_commands[name]
746
+ config[:current_command] = command
747
+ send(name)
748
+ ensure
749
+ config[:current_command] = original_command
750
+ end
751
+
752
+ def current_command=(command)
753
+ end
754
+
726
755
  def print_command
727
756
  return unless Bundler.ui.debug?
728
757
  cmd = current_command
@@ -539,6 +539,8 @@ module Bundler
539
539
  end
540
540
 
541
541
  def add_checksums
542
+ require "rubygems/package"
543
+
542
544
  @locked_checksums = true
543
545
 
544
546
  setup_domain!(add_checksums: true)
@@ -60,6 +60,28 @@ module Bundler
60
60
  end
61
61
  end
62
62
 
63
+ # needed for binstubs
64
+ def executables
65
+ if @remote_specification
66
+ @remote_specification.executables
67
+ elsif _local_specification
68
+ _local_specification.executables
69
+ else
70
+ super
71
+ end
72
+ end
73
+
74
+ # needed for bundle clean
75
+ def bindir
76
+ if @remote_specification
77
+ @remote_specification.bindir
78
+ elsif _local_specification
79
+ _local_specification.bindir
80
+ else
81
+ super
82
+ end
83
+ end
84
+
63
85
  # needed for post_install_messages during install
64
86
  def post_install_message
65
87
  if @remote_specification
@@ -5,6 +5,12 @@ require "rubygems/remote_fetcher"
5
5
  module Bundler
6
6
  class Fetcher
7
7
  class GemRemoteFetcher < Gem::RemoteFetcher
8
+ def initialize(*)
9
+ super
10
+
11
+ @pool_size = 5
12
+ end
13
+
8
14
  def request(*args)
9
15
  super do |req|
10
16
  req.delete("User-Agent") if headers["User-Agent"]
@@ -494,9 +494,9 @@ The \fBbundle install\fR \fB\-\-no\-lock\fR option (which disables lockfile crea
494
494
  .IP "2." 4
495
495
  The \fBbundle install\fR \fB\-\-lockfile\fR option\.
496
496
  .IP "3." 4
497
- The \fBlockfile\fR method in the Gemfile\.
498
- .IP "4." 4
499
497
  The \fBBUNDLE_LOCKFILE\fR environment variable\.
498
+ .IP "4." 4
499
+ The \fBlockfile\fR method in the Gemfile\.
500
500
  .IP "5." 4
501
501
  The default behavior of adding \fB\.lock\fR to the end of the Gemfile name\.
502
502
  .IP "" 0
@@ -581,6 +581,6 @@ following precedence is used:
581
581
 
582
582
  1. The `bundle install` `--no-lock` option (which disables lockfile creation).
583
583
  1. The `bundle install` `--lockfile` option.
584
- 1. The `lockfile` method in the Gemfile.
585
584
  1. The `BUNDLE_LOCKFILE` environment variable.
585
+ 1. The `lockfile` method in the Gemfile.
586
586
  1. The default behavior of adding `.lock` to the end of the Gemfile name.
@@ -2,7 +2,7 @@
2
2
 
3
3
  require_relative "<%= File.basename(config[:namespaced_path]) %>/version"
4
4
  <%- if config[:ext] -%>
5
- require_relative "<%= File.basename(config[:namespaced_path]) %>/<%= config[:underscored_name] %>"
5
+ require "<%= File.basename(config[:namespaced_path]) %>/<%= config[:underscored_name] %>"
6
6
  <%- end -%>
7
7
 
8
8
  <%- config[:constant_array].each_with_index do |c, i| -%>
@@ -625,7 +625,7 @@ class Bundler::Thor
625
625
  # alias name.
626
626
  def find_command_possibilities(meth)
627
627
  len = meth.to_s.length
628
- possibilities = all_commands.merge(map).keys.select { |n| meth == n[0, len] }.sort
628
+ possibilities = all_commands.reject { |_k, c| c.hidden? }.merge(map).keys.select { |n| meth == n[0, len] }.sort
629
629
  unique_possibilities = possibilities.map { |k| map[k] || k }.uniq
630
630
 
631
631
  if possibilities.include?(meth)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "4.0.0.beta2".freeze
4
+ VERSION = "4.0.1".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.0.beta2
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Arko