-
Notifications
You must be signed in to change notification settings - Fork 9
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
Rails 7.1, Ruby 3.1, and Ruby 3.2 #28
Conversation
@@ -8,15 +8,24 @@ jobs: | |||
strategy: | |||
fail-fast: false | |||
matrix: | |||
ruby: ['2.6', '2.7', '3.0'] | |||
ruby: ['2.6', '2.7', '3.0', '3.1', '3.2'] |
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'd like to drop Ruby < 3 support in the next major release.
}.not_to raise_error | ||
end | ||
|
||
it "loads classes even if not in default scope" do | ||
expect { | ||
YAML.load(Story.create(scoped: false).to_yaml) | ||
YAML.load_dj(Story.create(scoped: false).to_yaml) |
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.
This spec just exists to make sure that ActiveRecords work with the psych ext. The new safe YAML.load in Ruby 3.1 and 3.2 requires extra configuration if you want to (de)serialize custom classes, but instead we can use the patched method that this gem actually uses for the same effect as before.
(" enqueued_at: '2023-01-20T18:52:29Z'\n" if ActiveJob::VERSION::MAJOR >= 6), | ||
(/ timezone: ?\n/ if ActiveJob::VERSION::MAJOR >= 6), | ||
(/ enqueued_at: '2023-01-20T18:52:29(\.\d+)?Z'\n/ if ActiveJob::VERSION::MAJOR >= 6), | ||
(/ scheduled_at: ?\n/ if ActiveJob::VERSION::MAJOR >= 7 && ActiveJob::VERSION::MINOR >= 1), |
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.
This is all some minor formatting variances introduced in newer Rubies & Rails versions.
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.
domainLGTM
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.
platformlgtm
This adds Rails 7.1, Ruby 3.1, and Ruby 3.2 to the build matrix.
The gem already works with these versions, but now they are formally tested. (As such, I bumped the gem by a patch version, to signify that this is the first verified-compatible release.)