[前][次][番号順一覧][スレッド一覧]

ruby-changes:67423

From: David <ko1@a...>
Date: Tue, 31 Aug 2021 19:07:10 +0900 (JST)
Subject: [ruby-changes:67423] b351cebab2 (master): [rubygems/rubygems] Simplify error message building in resolver

https://git.ruby-lang.org/ruby.git/commit/?id=b351cebab2

From b351cebab209217649ca2a607181709d61b9ffcc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Sat, 31 Jul 2021 13:33:08 +0200
Subject: [rubygems/rubygems] Simplify error message building in resolver

Since all requirements have an explicit source now (even if it's the
default source).

https://github.com/rubygems/rubygems/commit/2c341cfc22
---
 lib/bundler/resolver.rb | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb
index d19dc3e..2cfe25f 100644
--- a/lib/bundler/resolver.rb
+++ b/lib/bundler/resolver.rb
@@ -269,14 +269,12 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/resolver.rb#L269
             "Try running `bundle update #{name}`\n\n" \
             "If you are updating multiple gems in your Gemfile at once,\n" \
             "try passing them all to `bundle update`"
-        elsif source = @source_requirements[name]
+        else
+          source = source_for(name)
           specs = source.specs.search(name)
           versions_with_platforms = specs.map {|s| [s.version, s.platform] }
           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?
-        else
-          message = "Could not find gem '#{SharedHelpers.pretty_dependency(requirement)}' in any of the gem sources " \
-            "listed in your Gemfile#{cache_message}."
         end
         raise GemNotFound, message
       end
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]