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

Address ruby 3.0 support #2

Merged
merged 1 commit into from
Apr 25, 2022

Conversation

kimyu92
Copy link

@kimyu92 kimyu92 commented Apr 25, 2022

Since Rails 7 requires minimum ruby 2.7+

This PR is intended to separation of positional and keyword arguments introduced since ruby 2.7 and it's necessary for ruby 3.0

@kimyu92
Copy link
Author

kimyu92 commented Apr 25, 2022

@armiiller Possible to look at this change?

Copy link

@armiiller armiiller left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks @kimyu92

@armiiller armiiller merged commit df02ab0 into PagerTree:rails-7-0-support Apr 25, 2022
@kimyu92 kimyu92 deleted the rails-7-0-support branch April 25, 2022 15:01
@tnir
Copy link

tnir commented Nov 8, 2022

The upstream now includes this change on its default branch (master) (see attr-encrypted#383).

@kimyu92
Copy link
Author

kimyu92 commented Nov 8, 2022

@tnir Unfortunately, it's still missing rails support from upstream.

3637c91
515cf71
eafd77a

@tnir
Copy link

tnir commented Nov 8, 2022

@kimyu92 Excellent! Did you try to create PR in the upstream? Happy if you do so 🙏

@tnir
Copy link

tnir commented Nov 8, 2022

cc @armiiller (the original author of these commits)

@armiiller
Copy link

Hi @tnir - Are you asking that I make a PR to attr-encrypted/attr_encrypted ?

It's been a while since I touched this repo, it was primarily mean as a blog post / temporary gem while users moved from attr_encrypted to native rails encryption. There were no plans to maintain this gem as a "replacement". Native rails encryption should be the solution

@kimyu92
Copy link
Author

kimyu92 commented Nov 8, 2022

@tnir I'm happy to port the commits to original repo

@armiiller you're right about the native rails encryption should be the way to go, however, in real world scenario, it might not be possible to transition to native solution immediately based on the size of app and priority.

@armiiller
Copy link

FYI - I think I didn't try to PR these into the main branch because it would be a major breaking change for the attr_encrypted library. You would need some sort of "opt in" configuration so you don't break everything in existing repos that were already using attr_encrypted. The method prefix broke a lot of items, and thus why it was a fork

Something to consider if making a PR. Maybe something for an initializer file or something

@tnir
Copy link

tnir commented Nov 9, 2022

Thanks @armiiller. Yes, I asked you so. I agree with @armiiller. I will recheck how the migration in the real world works in a week.

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