action_encrypt 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 850dbcfb530af9a8e6b85b1885c9ea4390c3850dae49aaaebc67ea383c7dcaf4
4
- data.tar.gz: 56bb5d876520484d803e21d5bb0e56be1fa168de379e2d0530c8e6a70c8f142e
3
+ metadata.gz: 9017388cac062e1e2f25524d728da933bad8186fd48cbc6d6c960e105200ac5e
4
+ data.tar.gz: 988f579357bfb65782555bea79b61fa74d028fd73e4ff1925cfcf70de2e8a826
5
5
  SHA512:
6
- metadata.gz: 961ae2946e16d396104cb911f2420bb449d204cb617d91ee10fc6732846c1057055f6ed8c100b3b6d87160135e7989ebc52f22a8cdd730e113ab5ab308e13d66
7
- data.tar.gz: 34659ca935c25192bbfe2c313acf06d057a5b44098cb66e3924c146dd7a16f921c9d68f613eb282b40efb7a8371dad01bcd860b308e4229bb0204b09e69751bb
6
+ metadata.gz: d7144f8c6b7aa3dce9306c70a5f467f8862f9ce99bff4f9d90034274bade0f2b65aac797e2a2af5d6bb5724d168ca5264ec963e575dd1210ca988e7bce265f52
7
+ data.tar.gz: 53d17965935871ec19a762461e6414604319932aec885bb1fa3a2ee9e808c1bb8e9f6f11bbffb8c556ddb171247a2d3a91ace2d40fe8f4cbd651b356786f129d
@@ -3,5 +3,20 @@
3
3
  module ActionEncrypt
4
4
  class Configuration
5
5
  attr_accessor :key_encryption_key, :blind_index_key
6
+
7
+ def initialize(key_encryption_key: nil, blind_index_key: nil)
8
+ @key_encryption_key = key_encryption_key.presence || default_key_encryption_key
9
+ @blind_index_key = blind_index_key.presence || default_blind_index_key
10
+ end
11
+
12
+ private
13
+
14
+ def default_key_encryption_key
15
+ Rails.application.credentials.key_encryption_key
16
+ end
17
+
18
+ def default_blind_index_key
19
+ Rails.application.credentials.blind_index_key
20
+ end
6
21
  end
7
22
  end
@@ -1,3 +1,3 @@
1
1
  module ActionEncrypt
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_encrypt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Van Der Beek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-22 00:00:00.000000000 Z
11
+ date: 2021-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails