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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

olivier-thatch
Copy link

Just a bit of cleanup:

  • use Rubocop's plugin system instead of require to silence a warning with recent Rubocop versions
    • I added version constraints to ensure the various Rubocop gems are all compatible with the new plugin system
  • use 3.0 as the target Rubocop version instead of 2.7
  • run Rubocop with Ruby 3.0 instead of 3.2 in CI
  • use Ruby 3.0 instead of 3.1 as the oldest version in CI

This is consistent with 3.0 being the minimum required version in the gemspec.

@numbata numbata assigned numbata and unassigned numbata May 9, 2025
@numbata numbata self-requested a review May 9, 2025 12:18
@grape-bot
Copy link

1 Warning
⚠️ Unless you're refactoring existing code or improving documentation, please update CHANGELOG.md.

Here's an example of a CHANGELOG.md entry:

* [#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).

Generated by 🚫 Danger

Comment on lines 29 to 35
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' }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's unwrap this! For example:

        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'

This will allow us to skip, for example, (ruby=3.0, grape=head, grape-swagger=head, grape_entity=head) combination where grape-swagger-2.1.2 requires ruby version >= 3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants