-
Notifications
You must be signed in to change notification settings - Fork 1
Y25-318 Publish sanger-jsonapi-resources gem from master #4
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
Conversation
…resource generators
…onsistent require statements
…version change to 0.2.0
stevieing
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand most of it so as long as it works I'm good.
1 issue to resolve with ruby versions.
| - '3.0' | ||
| - 3.1 | ||
| - 3.2 | ||
| - '3.3' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Traction Service is on ruby 3.4.4 so maybe worth adding ruby 3.4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good spot! Done 👍
Thanks for the review. Most of the changes are just to make things work with the current Rails and Ruby versions—updating the schema (ActiveRecord), tweaking the test_helper, and changing method which is no longer supported in Rails 8 (ActiveSupport::Deprecation.warn) |
Closes sanger/General-Backlog-Items#569
All Submissions:
This pull request creates a gem of version (0.2.0) from sanger-jsonapi-resources master branch (https://github.com/sanger/jsonapi-resources) ensuring compatibility with Rails version 7 and 8 and Ruby versions (3.3 and 3.2).
This pull request includes several updates to improve compatibility with newer Rails versions, simplify the codebase, and enhance testing and database configurations. The most notable changes involve introducing a compatibility helper for deprecation warnings, updating database configurations, and refining test setups. Below is a categorized summary of the most important changes:
Compatibility Enhancements:
Added
JSONAPI::CompatibilityHelpermodule to provide a version-safe method for issuing deprecation warnings across Rails versions. Updated all deprecation warnings inlib/jsonapifiles to use this helper instead ofActiveSupport::Deprecation.warn.Database Configuration Updates:
Updated
test/fixtures/active_record.rbto replacelengthwithlimitfor string columnsRef: (https://guides.rubyonrails.org/active_record_migrations.html#column-modifiers)
Added explicit
foreign_keydefinitions for references to improve database schema compatibility.Split
t.referencescalls into separate lines for clarity and added explicit indexing for composite keys.CI Workflow Updates:
.github/workflows/ruby.ymland updating Ruby and Rails version matrices to focus on newer versions.Test Setup Refinements:
test/test_helper.rbto silence deprecation warnings conditionally based on Rails version and updated fixture paths for compatibility.Codebase Simplifications:
Added
require 'rails/generators'tolib/generators/jsonapi/controller_generator.rbandlib/generators/jsonapi/resource_generator.rbfor better clarity and dependency management.Added a conditional check to skip processing in
find_related_polymorphic_fragmentsifrelation_positionisnil.