chore: drop Ruby 2.7 support#62
Open
erimicel wants to merge 1 commit intotypesense:masterfrom
Open
Conversation
Ruby 2.7 has been EOL since March 2023, and the CI matrix already only covers 3.0+. The gemspec was lagging behind reality, claiming 2.7 support while CI never tested it. - `typesense.gemspec`: bump `required_ruby_version` from `>= 2.7` to `>= 3.0`. The `# rubocop:disable Gemspec/RequiredRubyVersion` workaround is no longer needed once the floor matches the rubocop target. - `.rubocop.yml`: bump `TargetRubyVersion` to 3.0. - `spec/typesense/collections_spec.rb`: rubocop autocorrect from the newly-enabled `Style/HashExcept` cop (`Hash#except` was added in 3.0).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ruby 2.7 has been EOL since March 2023, and the CI matrix in
.github/workflows/tests.ymlonly covers 3.0, 3.2, 3.3, 3.4 — 2.7 hasn't been tested for some time. This PR makes the gemspec and rubocop config match what CI actually exercises.Changes
typesense.gemspec: bumprequired_ruby_versionfrom>= 2.7to>= 3.0. The# rubocop:disable Gemspec/RequiredRubyVersion, Lint/RedundantCopDisableDirectiveworkaround is no longer needed once the floor matches the rubocop target, so it's removed..rubocop.yml: bumpTargetRubyVersionfrom2.7to3.0.spec/typesense/collections_spec.rb: rubocop autocorrect from the newly-enabledStyle/HashExceptcop (Hash#exceptwas added in 3.0). One line changes fromreject { |key, _| key == 'num_documents' }to.except('num_documents').Compatibility note
This is a breaking change for anyone still installing the gem on Ruby 2.7. They will see a
Gem::RuntimeRequirementNotMetErrorfrom bundler. The workaround for those users is pinning to the previous gem version. Worth tagging this in the next release notes / a major version bump if prefer.Verification
bundle exec rubocop— 97 files inspected, no offenses detected.bundle exec rspec spec/typesense/collections_spec.rb:38(the touched example) — passes.PR Checklist