From e5c684e181cafdb8520e44839dc2e543cd4b47f4 Mon Sep 17 00:00:00 2001 From: "Garen J. Torikian" Date: Thu, 17 Sep 2020 11:26:38 +0100 Subject: [PATCH] Tweak message to specify just "direct" gems This opens to possibility for mentioning "indirectly"/dependent gems looking for funding in the future. Also, remove "!" enthusiasm. --- bundler/lib/bundler/cli/common.rb | 2 +- bundler/lib/bundler/cli/fund.rb | 2 +- bundler/spec/commands/fund_spec.rb | 2 +- bundler/spec/install/gems/fund_spec.rb | 12 ++++++------ bundler/spec/update/gems/fund_spec.rb | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bundler/lib/bundler/cli/common.rb b/bundler/lib/bundler/cli/common.rb index 27bfc1330d50..8c2d476062ef 100644 --- a/bundler/lib/bundler/cli/common.rb +++ b/bundler/lib/bundler/cli/common.rb @@ -21,7 +21,7 @@ def self.output_fund_metadata_summary(gems_seeking_funding) return if direct_gems_seeking_funding.empty? count = direct_gems_seeking_funding.length - intro = count > 1 ? "#{count} gems you depend on are" : "#{count} gem you depend on is" + intro = count > 1 ? "#{count} gems you directly depend on are" : "#{count} gem you directly depend on is" message = "#{intro} looking for funding!\n Run `bundle fund` for details" Bundler.ui.info message end diff --git a/bundler/lib/bundler/cli/fund.rb b/bundler/lib/bundler/cli/fund.rb index 1e676a17088b..3d0ed8f9e565 100644 --- a/bundler/lib/bundler/cli/fund.rb +++ b/bundler/lib/bundler/cli/fund.rb @@ -27,7 +27,7 @@ def run end if fund_info.empty? - Bundler.ui.info "None of the gems you depend on are looking for funding!" + Bundler.ui.info "None of the gems you directly depend on are looking for funding." else Bundler.ui.info fund_info.join("\n") end diff --git a/bundler/spec/commands/fund_spec.rb b/bundler/spec/commands/fund_spec.rb index afa1c144ff06..7d549caa774e 100644 --- a/bundler/spec/commands/fund_spec.rb +++ b/bundler/spec/commands/fund_spec.rb @@ -36,7 +36,7 @@ bundle "fund" - expect(out).to include("None of the gems you depend on are looking for funding!") + expect(out).to include("None of the gems you directly depend on are looking for funding.") end describe "with --group option" do diff --git a/bundler/spec/install/gems/fund_spec.rb b/bundler/spec/install/gems/fund_spec.rb index 1b16c9dab933..1cf3e2344a5c 100644 --- a/bundler/spec/install/gems/fund_spec.rb +++ b/bundler/spec/install/gems/fund_spec.rb @@ -12,7 +12,7 @@ G bundle :install - expect(out).to include("2 gems you depend on are looking for funding!") + expect(out).to include("2 gems you directly depend on are looking for funding.") end it "should display the singular fund message after installing" do @@ -23,7 +23,7 @@ G bundle :install - expect(out).to include("1 gem you depend on is looking for funding!") + expect(out).to include("1 gem you directly depend on is looking for funding!") end end @@ -66,7 +66,7 @@ G bundle :install - expect(out).to include("1 gem you depend on is looking for funding") + expect(out).to include("1 gem you directly depend on is looking for funding") end it "should display the fund URI if repo is updated" do @@ -92,7 +92,7 @@ G bundle :install - expect(out).to include("1 gem you depend on is looking for funding") + expect(out).to include("1 gem you directly depend on is looking for funding") end it "should still display the fund URI if repo is not updated" do @@ -107,10 +107,10 @@ G bundle :install - expect(out).to include("1 gem you depend on is looking for funding") + expect(out).to include("1 gem you directly depend on is looking for funding") bundle :install - expect(out).to include("1 gem you depend on is looking for funding") + expect(out).to include("1 gem you directly depend on is looking for funding") end end end diff --git a/bundler/spec/update/gems/fund_spec.rb b/bundler/spec/update/gems/fund_spec.rb index 551b08e66639..1b0e4585960c 100644 --- a/bundler/spec/update/gems/fund_spec.rb +++ b/bundler/spec/update/gems/fund_spec.rb @@ -17,7 +17,7 @@ shared_examples "a fund message outputter" do it "should display fund message for updated gems" do - expect(out).to include("2 gems you depend on are looking for funding!") + expect(out).to include("2 gems you directly depend on are looking for funding.") end end