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

Introduction of Ruby 3.1+ Support and Pre-commit Configuration #293

Merged
merged 5 commits into from
Apr 3, 2024

Conversation

delano
Copy link
Collaborator

@delano delano commented Apr 3, 2024

This update introduces significant changes aimed at modernizing the codebase and enhancing code quality. The primary enhancement is the transition to Ruby 3.1+, indicated by the update in the README.md and Gemfile, where the Ruby version is explicitly set to '3.2.0'. This shift signifies a major update in the project's underlying technology, moving away from the previously supported Ruby versions up to 2.6.6.

More detail

Alongside the Ruby upgrade, the Gemfile has been simplified by removing version constraints on dependencies. This change suggests a move towards leveraging the latest versions of these gems, which could bring in improvements and new features from the gem updates. The introduction of the 'bundler-graph' plugin in the Gemfile is a minor but notable addition for visualizing the project's gem dependencies.

A significant new addition is the .pre-commit-config.yaml file, which introduces a pre-commit framework to the project. This framework is designed to improve code quality and consistency by automatically running checks before commits are finalized. The configuration includes hooks for trailing whitespace, end-of-file fixers, YAML syntax checks, private key detection, and more. This setup indicates a proactive approach to maintaining code quality and security.

The README.md file has been updated to reflect the new Ruby version support and removes detailed installation instructions, which are marked as "to be determined" (tbd). This change suggests an ongoing transition and adaptation to the new Ruby version's requirements.

In the Dockerfile, the base image has been updated from Ruby 2.6 to Ruby 3.1, aligning with the project's move to Ruby 3.1+ support. This change is crucial for ensuring that the Docker environment matches the project's updated Ruby version requirements.

Lastly, the deletion of migration files indicates a cleanup or restructuring of the database migration strategy. This could be part of the project's efforts to streamline or update its database schema management in line with the other updates.

This commit adds a new file, `.pre-commit-config.yaml`, which contains the configuration for pre-commit hooks. The hooks include checks for trailing whitespace, end-of-file fixes, YAML syntax, detection of private keys, mixed line endings, large file additions, no commits to specific branches, merge conflict checks, and submodule forbiddance. Additionally, the commit adds the black hook for Python code formatting and the add-msg-issue-prefix hook for linking commits to GitHub issues.
Remove version locks from Gemfile to allow resolving latest versions.

This upgrades the app to use current Ruby and Gem versions for improved security, performance, and stability.
Ruby 3.1+ support and preping for updated installation instructions
Copy link

van bot commented Apr 3, 2024

Questions to better understand the PR:

  1. The PR removes several migration files (e.g. 2011-11-17-metadata.rb, 2011-12-03-pre-beta.rb). Are these migrations no longer needed after upgrading to Ruby 3.2?

  2. The PR adds a pre-commit configuration file (.pre-commit-config.yaml) with several hooks. Which of these pre-commit checks do you think will be most valuable for the project?
    a) Trailing whitespace and end-of-file fixes
    b) Checks for private keys and large files
    c) Preventing commits to specific branches
    d) Linking commits to GitHub issues

  3. The README mentions this is an alpha branch to introduce Ruby 3.1+ support. What additional testing or changes do you anticipate will be needed before this Ruby upgrade is ready for an official release?

Please respond to the questions above in the following format:

/answer

  1. ...
  2. ...
    ...

@delano delano self-assigned this Apr 3, 2024
@delano delano added dependencies Pull requests that update a dependency file security ruby Pull requests that update Ruby code documentation tech debt labels Apr 3, 2024
@delano delano changed the title Update README for v0.13.0-alpha Introduction of Ruby 3.1+ Support and Pre-commit Configuration Apr 3, 2024
Repository owner deleted a comment from van bot Apr 3, 2024
@delano
Copy link
Collaborator Author

delano commented Apr 3, 2024

/answer

  1. Yep, that's right. The migrate scripts are only written (and run) when code changes affect how information is stored in existing Redis databases. Fresh installs don't need the scripts since they're already starting with the latest code.
  2. The most important part is establishing a baseline for code quality and consistency. It makes the project easy to maintain and also more welcoming for new contributions.
  3. This is only the first of many branches. At various points the develop branch will not run, especially these first few. The README will continue to be updated as we get closer to a release ready version.

@delano delano marked this pull request as ready for review April 3, 2024 03:33
@delano delano merged commit 557d2d5 into develop Apr 3, 2024
@delano delano deleted the delano/267-ruby-3 branch April 3, 2024 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation ruby Pull requests that update Ruby code security tech debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant