bundler 4.0.0.beta2 → 4.0.0

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: ff773a79d243042d8e5f038f26bed5bb2d2b7278b8c1917874e63d5a49824c33
4
+ data.tar.gz: b201596e375da2a5928dc5a907f11af3a6f2327730b20e54bcb00a1ac7f731d3
5
5
  SHA512:
6
- metadata.gz: 4ef623469cfa6abb93f3bb7932a739824ae25285f29f59895786b041347b23d01b8f0f604ad133a5827b9f84862b0ac75a313376fbb20f480b5c44fb10a063bb
7
- data.tar.gz: 2b07593c43df7d7b8e1cd4f4fbe6a83e44656804c6b10a9f5ce908057bd8c175e4f0f8683c3251bbcdd05d7aec607a43cb21e4674c405c5a7dbbea6cde669ef7
6
+ metadata.gz: 9c8b6e998ebb4a1c77d35148a1ff2ceaf04061552080db9dca5d39c743980d285142139cb469f5e8ea4640259314e2300c3397460594d7b795c7e5c426ed191a
7
+ data.tar.gz: 0d6f774a34a05a23074b74e19d6a776c8d771affe729aa83292df730d28bb5e80b038c6c16645198f6dd29c11c2d9da49f589291fc85370813596910cc967bad
data/CHANGELOG.md CHANGED
@@ -1,27 +1,62 @@
1
1
  # Changelog
2
2
 
3
- ## 4.0.0.beta2 (2025-11-26)
3
+ ## 4.0.0 (2025-12-03)
4
4
 
5
5
  ### Features:
6
6
 
7
7
  - Support bundle install --lockfile option [#9111](https://github.com/ruby/rubygems/pull/9111)
8
8
  - Add support for lockfile in Gemfile and bundle install --no-lock [#9059](https://github.com/ruby/rubygems/pull/9059)
9
+ - Add `--ext=go` to `bundle gem` [#8183](https://github.com/ruby/rubygems/pull/8183)
10
+ - Update Bundler::CurrentRuby::ALL_RUBY_VERSIONS [#9058](https://github.com/ruby/rubygems/pull/9058)
11
+ - Introduce `bundle list --format=json` [#8728](https://github.com/ruby/rubygems/pull/8728)
9
12
 
10
13
  ### Performance:
11
14
 
12
15
  - Run git operations in parallel to speed things up: [#9100](https://github.com/ruby/rubygems/pull/9100)
16
+ - Replace instance method look up in plugin installer [#9094](https://github.com/ruby/rubygems/pull/9094)
17
+ - Adjust the API_REQUEST_LIMIT to make less network roundtrip [#9071](https://github.com/ruby/rubygems/pull/9071)
13
18
 
14
19
  ### Enhancements:
15
20
 
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)
21
+ - Make BUNDLE_LOCKFILE environment variable have precedence over lockfile method in Gemfile [#9146](https://github.com/ruby/rubygems/pull/9146)
22
+ - Improve banner message for the default command [#9145](https://github.com/ruby/rubygems/pull/9145)
23
+ - Introduce `install_or_cli_help` and use it default `bundle` command [#9136](https://github.com/ruby/rubygems/pull/9136)
24
+ - Add go_gem/rake_task for Go native extension gem skeleton [#9105](https://github.com/ruby/rubygems/pull/9105)
25
+ - Warn users that `bundle` now display the help: [#9092](https://github.com/ruby/rubygems/pull/9092)
26
+ - Use DidYouMean::SpellChecker for gem suggestions in Bundler [#3857](https://github.com/ruby/rubygems/pull/3857)
27
+ - Update all vendored libraries to latest version [#9089](https://github.com/ruby/rubygems/pull/9089)
28
+ - We don't need to allow some warning now [#9074](https://github.com/ruby/rubygems/pull/9074)
29
+ - Support to embedded Pathname [#9056](https://github.com/ruby/rubygems/pull/9056)
30
+ - Enforce activation of irb when running with bundle console [#9033](https://github.com/ruby/rubygems/pull/9033)
31
+ - Update Magnus version in Rust extension gem template [#9025](https://github.com/ruby/rubygems/pull/9025)
32
+ - Add checksum of gems hosted on private servers: [#9004](https://github.com/ruby/rubygems/pull/9004)
33
+ - Loading support on Windows [#8254](https://github.com/ruby/rubygems/pull/8254)
34
+ - Improve error message when the same source is specified through `gemspec` and `path` [#8460](https://github.com/ruby/rubygems/pull/8460)
35
+ - Raise an error in frozen mode if some registry gems have empty checksums [#8888](https://github.com/ruby/rubygems/pull/8888)
36
+ - Bump vendored thor to 1.4.0 [#8883](https://github.com/ruby/rubygems/pull/8883)
37
+ - Delay default path and global cache changes to Bundler 5 [#8867](https://github.com/ruby/rubygems/pull/8867)
38
+ - Fix spacing in bundle gem newgem.gemspec.tt [#8865](https://github.com/ruby/rubygems/pull/8865)
39
+ - Add some missing deprecation messages [#8844](https://github.com/ruby/rubygems/pull/8844)
19
40
 
20
41
  ### Bug fixes:
21
42
 
43
+ - Fixed checksums generation issue when no source is specified [#9133](https://github.com/ruby/rubygems/pull/9133)
22
44
  - 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)
45
+ - Use method_defined?(:method, false) [#9098](https://github.com/ruby/rubygems/pull/9098)
46
+ - Handle BUNDLER_VERSION being set to an empty string [#6928](https://github.com/ruby/rubygems/pull/6928)
47
+ - Fix `bundle install` when the Gemfile contains "install_if" git gems: [#8992](https://github.com/ruby/rubygems/pull/8992)
48
+ - Fix installation issue related to path sources and precompiled gems [#8973](https://github.com/ruby/rubygems/pull/8973)
49
+ - Fix outdated lockfile during `bundle lock` when source changes [#8962](https://github.com/ruby/rubygems/pull/8962)
50
+ - Raise error on missing version file [#8963](https://github.com/ruby/rubygems/pull/8963)
51
+ - Fix `bundle cache --frozen` and `bundle cache --no-prune` not printing a deprecation message [#8926](https://github.com/ruby/rubygems/pull/8926)
52
+ - 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)
53
+ - Fix `bundle lock --update <gem>` with `--lockfile` flag updating all gems [#8922](https://github.com/ruby/rubygems/pull/8922)
54
+ - Fix `bundle show --verbose` and recommend it as an alternative to `bundle show --outdated` [#8915](https://github.com/ruby/rubygems/pull/8915)
55
+ - Fix `bundle cache --no-all` not printing a deprecation warning [#8912](https://github.com/ruby/rubygems/pull/8912)
56
+ - Fix `bundle update foo` unable to update foo in an edge case [#8897](https://github.com/ruby/rubygems/pull/8897)
57
+ - Fix Bundler printing more flags than actually passed in verbose mode [#8914](https://github.com/ruby/rubygems/pull/8914)
58
+ - Fix bundler failing to install sorbet-static in truffleruby when there's no lockfile [#8872](https://github.com/ruby/rubygems/pull/8872)
59
+ - Cancel deprecation of `--force` flag to `bundle install` and `bundle update` [#8843](https://github.com/ruby/rubygems/pull/8843)
25
60
 
26
61
  ### Security:
27
62
 
@@ -35,14 +70,12 @@
35
70
  - Pick and add extra changes for 4.0.0 version [#9018](https://github.com/ruby/rubygems/pull/9018)
36
71
  - Replaced Bundler::SharedHelpers.major_deprecation to feature_removed! or feature_deprecated! [#9016](https://github.com/ruby/rubygems/pull/9016)
37
72
  - 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
73
  - Make update_requires_all_flag to settings [#9011](https://github.com/ruby/rubygems/pull/9011)
40
74
  - Make default cli command settings [#9010](https://github.com/ruby/rubygems/pull/9010)
41
75
  - Make global_gem_cache flag to settings [#9009](https://github.com/ruby/rubygems/pull/9009)
42
76
  - Consolidate removal of `Bundler.rubygems.all_specs` [#9008](https://github.com/ruby/rubygems/pull/9008)
43
77
  - Consolidate removal of `Bundler::SpecSet#-` and `Bundler::SpecSet#<<` [#9007](https://github.com/ruby/rubygems/pull/9007)
44
78
  - 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
79
  - Make `bundle show --outdated` raise an error [#8980](https://github.com/ruby/rubygems/pull/8980)
47
80
  - Make `--local-git` flag to `bundle plugin install` raise an error [#8979](https://github.com/ruby/rubygems/pull/8979)
48
81
  - Switch `cache_all` to be `true` by default [#8975](https://github.com/ruby/rubygems/pull/8975)
@@ -59,40 +92,17 @@
59
92
  - Remove deprecated `bundle viz` and `bundle inject` commands [#8923](https://github.com/ruby/rubygems/pull/8923)
60
93
  - Removed to workaround for Bundler 2.2 [#8903](https://github.com/ruby/rubygems/pull/8903)
61
94
 
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
95
  ### Documentation:
94
96
 
97
+ - Unified UPGRADING.md and extract blog.rubygems.org [#9148](https://github.com/ruby/rubygems/pull/9148)
98
+ - Remove italic formatting from changelog section headers [#9128](https://github.com/ruby/rubygems/pull/9128)
95
99
  - Small clarifications to Bundler 4 upgrade docs [#8964](https://github.com/ruby/rubygems/pull/8964)
100
+ - Improve documentation of `bundle doctor`, `bundle plugin`, and `bundle config` [#8919](https://github.com/ruby/rubygems/pull/8919)
101
+ - Make sure all CLI flags and subcommands are documented [#8861](https://github.com/ruby/rubygems/pull/8861)
102
+ - Clarify documentation about new default gem installation directory in Bundler 4 [#8857](https://github.com/ruby/rubygems/pull/8857)
103
+ - Use mailto link in Code of Conduct [#8849](https://github.com/ruby/rubygems/pull/8849)
104
+ - Update Code of Conduct email to conduct@rubygems.org [#8848](https://github.com/ruby/rubygems/pull/8848)
105
+ - Add missing link to `irb` repo in DEBUGGING.md [#8842](https://github.com/ruby/rubygems/pull/8842)
96
106
 
97
107
  ## 2.7.2 (2025-09-09)
98
108
 
@@ -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-03".freeze
8
+ @git_commit_sha = "64d0dfe695".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,28 @@ module Bundler
120
120
  self.class.send(:class_options_help, shell)
121
121
  end
122
122
 
123
+ desc "install_or_cli_help", "Tries to run bundle install but prints a summary of bundler commands if there is no Gemfile", hide: true
124
+ def install_or_cli_help
125
+ invoke_other_command("install")
126
+ rescue GemfileNotFound => error
127
+ Bundler.ui.error error.message, wrap: true
128
+ invoke_other_command("cli_help")
129
+ end
130
+
123
131
  def self.default_command(meth = nil)
124
132
  return super if meth
125
133
 
126
- default_cli_command = Bundler.settings[:default_cli_command]
127
- return default_cli_command if default_cli_command
128
-
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
134
+ unless Bundler.settings[:default_cli_command]
135
+ Bundler.ui.info <<-MSG
136
+ In a future version of Bundler, running `bundle` without argument will no longer run `bundle install`.
137
+ Instead, the `cli_help` command will be displayed. Please use `bundle install` explicitly for scripts like CI/CD.
138
+ You can use the future behavior now with `bundle config set default_cli_command cli_help --global`,
139
+ or you can continue to use the current behavior with `bundle config set default_cli_command install_or_cli_help --global`.
140
+ This message will be removed after a default_cli_command value is set.
141
+ MSG
142
+ end
135
143
 
136
- "install"
144
+ Bundler.settings[:default_cli_command] || "install_or_cli_help"
137
145
  end
138
146
 
139
147
  class_option "no-color", type: :boolean, desc: "Disable colorization in output"
@@ -274,8 +282,10 @@ module Bundler
274
282
  end
275
283
 
276
284
  require_relative "cli/install"
285
+ options = self.options.dup
286
+ options["lockfile"] ||= ENV["BUNDLE_LOCKFILE"]
277
287
  Bundler.settings.temporary(no_install: false) do
278
- Install.new(options.dup).run
288
+ Install.new(options).run
279
289
  end
280
290
  end
281
291
 
@@ -723,6 +733,19 @@ module Bundler
723
733
  config[:current_command]
724
734
  end
725
735
 
736
+ def invoke_other_command(name)
737
+ _, _, config = @_initializer
738
+ original_command = config[:current_command]
739
+ command = self.class.all_commands[name]
740
+ config[:current_command] = command
741
+ send(name)
742
+ ensure
743
+ config[:current_command] = original_command
744
+ end
745
+
746
+ def current_command=(command)
747
+ end
748
+
726
749
  def print_command
727
750
  return unless Bundler.ui.debug?
728
751
  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)
@@ -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.
@@ -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.0".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.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Arko