summaryrefslogtreecommitdiff
path: root/lib/bundler/cli/update.rb
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-11-11 23:58:40 +0100
committergit <svn-admin@ruby-lang.org>2021-12-03 20:00:50 +0900
commit248fae0ec43c2df6d9b545acc7f56bdfd5f89dec (patch)
tree1aaabdcb798992c18c1fa0fa5004fa99fb92416e /lib/bundler/cli/update.rb
parent7d974cc56fa0555beed0bf4f6fe34322cd24cd26 (diff)
[rubygems/rubygems] Improve sources representation
We have two representations of a source. Once used for sorting, which should not depend on the source's state, but solely on its static information, like remotes. Another one used for error and informational messages, which should properly inform about the exact state of the source when the message is printed. This commit makes the latter be the default implementation of `to_s`, so that error and informational messages are more accurate by default. https://github.com/rubygems/rubygems/commit/b5f2b88957
Diffstat (limited to 'lib/bundler/cli/update.rb')
-rw-r--r--lib/bundler/cli/update.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/cli/update.rb b/lib/bundler/cli/update.rb
index 1adcaef67c..95a8886ea5 100644
--- a/lib/bundler/cli/update.rb
+++ b/lib/bundler/cli/update.rb
@@ -66,7 +66,7 @@ module Bundler
if locked_gems = Bundler.definition.locked_gems
previous_locked_info = locked_gems.specs.reduce({}) do |h, s|
- h[s.name] = { :spec => s, :version => s.version, :source => s.source.to_s }
+ h[s.name] = { :spec => s, :version => s.version, :source => s.source.identifier }
h
end
end
@@ -95,7 +95,7 @@ module Bundler
end
locked_source = locked_info[:source]
- new_source = new_spec.source.to_s
+ new_source = new_spec.source.identifier
next if locked_source != new_source
new_version = new_spec.version