diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index bc25b08..2e6af02 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -19,14 +19,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ruby-version: ['2.7', '3.1'] + ruby-version: ['3.1', '3.2', '3.3'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Run tests - run: bundle exec rake + run: script/test diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b80d4f..23c40f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # CHANGELOG +## Unreleased +* Minimum supported Ruby version is now 3.1 + ## 0.2.1 * Fix Windows paths [#31](https://github.com/testdouble/good-migrations/pull/31) diff --git a/Gemfile.lock b/Gemfile.lock index b67beb4..8aa0f96 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -39,6 +39,9 @@ GEM erubi (1.10.0) i18n (1.10.0) concurrent-ruby (~> 1.0) + json (2.8.2) + language_server-protocol (3.17.0.3) + lint_roller (1.1.0) loofah (2.16.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -48,9 +51,10 @@ GEM nokogiri (1.13.4) mini_portile2 (~> 2.8.0) racc (~> 1.4) - parallel (1.22.1) - parser (3.1.2.0) + parallel (1.26.3) + parser (3.3.6.0) ast (~> 2.4.1) + racc pry (0.14.1) coderay (~> 1.1) method_source (~> 1.0) @@ -72,30 +76,39 @@ GEM zeitwerk (~> 2.5) rainbow (3.1.1) rake (13.0.6) - regexp_parser (2.3.0) - rexml (3.2.5) - rubocop (1.27.0) + regexp_parser (2.9.2) + rubocop (1.68.0) + json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.1.0.0) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.16.0, < 2.0) + regexp_parser (>= 2.4, < 3.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.17.0) - parser (>= 3.1.1.0) - rubocop-performance (1.13.3) - rubocop (>= 1.7.0, < 2.0) - rubocop-ast (>= 0.4.0) - ruby-progressbar (1.11.0) - standard (1.10.0) - rubocop (= 1.27.0) - rubocop-performance (= 1.13.3) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.36.1) + parser (>= 3.3.1.0) + rubocop-performance (1.22.1) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.31.1, < 2.0) + ruby-progressbar (1.13.0) + standard (1.42.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.0) + rubocop (~> 1.68.0) + standard-custom (~> 1.0.0) + standard-performance (~> 1.5) + standard-custom (1.0.2) + lint_roller (~> 1.0) + rubocop (~> 1.50) + standard-performance (1.5.0) + lint_roller (~> 1.1) + rubocop-performance (~> 1.22.0) thor (1.2.1) tzinfo (2.0.4) concurrent-ruby (~> 1.0) - unicode-display_width (2.1.0) + unicode-display_width (2.6.0) zeitwerk (2.5.4) PLATFORMS diff --git a/example/Gemfile b/example/Gemfile index d407444..4cc3371 100644 --- a/example/Gemfile +++ b/example/Gemfile @@ -4,8 +4,8 @@ gem "rails", "~> 6.1" gem "good_migrations", path: ".." -gem "sqlite3" +gem "sqlite3", "~> 1.7.3" -gem "zeitwerk", github: "fxn/zeitwerk" +gem "zeitwerk", "~> 2.6" gem "bootsnap", require: false diff --git a/good_migrations.gemspec b/good_migrations.gemspec index 66e5abe..ed60baa 100644 --- a/good_migrations.gemspec +++ b/good_migrations.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |spec| spec.description = "Referencing code in app/ from a database migration risks breaking the migration when your app code changes; this gem prevents that mistake" spec.homepage = "https://github.com/testdouble/good-migrations" spec.license = "MIT" - spec.required_ruby_version = ">= 2.3.0" + spec.required_ruby_version = ">= 3.1.0" spec.metadata["rubygems_mfa_required"] = "true" spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } diff --git a/script/test b/script/test new file mode 100755 index 0000000..fd801fc --- /dev/null +++ b/script/test @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -euo pipefail + +echo "---> Installing dependencies in example app" +cd example +bundle +cd .. + +echo "---> Running tests" +bundle exec rake + +echo "---> Job's done!"