attr_vault 0.0.2 → 0.0.3
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_vault/version.rb +1 -1
- data/lib/attr_vault.rb +5 -0
- data/spec/attr_vault_spec.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7089817e9f22b5f911c5f3bfd6eeb2197b35a7d
|
4
|
+
data.tar.gz: e173b33246bbac4540d340acfb2e83498987f6ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5591b127128faeb99e02e2be60f46b2e77b85742f40982bd505f595050c652236f979a9e7d501fa1628ba36f4722aad8904ad12509cfb37032213de3d5e5e968
|
7
|
+
data.tar.gz: ea680acfb48abdf5b3214105b4a56e85f9725382d175207309b4a8fc9b830aea87310974b80162702ff7349d82568d037fc4d35850eaa6510874ab414c4fe35e
|
data/Gemfile.lock
CHANGED
data/lib/attr_vault/version.rb
CHANGED
data/lib/attr_vault.rb
CHANGED
@@ -81,6 +81,11 @@ module AttrVault
|
|
81
81
|
|
82
82
|
keyring = self.class.vault_keys
|
83
83
|
key_id = self[self.class.vault_key_field]
|
84
|
+
if key_id.nil?
|
85
|
+
# if there is no recorded key, this is not an encrypted
|
86
|
+
# record so we return nil
|
87
|
+
return nil
|
88
|
+
end
|
84
89
|
record_key = self.class.vault_keys.fetch(key_id)
|
85
90
|
|
86
91
|
encrypted_value = self[attr.encrypted_field]
|
data/spec/attr_vault_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attr_vault
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maciek Sakrejda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|