Skip to content

Use Rubocop plugins, use Ruby 3.0 as minimum version everywhere #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 65 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ AllCops:
Exclude:
- vendor/**/*
TargetRubyVersion:
2.7
3.0

inherit_from: .rubocop_todo.yml

require:
plugins:
- rubocop-rake
- rubocop-rspec

Expand Down
9 changes: 1 addition & 8 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down