-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: master
Are you sure you want to change the base?
Conversation
…resource generators
…onsistent require statements
…version change to 0.2.0
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 👍
|
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:
JSONAPI::CompatibilityHelper
module to provide a version-safe method for issuing deprecation warnings across Rails versions. Updated all deprecation warnings inlib/jsonapi
files to use this helper instead ofActiveSupport::Deprecation.warn
.Database Configuration Updates:
test/fixtures/active_record.rb
to replacelength
withlimit
for string columns and added explicitforeign_key
definitions for references to improve database schema compatibility.t.references
calls into separate lines for clarity and added explicit indexing for composite keys.CI Workflow Updates:
.github/workflows/ruby.yml
and updating Ruby and Rails version matrices to focus on newer versions.Test Setup Refinements:
test/test_helper.rb
to silence deprecation warnings conditionally based on Rails version and updated fixture paths for compatibility.Codebase Simplifications:
require 'rails/generators'
tolib/generators/jsonapi/controller_generator.rb
andlib/generators/jsonapi/resource_generator.rb
for better clarity and dependency management.find_related_polymorphic_fragments
ifrelation_position
isnil
.