Skip to content

Commit

Permalink
Tweak message to specify just "direct" gems
Browse files Browse the repository at this point in the history
This opens to possibility for mentioning "indirectly"/dependent gems
looking for funding in the future. Also, remove "!" enthusiasm.
  • Loading branch information
gjtorikian committed Sep 17, 2020
1 parent 1ddf6f2 commit 5f586f1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions bundler/lib/bundler/cli/common.rb
Expand Up @@ -21,8 +21,8 @@ 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"
message = "#{intro} looking for funding!\n Run `bundle fund` for details"
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

Expand Down
2 changes: 1 addition & 1 deletion bundler/lib/bundler/cli/fund.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bundler/spec/commands/fund_spec.rb
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions bundler/spec/install/gems/fund_spec.rb
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bundler/spec/update/gems/fund_spec.rb
Expand Up @@ -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

Expand Down

0 comments on commit 5f586f1

Please sign in to comment.