summaryrefslogtreecommitdiff
path: root/lib/bundler/resolver.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/resolver.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/resolver.rb')
-rw-r--r--lib/bundler/resolver.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb
index 56002ace60..5eb17a3921 100644
--- a/lib/bundler/resolver.rb
+++ b/lib/bundler/resolver.rb
@@ -270,7 +270,7 @@ module Bundler
rescue GemfileNotFound
nil
end
- message = String.new("Could not find gem '#{SharedHelpers.pretty_dependency(requirement)}' in #{source.to_err}#{cache_message}.\n")
+ message = String.new("Could not find gem '#{SharedHelpers.pretty_dependency(requirement)}' in #{source}#{cache_message}.\n")
message << "The source contains the following versions of '#{name}': #{formatted_versions_with_platforms(versions_with_platforms)}" if versions_with_platforms.any?
end
raise GemNotFound, message
@@ -369,7 +369,7 @@ module Bundler
o << if metadata_requirement
"is not available in #{relevant_source}"
else
- "in #{relevant_source.to_err}.\n"
+ "in #{relevant_source}.\n"
end
end
end,