You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`Source::Rubygems#specs` merges `installed_specs` on top of
`remote_specs`, so a `Bundler::StubSpecification` for an already-installed
gem overwrites the matching `EndpointSpecification` and erases its
`created_at`. The cooldown filter then short-circuited on
`spec.respond_to?(:created_at)` and let the local stub through, which
made `bundle install --cooldown N` keep selecting a brand-new version
that happened to be on disk already.
Snapshot the remote `created_at` per `[name, version]` before merging
and back-fill it onto stubs that lack one, attaching the source's first
remote so `effective_cooldown` is reachable. The filter now runs ahead
of `filter_remote_specs` and rejects every spec that shares an
`[name, version]` flagged by `cooldown_excluded?`, so a stub and the
endpoint that carries its date drop together. `RemoteSpecification`
gains `attr_accessor :created_at` so any subclass without an explicit
setter participates.
`spec/bundler/resolver/cooldown_spec.rb` gets `name`/`version` on the
shared spec helper, plus dedicated coverage for the version-grouped
exclusion and stub-only fallback. `spec/install/cooldown_spec.rb` adds
two end-to-end cases that pre-install `ripe_gem-2.0.0` and verify the
in-cooldown copy is excluded while `--cooldown 0` continues to bypass
the filter.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments