bundler 4.0.13 → 4.0.14

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: 6aecb16228f32866a007c26b7a70fd787bcf81d42ee002004ba3ec2dd2625694
4
- data.tar.gz: 5bce03c60cbf8034dfc540848298fbe3d8958314dc8513b61c0e8238f180f096
3
+ metadata.gz: 2c7cfeed01a046a9b186ddcdb1039e59c4605673529e12fb08b3fb32f424650f
4
+ data.tar.gz: 375e9b2540c5493fb90cb4e2004372c4fdbac9ed67d09a680bc23fdb71e04c58
5
5
  SHA512:
6
- metadata.gz: 4500a906181c0c43b1384fd9dda403dcc00ec11466911c156b01b309f2886336e756057af742396786ad2a0111e1a650729ad7bc03d09d04b0984a3770d4ebf4
7
- data.tar.gz: 11e96f5ebdeca17df80db3506f010fd190b35c12cc8fd82532f6eeea9b51aa7b113a353c1cf88df215846c0226696a672813a79bf06202a3e5ffd7b543b0805a
6
+ metadata.gz: 55a5604bfb508d0c3b509702ce84a42bd4811f3f42222176133942fed42ff0f224ed64fcf68873e163cfe63d8cc183f11b67f4ec915814d3e121bb70f575296d
7
+ data.tar.gz: 4178ca638dd4f4ede2977526c4edba39cb6ae21f9d7d0ba6cab55d47235556d9ea41bfc4353b2349a1085746af76825c84e5597deba5130d874150f8ae1f91ef
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.0.14 / 2026-06-10
4
+
5
+ ### Bug fixes:
6
+
7
+ * Preserve per-source cooldown when converging sources from the lockfile. Pull request [#9601](https://github.com/ruby/rubygems/pull/9601) by bryanwoods
8
+ * Don't exclude the locked version from cooldown during bundle update. Pull request [#9599](https://github.com/ruby/rubygems/pull/9599) by hsbt
9
+
3
10
  ## 4.0.13 / 2026-06-03
4
11
 
5
12
  ### Enhancements:
@@ -5,7 +5,7 @@ module Bundler
5
5
  module BuildMetadata
6
6
  # begin ivars
7
7
  @built_at = nil
8
- @git_commit_sha = "003f20f0dc".freeze
8
+ @git_commit_sha = "265babb801".freeze
9
9
  # end ivars
10
10
 
11
11
  # A hash representation of the build metadata.
@@ -437,11 +437,27 @@ module Bundler
437
437
  def cooldown_excluded?(spec)
438
438
  return false unless spec.respond_to?(:created_at) && spec.created_at
439
439
  return false unless spec.respond_to?(:remote) && spec.remote
440
+ return false if pinned_by_lockfile_floor?(spec)
440
441
  days = spec.remote.effective_cooldown
441
442
  return false if days.nil? || days <= 0
442
443
  (cooldown_now - spec.created_at) < (days * 86_400)
443
444
  end
444
445
 
446
+ # A spec sitting exactly at a `>= locked_version` prevent-downgrade floor is
447
+ # the version the lockfile currently pins. `bundle update` and `bundle
448
+ # outdated` install that floor so resolution never moves a gem backwards.
449
+ # Filtering it out for cooldown would then make resolution impossible
450
+ # whenever the locked version is itself inside the cooldown window, which is
451
+ # exactly what happens to a lockfile written before cooldown was enabled.
452
+ # Keep it eligible; gems being explicitly updated carry an exact `=`
453
+ # requirement instead and stay subject to the cooldown filter.
454
+ def pinned_by_lockfile_floor?(spec)
455
+ return false unless defined?(@base) && @base
456
+ requirement = base_requirements[spec.name]
457
+ return false unless requirement && !requirement.exact?
458
+ requirement.requirements.any? {|op, version| op == ">=" && version == spec.version }
459
+ end
460
+
445
461
  def cooldown_now
446
462
  @cooldown_now ||= Time.now
447
463
  end
@@ -11,7 +11,7 @@ module Bundler
11
11
  API_REQUEST_SIZE = 100
12
12
  REQUIRE_MUTEX = Mutex.new
13
13
 
14
- attr_accessor :remotes
14
+ attr_accessor :remotes, :remote_cooldowns
15
15
 
16
16
  def initialize(options = {})
17
17
  @options = options
@@ -169,6 +169,10 @@ module Bundler
169
169
  # locked sources never include credentials so always prefer remotes from the gemfile
170
170
  replacement_source.remotes = gemfile_source.remotes
171
171
 
172
+ # cooldowns are only ever declared in the Gemfile, so carry them over
173
+ # along with the remotes they apply to
174
+ replacement_source.remote_cooldowns = gemfile_source.remote_cooldowns
175
+
172
176
  yield replacement_source if block_given?
173
177
 
174
178
  replacement_source
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "4.0.13".freeze
4
+ VERSION = "4.0.14".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.13
4
+ version: 4.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Arko
@@ -402,7 +402,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
402
402
  - !ruby/object:Gem::Version
403
403
  version: 3.4.1
404
404
  requirements: []
405
- rubygems_version: 4.0.10
405
+ rubygems_version: 4.0.13
406
406
  specification_version: 4
407
407
  summary: The best way to manage your application's dependencies
408
408
  test_files: []