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

Rails 7.1, Ruby 3.1, and Ruby 3.2 #28

Merged
merged 8 commits into from
Oct 11, 2023
Merged

Conversation

smudge
Copy link
Member

@smudge smudge commented Oct 6, 2023

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.)

@@ -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']
Copy link
Member Author

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)
Copy link
Member Author

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),
Copy link
Member Author

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.

@smudge smudge requested a review from medlefsen October 10, 2023 18:14
Copy link
Contributor

@effron effron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

domainLGTM

Copy link
Member

@samandmoore samandmoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

platformlgtm

@smudge smudge merged commit 429e20f into Betterment:main Oct 11, 2023
20 checks passed
@smudge smudge deleted the rails-7-1 branch October 11, 2023 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants