From f9de8ccf1e26c9774cd1ebdb587b8edbb08b4d7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 16 Jun 2020 12:29:57 +0200 Subject: Rename hidden templates Because they don't play nice with ruby-core's gitignore and cause issues with ruby-core integration. Also, because it's consistent with other templates such as `gitignore.tt`. --- lib/bundler/cli/gem.rb | 8 ++++---- lib/bundler/templates/newgem/.circleci/config.yml.tt | 13 ------------- .../templates/newgem/.github/workflows/main.yml.tt | 18 ------------------ lib/bundler/templates/newgem/.gitlab-ci.yml.tt | 9 --------- lib/bundler/templates/newgem/.travis.yml.tt | 6 ------ lib/bundler/templates/newgem/circleci/config.yml.tt | 13 +++++++++++++ .../templates/newgem/github/workflows/main.yml.tt | 18 ++++++++++++++++++ lib/bundler/templates/newgem/gitlab-ci.yml.tt | 9 +++++++++ lib/bundler/templates/newgem/travis.yml.tt | 6 ++++++ 9 files changed, 50 insertions(+), 50 deletions(-) delete mode 100644 lib/bundler/templates/newgem/.circleci/config.yml.tt delete mode 100644 lib/bundler/templates/newgem/.github/workflows/main.yml.tt delete mode 100644 lib/bundler/templates/newgem/.gitlab-ci.yml.tt delete mode 100644 lib/bundler/templates/newgem/.travis.yml.tt create mode 100644 lib/bundler/templates/newgem/circleci/config.yml.tt create mode 100644 lib/bundler/templates/newgem/github/workflows/main.yml.tt create mode 100644 lib/bundler/templates/newgem/gitlab-ci.yml.tt create mode 100644 lib/bundler/templates/newgem/travis.yml.tt (limited to 'lib') diff --git a/lib/bundler/cli/gem.rb b/lib/bundler/cli/gem.rb index 17a50ba697..5b0f5b3564 100644 --- a/lib/bundler/cli/gem.rb +++ b/lib/bundler/cli/gem.rb @@ -110,13 +110,13 @@ module Bundler config[:ci] = ask_and_set_ci case config[:ci] when "github" - templates.merge!(".github/workflows/main.yml.tt" => ".github/workflows/main.yml") + templates.merge!("github/workflows/main.yml.tt" => ".github/workflows/main.yml") when "travis" - templates.merge!(".travis.yml.tt" => ".travis.yml") + templates.merge!("travis.yml.tt" => ".travis.yml") when "gitlab" - templates.merge!(".gitlab-ci.yml.tt" => ".gitlab-ci.yml") + templates.merge!("gitlab-ci.yml.tt" => ".gitlab-ci.yml") when "circle" - templates.merge!(".circleci/config.yml.tt" => ".circleci/config.yml") + templates.merge!("circleci/config.yml.tt" => ".circleci/config.yml") end if ask_and_set(:mit, "Do you want to license your code permissively under the MIT license?", diff --git a/lib/bundler/templates/newgem/.circleci/config.yml.tt b/lib/bundler/templates/newgem/.circleci/config.yml.tt deleted file mode 100644 index 79fd0dcc0f..0000000000 --- a/lib/bundler/templates/newgem/.circleci/config.yml.tt +++ /dev/null @@ -1,13 +0,0 @@ -version: 2.1 -jobs: - build: - docker: - - image: ruby:<%= RUBY_VERSION %> - steps: - - checkout - - run: - name: Run the default task - command: | - gem install bundler -v <%= Bundler::VERSION %> - bundle install - bundle exec rake diff --git a/lib/bundler/templates/newgem/.github/workflows/main.yml.tt b/lib/bundler/templates/newgem/.github/workflows/main.yml.tt deleted file mode 100644 index 807c8dd79a..0000000000 --- a/lib/bundler/templates/newgem/.github/workflows/main.yml.tt +++ /dev/null @@ -1,18 +0,0 @@ -name: Ruby - -on: [push,pull_request] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: <%= RUBY_VERSION %> - - name: Run the default task - run: | - gem install bundler -v <%= Bundler::VERSION %> - bundle install - bundle exec rake diff --git a/lib/bundler/templates/newgem/.gitlab-ci.yml.tt b/lib/bundler/templates/newgem/.gitlab-ci.yml.tt deleted file mode 100644 index 0e71ff26a4..0000000000 --- a/lib/bundler/templates/newgem/.gitlab-ci.yml.tt +++ /dev/null @@ -1,9 +0,0 @@ -image: ruby:<%= RUBY_VERSION %> - -before_script: - - gem install bundler -v <%= Bundler::VERSION %> - - bundle install - -example_job: - script: - - bundle exec rake diff --git a/lib/bundler/templates/newgem/.travis.yml.tt b/lib/bundler/templates/newgem/.travis.yml.tt deleted file mode 100644 index eab16addca..0000000000 --- a/lib/bundler/templates/newgem/.travis.yml.tt +++ /dev/null @@ -1,6 +0,0 @@ ---- -language: ruby -cache: bundler -rvm: - - <%= RUBY_VERSION %> -before_install: gem install bundler -v <%= Bundler::VERSION %> diff --git a/lib/bundler/templates/newgem/circleci/config.yml.tt b/lib/bundler/templates/newgem/circleci/config.yml.tt new file mode 100644 index 0000000000..79fd0dcc0f --- /dev/null +++ b/lib/bundler/templates/newgem/circleci/config.yml.tt @@ -0,0 +1,13 @@ +version: 2.1 +jobs: + build: + docker: + - image: ruby:<%= RUBY_VERSION %> + steps: + - checkout + - run: + name: Run the default task + command: | + gem install bundler -v <%= Bundler::VERSION %> + bundle install + bundle exec rake diff --git a/lib/bundler/templates/newgem/github/workflows/main.yml.tt b/lib/bundler/templates/newgem/github/workflows/main.yml.tt new file mode 100644 index 0000000000..807c8dd79a --- /dev/null +++ b/lib/bundler/templates/newgem/github/workflows/main.yml.tt @@ -0,0 +1,18 @@ +name: Ruby + +on: [push,pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: <%= RUBY_VERSION %> + - name: Run the default task + run: | + gem install bundler -v <%= Bundler::VERSION %> + bundle install + bundle exec rake diff --git a/lib/bundler/templates/newgem/gitlab-ci.yml.tt b/lib/bundler/templates/newgem/gitlab-ci.yml.tt new file mode 100644 index 0000000000..0e71ff26a4 --- /dev/null +++ b/lib/bundler/templates/newgem/gitlab-ci.yml.tt @@ -0,0 +1,9 @@ +image: ruby:<%= RUBY_VERSION %> + +before_script: + - gem install bundler -v <%= Bundler::VERSION %> + - bundle install + +example_job: + script: + - bundle exec rake diff --git a/lib/bundler/templates/newgem/travis.yml.tt b/lib/bundler/templates/newgem/travis.yml.tt new file mode 100644 index 0000000000..eab16addca --- /dev/null +++ b/lib/bundler/templates/newgem/travis.yml.tt @@ -0,0 +1,6 @@ +--- +language: ruby +cache: bundler +rvm: + - <%= RUBY_VERSION %> +before_install: gem install bundler -v <%= Bundler::VERSION %> -- cgit v1.2.3