summaryrefslogtreecommitdiff
path: root/lib/bundler/lazy_specification.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2025-03-17 13:04:23 +0100
committerHiroshi SHIBATA <[email protected]>2025-03-24 13:25:07 +0900
commit5bff692346bda9f282acbe4236dc7ddabc0b90be (patch)
treeefceead1b67d1809a8aa28699ae6cd2eab2ef61b /lib/bundler/lazy_specification.rb
parent28943c2820b8f620b98a951c0ae1f821b0880a8e (diff)
[rubygems/rubygems] Refactor replacing locked specification path sources
Instead of doing an explicit pass, let sources be replaced while checking if specifications are up to date. https://github.com/rubygems/rubygems/commit/676271e804
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12968
Diffstat (limited to 'lib/bundler/lazy_specification.rb')
-rw-r--r--lib/bundler/lazy_specification.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/bundler/lazy_specification.rb b/lib/bundler/lazy_specification.rb
index 77c0563ac6..e617d32410 100644
--- a/lib/bundler/lazy_specification.rb
+++ b/lib/bundler/lazy_specification.rb
@@ -175,6 +175,14 @@ module Bundler
@force_ruby_platform = true
end
+ def replace_source_with!(gemfile_source)
+ return unless gemfile_source.can_lock?(self)
+
+ @source = gemfile_source
+
+ true
+ end
+
private
def use_exact_resolved_specifications?