forked from cerebris/jsonapi-resources
-
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
Open
seenanair
wants to merge
11
commits into
master
Choose a base branch
from
y25-318-from-master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+99
−95
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
4a9e54d
Refactor database schema definitions for clarity and consistency
seenanair dea548e
Update Gemfile to simplify SQLite3 version handling
seenanair ff8bc72
Add missing require statement for Rails generators in controller and …
seenanair e83a160
Add JSONAPI::CompatibilityHelper module for version-safe deprecation …
seenanair 0eb11bc
Refactor deprecation warnings to use CompatibilityHelper and ensure c…
seenanair 652fdb5
Add nil check for relation_position to prevent processing errors
seenanair 45328e3
Update test_helper.rb to improve deprecation handling and unify fixtu…
seenanair 35aef58
Refactor CI configuration to simplify Ruby and Rails versions
seenanair a7f21c4
Update gemspec and version to reflect Sanger Institute ownership and …
seenanair d999a78
Add wrapper file for sanger-jsonapi-resources to ensure compatibility…
seenanair 3100a4b
Add Ruby 3.4 to CI matrix for testing compatibility
seenanair File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# frozen_string_literal: true | ||
|
||
# JSONAPI::CompatibilityHelper | ||
# | ||
# This module provides a version-safe method for issuing deprecation warnings | ||
# that works across multiple versions of Rails (7.x, 8.x, etc). | ||
# | ||
# Usage: | ||
# JSONAPI::CompatibilityHelper.deprecation_warn("Your deprecation message") | ||
# | ||
# The method will use the public `warn` method if available, otherwise it will | ||
# use `send(:warn, ...)` to maintain compatibility with Rails 8+ where `warn` | ||
# is private. | ||
# | ||
# Example: | ||
# JSONAPI::CompatibilityHelper.deprecation_warn("This feature is deprecated.") | ||
|
||
module JSONAPI | ||
module CompatibilityHelper | ||
def deprecation_warn(message) | ||
if ActiveSupport::Deprecation.respond_to?(:warn) && ActiveSupport::Deprecation.public_method_defined?(:warn) | ||
ActiveSupport::Deprecation.warn(message) | ||
else | ||
ActiveSupport::Deprecation.send(:warn, message) | ||
end | ||
end | ||
module_function :deprecation_warn | ||
end | ||
end |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ module JSONAPI | |
class Resource < ActiveRelationResource | ||
root_resource | ||
end | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module JSONAPI | ||
module Resources | ||
VERSION = '0.11.0.beta1' | ||
VERSION = '0.2.0' | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# As we are packaging 'sanger-jsonapi-resources' as a separate gem, RubyGems expects | ||
# the main file to be 'lib/sanger-jsonapi-resources.rb' to match the gem name. | ||
# Without this file, requiring the gem or Rails autoloading would fail, even if the internal code is unchanged. | ||
# This file exists to ensure compatibility with RubyGems and Bundler. | ||
# The easiest solution is to use this wrapper file, which simply requires the original 'jsonapi-resources' code, | ||
# so all internal references and modules remain unchanged and compatible. | ||
require_relative 'jsonapi-resources' |
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
Oops, something went wrong.
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.
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 👍