diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6e82cda..cfd2c5e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.2 + ruby-version: 3.0 bundler-cache: true rubygems: latest @@ -26,13 +26,70 @@ jobs: name: test (ruby=${{ matrix.ruby }}, grape=${{ matrix.grape }}, grape-swagger=${{ matrix.grape_swagger}}, grape_entity=${{ matrix.grape_entity }}) strategy: matrix: - grape: [ '~> 2.0.0', 'head' ] - grape_swagger: [ '~> 2.0.3', 'head' ] - grape_entity: [ '~> 1.0.1', 'head' ] - ruby: [ '3.1', '3.4', 'head' ] - # Exclude combinations that are not supported. - exclude: - - { grape_swagger: '~> 2.0.3', grape: 'head' } + include: + # Ruby 3.1 combinations + - ruby: '3.0' + grape: '~> 2.0.0' + grape_swagger: '~> 2.0.3' + grape_entity: '~> 1.0.1' + - ruby: '3.0' + grape: '~> 2.0.0' + grape_swagger: '~> 2.1.1' + grape_entity: 'head' + + # Ruby 3.4 combinations + - ruby: '3.4' + grape: '~> 2.0.0' + grape_swagger: '~> 2.0.3' + grape_entity: '~> 1.0.1' + - ruby: '3.4' + grape: '~> 2.0.0' + grape_swagger: '~> 2.0.3' + grape_entity: 'head' + - ruby: '3.4' + grape: '~> 2.0.0' + grape_swagger: 'head' + grape_entity: '~> 1.0.1' + - ruby: '3.4' + grape: '~> 2.0.0' + grape_swagger: 'head' + grape_entity: 'head' + # - ruby: '3.4' + # grape: 'head' + # grape_swagger: 'head' + # grape_entity: '~> 1.0.1' + # - ruby: '3.4' + # grape: 'head' + # grape_swagger: 'head' + # grape_entity: 'head' + + # Ruby head combinations + - ruby: 'head' + grape: '~> 2.0.0' + grape_swagger: '~> 2.0.3' + grape_entity: '~> 1.0.1' + - ruby: 'head' + grape: '~> 2.0.0' + grape_swagger: '~> 2.0.3' + grape_entity: 'head' + - ruby: 'head' + grape: '~> 2.0.0' + grape_swagger: 'head' + grape_entity: '~> 1.0.1' + + # - ruby: 'head' + # grape: '~> 2.0.0' + # grape_swagger: 'head' + # grape_entity: 'head' + # - ruby: 'head' + # grape: 'head' + # grape_swagger: 'head' + # grape_entity: '~> 1.0.1' + # - ruby: 'head' + # grape: 'head' + # grape_swagger: 'head' + # grape_entity: 'head' + runs-on: ubuntu-latest env: GRAPE_VERSION: ${{ matrix.grape }} diff --git a/.rubocop.yml b/.rubocop.yml index 1f5d9a8..9795a74 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -3,11 +3,11 @@ AllCops: Exclude: - vendor/**/* TargetRubyVersion: - 2.7 + 3.0 inherit_from: .rubocop_todo.yml -require: +plugins: - rubocop-rake - rubocop-rspec diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 43dfee0..78d143c 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,18 +1,11 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2025-05-12 21:32:47 UTC using RuboCop version 1.75.5. +# on 2025-05-28 16:52:10 UTC using RuboCop version 1.75.8. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 1 -# Configuration parameters: Severity, Include. -# Include: **/*.gemspec -Gemspec/RequiredRubyVersion: - Exclude: - - 'grape-swagger-entity.gemspec' - # Offense count: 3 # Configuration parameters: AllowedMethods. # AllowedMethods: enums diff --git a/CHANGELOG.md b/CHANGELOG.md index d59e9ee..d85d98f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ #### Features * [#81](https://github.com/ruby-grape/grape-swagger-entity/pull/81): Make entity fields required by default - [@olivier-thatch](https://github.com/olivier-thatch). +* [#85](https://github.com/ruby-grape/grape-swagger-entity/pull/85): Use rubocop plugins, use ruby 3.0 as minimum version everywhere - [@olivier-thatch](https://github.com/olivier-thatch). * Your contribution here. #### Fixes diff --git a/Gemfile b/Gemfile index 26e7a71..c5c4b7e 100644 --- a/Gemfile +++ b/Gemfile @@ -34,9 +34,12 @@ group :development, :test do gem 'rake' gem 'rdoc' gem 'rspec' - gem 'rubocop' - gem 'rubocop-rake' - gem 'rubocop-rspec' +end + +group :development do + gem 'rubocop', '>= 1.72', require: false + gem 'rubocop-rake', '>= 0.7', require: false + gem 'rubocop-rspec', '>= 3.5.0', require: false end group :test do