Skip to content

Commit

Permalink
[rubygems/rubygems] Incorporate naming/grammar suggestions from olleo…
Browse files Browse the repository at this point in the history
  • Loading branch information
FTLam11 authored and hsbt committed Jun 18, 2020
1 parent e6479ac commit 52a9007
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/bundler/cli.rb
Expand Up @@ -575,7 +575,7 @@ def viz
method_option :rubocop, :type => :boolean, :desc => "Add rubocop to the generated Rakefile and gemspec. Set a default with `bundle config set gem.rubocop true`."
method_option :test, :type => :string, :lazy_default => Bundler.settings["gem.test"] || "", :aliases => "-t", :banner => "Use the specified test framework for your library",
:desc => "Generate a test directory for your library, either rspec, minitest or test-unit. Set a default with `bundle config set gem.test rspec`."
method_option :ci, :type => :string, :desc => "Generate CI configuration, either Github Actions, Travis CI, Gitlab CI or Circle CI. Set a default with `bundle config set gem.ci (github|travis|gitlab|circle)`"
method_option :ci, :type => :string, :desc => "Generate CI configuration, either GitHub Actions, Travis CI, GitLab CI or CircleCI. Set a default with `bundle config set gem.ci (github|travis|gitlab|circle)`"
def gem(name)
end

Expand Down
8 changes: 4 additions & 4 deletions lib/bundler/cli/gem.rb
Expand Up @@ -263,10 +263,10 @@ def ask_and_set_ci
if ci_template.nil?
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:"\
"* Circle CI: https://circleci.com/\n" \
"* Github Actions: https://github.com/features/actions\n" \
"* Gitlab CI: https://docs.gitlab.com/ee/ci/\n" \
"before you merge them. Bundler supports these services:" \
"* 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"

Expand Down
18 changes: 9 additions & 9 deletions spec/bundler/commands/newgem_spec.rb
Expand Up @@ -663,39 +663,39 @@ def create_temporary_dir(dir)
end

context "--ci set to github" do
it "generates a Github Actions config file" do
it "generates a GitHub Actions config file" do
bundle "gem #{gem_name} --ci=github"

expect(bundled_app("#{gem_name}/.github/workflows/main.yml")).to exist
end
end

context "--ci set to gitlab" do
it "generates a Gitlab Ci config file" do
it "generates a GitLab CI config file" do
bundle "gem #{gem_name} --ci=gitlab"

expect(bundled_app("#{gem_name}/.gitlab-ci.yml")).to exist
end
end

context "--ci set to circle" do
it "generates a Circle Ci config file" do
it "generates a CircleCI config file" do
bundle "gem #{gem_name} --ci=circle"

expect(bundled_app("#{gem_name}/.circleci/config.yml")).to exist
end
end

context "--ci set to travis" do
it "generates a Travis Ci config file" do
it "generates a Travis CI config file" do
bundle "gem #{gem_name} --ci=travis"

expect(bundled_app("#{gem_name}/.travis.yml")).to exist
end
end

context "gem.ci setting set to none" do
it "doesnt generate any CI config" do
it "doesn't generate any CI config" do
expect(bundled_app("#{gem_name}/.github/workflows/main.yml")).to_not exist
expect(bundled_app("#{gem_name}/.travis.yml")).to_not exist
expect(bundled_app("#{gem_name}/.gitlab-ci.yml")).to_not exist
Expand All @@ -704,7 +704,7 @@ def create_temporary_dir(dir)
end

context "gem.ci setting set to github" do
it "generates a Github Actions config file" do
it "generates a GitHub Actions config file" do
bundle "config set gem.ci github"
bundle "gem #{gem_name}"

Expand All @@ -713,7 +713,7 @@ def create_temporary_dir(dir)
end

context "gem.ci setting set to travis" do
it "generates a Travis config file" do
it "generates a Travis CI config file" do
bundle "config set gem.ci travis"
bundle "gem #{gem_name}"

Expand All @@ -722,15 +722,15 @@ def create_temporary_dir(dir)
end

context "gem.ci setting set to gitlab" do
it "generates a Gitlab config file" do
it "generates a GitLab CI config file" do
bundle "config set gem.ci gitlab"
bundle "gem #{gem_name}"

expect(bundled_app("#{gem_name}/.gitlab-ci.yml")).to exist
end
end

context "gem.ci setting set to circleci" do
context "gem.ci setting set to circle" do
it "generates a CircleCI config file" do
bundle "config set gem.ci circle"
bundle "gem #{gem_name}"
Expand Down

0 comments on commit 52a9007

Please sign in to comment.