From 1df2035c8077e41b3bd9bc5cb0c4e7f906b980f7 Mon Sep 17 00:00:00 2001 From: Junichi Sato <22004610+sato11@users.noreply.github.com> Date: Tue, 17 Jan 2023 19:48:09 +0900 Subject: [PATCH] chore: `bundle install` with `--with` option is dispensable in this case The setup script and the ci workflow definition specify that bundler should use `--with development` option, which has been deprecated as of newer version of bundler. While the intention apparently is to restrict installed gems to development group, it makes no difference to the resulting installation set. This is because we cannot rely on `--with` to opt out from installing grouped gems. What we might want to use is either `--without` option or `group :test, optional: true`. A relevant reference is here: https://bundler.io/guides/groups.html#optional-groups-and-bundlewith The discussion above in turn shows that `gem 'simplecov'` does not need to reside in test group, as it's been, and will be, installed regardless of the presence of `--with`. Therefore it's got rid of as well. --- .github/workflows/test-and-deploy.yml | 2 +- Gemfile | 2 +- Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index 01a1ae3a7..1a398954f 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -35,7 +35,7 @@ jobs: run: bundle add rubocop --version "~> 1.24.1" --group "development" --skip-install if: ${{ matrix.ruby != '2.4' }} - - run: bundle install --with development + - run: bundle install - run: bundle exec rake install - name: Run linter diff --git a/Gemfile b/Gemfile index 93f770641..16b620eb3 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,3 @@ source 'https://rubygems.org' -gem 'simplecov', require: false, group: :test +gem 'simplecov', require: false gemspec diff --git a/Makefile b/Makefile index 09a071c3a..80fc7b2cc 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ githooks: ln -sf ../../githooks/pre-commit .git/hooks/pre-commit install: - bundle install --with development; bundle exec rake install + bundle install; bundle exec rake install test: bundle exec rake spec