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

Add model level batch api to 0.7 #53

Merged
merged 5 commits into from
Dec 12, 2018
Merged

Conversation

h-lame
Copy link

@h-lame h-lame commented Dec 12, 2018

Effectively this is a rewrite of #41 for the 0.7 version of the gem. I mistakenly thought that we already had the model level batch stuff in 0.7 because we had the Vault::Rails.batch_encrypt and Vault::Rails.batch_decrypt methods which were added in #22. We don't take all the commits from #41 though because I already took one of them over to 0.7 in #50, which should have been a hint that I was missing the rest of it TBH. 😞

popovm and others added 5 commits December 12, 2018 12:11
.vault_persist_all and .vault_load_all are methods, that can be used for batch operations of several records.
.vault_load_all is useful only when in combination with lazy decryption.

Note that although this commit is forwardported from the 0.6 version we've
updated the implementation to work with the rails 5 attribute API we use in
0.7.
For both encryption and decryption we need the same initialization phase of reading the
configuration options. The idea is to avoid code repetition and cluttering even more code in EncryptedModel.

Note that although this commit is forwardported from the 0.6 version we've
updated the implementation to work with the rails 5 attribute API we use in
0.7.
Copy link
Member

@popovm popovm left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Thanks for keeping 0.7 up to date 👏

@h-lame h-lame merged commit aef596d into master Dec 12, 2018
@h-lame h-lame deleted the add-model-level-batch-api-to-0.7 branch December 12, 2018 15:09
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.

2 participants