Skip to content
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

Centralize Ruby Version to .ruby-version #218

Merged
merged 3 commits into from
Mar 28, 2024
Merged

Conversation

george-ma
Copy link
Contributor

@george-ma george-ma commented Mar 27, 2024

The .ruby-version file is the ecosystem standard for defining a Ruby version. This PR adds the .ruby-version file, ensures a required_ruby_version is set, and removes all other references to Ruby in this repository, aligning it with the standard.

Important

Please verify the following before merging:

Verify that the changes in the PR meets the following requirements or adjust manually to make it compliant:

  • .ruby-version file is present with the correct Ruby version defined
  • A required_ruby_version in your gemspec is set
  • There is no Ruby version present in the dev.yml Ruby task (before: - ruby: x.x.x, after: - ruby)
  • There is no Ruby version/requirement referenced in the Gemfile (no lines with ruby <some-version>)
  • A Gemfile.lock is built with the defined Ruby version
  • The version of Rubocop installed is 1.61.0 or greater
  • There is no TargetRubyVersion defined in rubocop.yml (reads from required_ruby_version on Rubocop 1.61.0)
  • There is no Ruby argument present in ruby/setup-ruby Github Actions that do not run on a Ruby matrix (no lines with ruby-version: “x.x”)

To establish consistency, the required_ruby_versionis set to 3.0. If you think that another version is a better fit, please make the applicable changes.

Please merge this PR if it looks good, this PR will be merged if there isn't any activity after 4 weeks.

The `.ruby-version` file is the ecosystem standard for defining a Ruby version.  This PR adds the `.ruby-version` file, ensures a `required_ruby_version` is set, and removes all other references to Ruby in this repository, aligning it with the standard.
> [!IMPORTANT]
> Please verify the following before merging:

Verify that the changes in the PR meets the following requirements or adjust manually to make it compliant:
  - [ ] `.ruby-version` file is present with the correct Ruby version defined
  - [ ] A `required_ruby_version` in your gemspec is set
  - [ ] There is no Ruby version present in the  `dev.yml` Ruby task (before: `- ruby: x.x.x`, after: `- ruby`)
  - [ ] There is no Ruby version/requirement referenced in the `Gemfile` (no lines with `ruby  <some-version>`)
  - [ ] A `Gemfile.lock` is built with the defined Ruby version
  - [ ] The version of Rubocop installed is 1.61.0 or greater
  - [ ] There is no `TargetRubyVersion` defined  in `rubocop.yml` (reads from  `required_ruby_version` on Rubocop 1.61.0)
  - [ ] There is no Ruby argument  present in  `ruby/setup-ruby` Github Actions that do **not**  run on a Ruby matrix (no lines with `ruby-version: “x.x”`)

To establish consistency, the `required_ruby_version`is set to 3.0. If you think that another version is a better fit, please make the applicable changes.

Please merge this PR if it looks good, this PR will be merged if there isn't any activity after 4 weeks.
We need Rubocop to be bumped so that we have the [#12645](rubocop/rubocop#12645)
patch of Rubocop 1.61.0. https://github.com/rubocop/rubocop/releases/tag/v1.61.0

Also run the rubocop autocorrecter
@george-ma george-ma requested a review from a team as a code owner March 27, 2024 15:02
@george-ma
Copy link
Contributor Author

Note: I saw one additional mention of TargetRubyVersion here: https://github.com/Shopify/rubocop-sorbet/blob/main/config/rbi.yml which may or not be needed?

@Morriar
Copy link
Contributor

Morriar commented Mar 27, 2024

Note: I saw one additional mention of TargetRubyVersion here: https://github.com/Shopify/rubocop-sorbet/blob/main/config/rbi.yml which may or not be needed?

I think we can remove it as well 👍

@george-ma george-ma changed the title Centralize ruby version Centralize Ruby Version .ruby-version Mar 28, 2024
@george-ma george-ma changed the title Centralize Ruby Version .ruby-version Centralize Ruby Version to .ruby-version Mar 28, 2024
@george-ma george-ma merged commit d5f72a2 into main Mar 28, 2024
11 checks passed
@george-ma george-ma deleted the centralize_ruby_version branch March 28, 2024 14:17
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.

None yet

2 participants