diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2021-11-11 23:58:40 +0100 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-12-03 20:00:50 +0900 |
commit | 248fae0ec43c2df6d9b545acc7f56bdfd5f89dec (patch) | |
tree | 1aaabdcb798992c18c1fa0fa5004fa99fb92416e /lib/bundler/source_list.rb | |
parent | 7d974cc56fa0555beed0bf4f6fe34322cd24cd26 (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/source_list.rb')
-rw-r--r-- | lib/bundler/source_list.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bundler/source_list.rb b/lib/bundler/source_list.rb index ba356d40ad..a4773397c7 100644 --- a/lib/bundler/source_list.rb +++ b/lib/bundler/source_list.rb @@ -106,14 +106,14 @@ module Bundler end def lock_other_sources - (path_sources + git_sources + plugin_sources).sort_by(&:to_s) + (path_sources + git_sources + plugin_sources).sort_by(&:identifier) end def lock_rubygems_sources if merged_gem_lockfile_sections? [combine_rubygems_sources] else - rubygems_sources.sort_by(&:to_s) + rubygems_sources.sort_by(&:identifier) end end @@ -211,7 +211,7 @@ module Bundler end def equivalent_sources?(lock_sources, replacement_sources) - lock_sources.sort_by(&:to_s) == replacement_sources.sort_by(&:to_s) + lock_sources.sort_by(&:identifier) == replacement_sources.sort_by(&:identifier) end def equivalent_source?(source, other_source) |