Skip to content

Commit

Permalink
[rubygems/rubygems] Lower verboseness of user-facing text for bundle gem
Browse files Browse the repository at this point in the history
  • Loading branch information
FTLam11 authored and hsbt committed Jun 18, 2020
1 parent fedd320 commit 091daaa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
11 changes: 4 additions & 7 deletions lib/bundler/cli/gem.rb
Expand Up @@ -239,8 +239,7 @@ def ask_and_set_test_framework
Bundler.ui.confirm "Do you want to generate tests with your gem?"
Bundler.ui.info hint_text("test")

result = Bundler.ui.ask "Enter a framework name to generate those test files now. " \
"rspec/minitest/test-unit/(none):"
result = Bundler.ui.ask "Enter a test framework. rspec/minitest/test-unit/(none):"
if result =~ /rspec|minitest|test-unit/
test_framework = result
else
Expand Down Expand Up @@ -268,18 +267,16 @@ def ask_and_set_ci
ci_template = options[:ci] || Bundler.settings["gem.ci"]

if ci_template.to_s.empty?
Bundler.ui.confirm "Do you want to set up automated testing for your gem? " \
"Continuous integration services make it easy to see if pull requests have passing tests " \
"before you merge them. Bundler supports these services:\n" \
Bundler.ui.confirm "Do you want to set up continuous integration for your gem? " \
"Supported services:\n" \
"* CircleCI: https://circleci.com/\n" \
"* GitHub Actions: https://github.com/features/actions\n" \
"* GitLab CI: https://docs.gitlab.com/ee/ci/\n" \
"* Travis CI: https://travis-ci.org/\n" \
"\n"
Bundler.ui.info hint_text("ci")

result = Bundler.ui.ask "Enter a service name to generate a CI configuration now. " \
"github/travis/gitlab/circle/(none):"
result = Bundler.ui.ask "Enter a CI service. github/travis/gitlab/circle/(none):"
if result =~ /github|travis|gitlab|circle/
ci_template = result
else
Expand Down
4 changes: 2 additions & 2 deletions spec/bundler/commands/newgem_spec.rb
Expand Up @@ -764,7 +764,7 @@ def create_temporary_dir(dir)
end

it "asks to setup CI" do
expect(out).to match("Do you want to set up automated testing for your gem?")
expect(out).to match("Do you want to set up continuous integration for your gem?")
end

it "hints that the choice will only be applied to the current gem" do
Expand All @@ -778,7 +778,7 @@ def create_temporary_dir(dir)
end

it "asks to setup CI" do
expect(out).to match("Do you want to set up automated testing for your gem?")
expect(out).to match("Do you want to set up continuous integration for your gem?")
end

it "hints that the choice will be applied to future bundle gem calls" do
Expand Down

0 comments on commit 091daaa

Please sign in to comment.