attr_keyring 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/attr_keyring/active_record.rb +3 -1
- data/lib/attr_keyring/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74bd2df52ec8dcaf0295310f9755c36ff64a9185b6ef80a45470173de5a3bd19
|
4
|
+
data.tar.gz: 3471acffc4bcc55ef81ee715e8c4363d00c95f6b81cb559fb123d4f28cbb13f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06277ed16d197dc8910b40960b85784072bf6fc4c544b95e59c13044a7cc02c514eec014aea016004039cbfbbfaa87adece295eb0b81e36ecf83de593ee05e01
|
7
|
+
data.tar.gz: 00a790ac4d5d5bae7fa76c4a6023281fcf58b71839b22efb173e1d3fbe7ac65aa630ff2f8b877baead2e24c394584ec4e799f877e461e7e9ca8bc04ccd5bcb39
|
data/Gemfile.lock
CHANGED
@@ -52,7 +52,7 @@ module AttrKeyring
|
|
52
52
|
module InstanceMethods
|
53
53
|
private def attr_reset_column(attribute)
|
54
54
|
public_send("encrypted_#{attribute}=", nil)
|
55
|
-
public_send("#{attribute}_digest=", nil)
|
55
|
+
public_send("#{attribute}_digest=", nil) if respond_to?("#{attribute}_digest=")
|
56
56
|
nil
|
57
57
|
end
|
58
58
|
|
@@ -66,6 +66,8 @@ module AttrKeyring
|
|
66
66
|
|
67
67
|
self.class.keyring_attrs.each do |attribute, options|
|
68
68
|
value = public_send(attribute)
|
69
|
+
next if value.nil?
|
70
|
+
|
69
71
|
encrypted_value = self.class.keyring.encrypt(value, keyring_id)
|
70
72
|
encrypted_value = Base64.strict_encode64(encrypted_value) if options[:encode]
|
71
73
|
|
data/lib/attr_keyring/version.rb
CHANGED