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

ruby-changes:69944

From: David <ko1@a...>
Date: Fri, 26 Nov 2021 08:51:08 +0900 (JST)
Subject: [ruby-changes:69944] f3320f164f (master): [rubygems/rubygems] Fix `bundle info` sometimes claiming that bundler has been deleted

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

From f3320f164fd4147256227271b89e02522a536093 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Thu, 25 Nov 2021 21:29:56 +0100
Subject: [rubygems/rubygems] Fix `bundle info` sometimes claiming that bundler
 has been deleted

https://github.com/rubygems/rubygems/commit/fe1a31db31
---
 lib/bundler/cli/info.rb            | 2 +-
 spec/bundler/commands/info_spec.rb | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/bundler/cli/info.rb b/lib/bundler/cli/info.rb
index 3afed89cebf..6ecc842b4c6 100644
--- a/lib/bundler/cli/info.rb
+++ b/lib/bundler/cli/info.rb
@@ -70,7 +70,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli/info.rb#L70
       gem_info << "\tPath: #{spec.full_gem_path}\n"
       gem_info << "\tDefault Gem: yes" if spec.respond_to?(:default_gem?) && spec.default_gem?
 
-      if spec.deleted_gem?
+      if name != "bundler" && spec.deleted_gem?
         return Bundler.ui.warn "The gem #{name} has been deleted. Gemspec information is still available though:\n#{gem_info}"
       end
 
diff --git a/spec/bundler/commands/info_spec.rb b/spec/bundler/commands/info_spec.rb
index 518f93511a3..dbfb800c4c7 100644
--- a/spec/bundler/commands/info_spec.rb
+++ b/spec/bundler/commands/info_spec.rb
@@ -50,6 +50,14 @@ RSpec.describe "bundle info" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/commands/info_spec.rb#L50
       expect(out).to eq(root.to_s)
     end
 
+    it "doesn't claim that bundler has been deleted, even if using a custom path without bundler there" do
+      bundle "config set --local path vendor/bundle"
+      bundle "install"
+      bundle "info bundler"
+      expect(out).to include("\tPath: #{root}")
+      expect(err).not_to match(/The gem bundler has been deleted/i)
+    end
+
     it "complains if gem not in bundle" do
       bundle "info missing", :raise_on_error => false
       expect(err).to eq("Could not find gem 'missing'.")
-- 
cgit v1.2.1


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

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