summaryrefslogtreecommitdiff
path: root/lib/bundler/lazy_specification.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2025-02-03 18:32:40 +0100
committerHiroshi SHIBATA <[email protected]>2025-02-13 09:37:50 +0900
commit5adbad731b3354e2cdf1befa0ec719f3609678dc (patch)
treea5e55767bb6229533cdc4831bc3185523fbd0e44 /lib/bundler/lazy_specification.rb
parent06e3943c38b83d6784d9d9be6d5f389a862a3f7d (diff)
[rubygems/rubygems] Move logic to materialize gems for cache to a new method
And make the current `materialize_strictly` private. https://github.com/rubygems/rubygems/commit/3fc2129147
Diffstat (limited to 'lib/bundler/lazy_specification.rb')
-rw-r--r--lib/bundler/lazy_specification.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb
index 9511f26d15..479736094f 100644
--- a/lib/bundler/lazy_specification.rb
+++ b/lib/bundler/lazy_specification.rb
@@ -121,10 +121,10 @@ module Bundler
out
end
- def materialize_strictly
- materialize(self) do |matching_specs|
- choose_compatible(matching_specs)
- end
+ def materialize_for_cache
+ source.remote!
+
+ materialize_strictly
end
def materialized_for_installation
@@ -185,6 +185,12 @@ module Bundler
(most_specific_locked_platform != generic_platform) || force_ruby_platform || Bundler.settings[:force_ruby_platform]
end
+ def materialize_strictly
+ materialize(self) do |matching_specs|
+ choose_compatible(matching_specs)
+ end
+ end
+
def materialize(query)
matching_specs = source.specs.search(query)
return self if matching_specs.empty?