From aa6caf523139e151539ac4e4f3c786e5275005be Mon Sep 17 00:00:00 2001 From: Olivier Bellone Date: Thu, 8 May 2025 15:34:06 -0700 Subject: [PATCH 1/7] Use Rubocop plugins, use Ruby 3.0 as minimum version everywhere --- .github/workflows/test.yml | 4 ++-- .rubocop.yml | 4 ++-- .rubocop_todo.yml | 9 +-------- Gemfile | 9 ++++++--- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6e82cda..90ff65b 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 @@ -29,7 +29,7 @@ jobs: grape: [ '~> 2.0.0', 'head' ] grape_swagger: [ '~> 2.0.3', 'head' ] grape_entity: [ '~> 1.0.1', 'head' ] - ruby: [ '3.1', '3.4', 'head' ] + ruby: [ '3.0', '3.4', 'head' ] # Exclude combinations that are not supported. exclude: - { grape_swagger: '~> 2.0.3', grape: 'head' } 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/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 From e710a8a6aec0cb0d109ba80c081fd7ab1919cc36 Mon Sep 17 00:00:00 2001 From: Andrei Subbota Date: Tue, 29 Jul 2025 22:14:37 +0200 Subject: [PATCH 2/7] Unwrap testing combinations --- .github/workflows/test.yml | 66 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 90ff65b..5671da9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,9 +30,69 @@ jobs: grape_swagger: [ '~> 2.0.3', 'head' ] grape_entity: [ '~> 1.0.1', 'head' ] ruby: [ '3.0', '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 }} From ccf85c525fdb669ac4d4ac58f5ce47c9b2e50ce8 Mon Sep 17 00:00:00 2001 From: Andrei Subbota Date: Tue, 29 Jul 2025 22:19:31 +0200 Subject: [PATCH 3/7] Reduce amount of tested environments --- .github/workflows/test.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5671da9..a03ade4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,10 +26,6 @@ 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.0', '3.4', 'head' ] include: # Ruby 3.1 combinations - ruby: '3.0' From 8782fd9c4202eaca6c3e6907f0e5ba0860af7bca Mon Sep 17 00:00:00 2001 From: Andrei Subbota Date: Tue, 29 Jul 2025 22:25:01 +0200 Subject: [PATCH 4/7] Reduce amount of tested environments --- .github/workflows/test.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a03ade4..0ea7a8b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,14 +80,15 @@ jobs: 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' + + # - 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: From 7cea7c53c25e7c73f6da9f339d5682ec8b2fb760 Mon Sep 17 00:00:00 2001 From: Andrei Subbota Date: Tue, 29 Jul 2025 22:27:11 +0200 Subject: [PATCH 5/7] Reduce amount of tested environments --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0ea7a8b..ffdb9ad 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,11 +76,11 @@ jobs: 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: '~> 2.0.0' + # grape_swagger: 'head' + # grape_entity: 'head' # - ruby: 'head' # grape: 'head' # grape_swagger: 'head' From 91bd255a27d918c838c847f46bebb0fdbd865ff7 Mon Sep 17 00:00:00 2001 From: Andrei Subbota Date: Tue, 29 Jul 2025 22:35:09 +0200 Subject: [PATCH 6/7] Reduce amount of tested environments --- .github/workflows/test.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ffdb9ad..cfd2c5e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -54,14 +54,14 @@ jobs: 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: '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' From f9499f53ec2d7e6bc856ef95493b89d8e419201c Mon Sep 17 00:00:00 2001 From: Andrei Subbota Date: Tue, 29 Jul 2025 22:37:58 +0200 Subject: [PATCH 7/7] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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