lightning-bolt 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lightning/bolt/version.rb +1 -1
- data/lib/lightning/bolt.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7705fc8efc2ff61f50a4a31602b305e2c4a29117
|
4
|
+
data.tar.gz: 1b61a04a7d4be24afdf76a602ea70f2bcb4f8f5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 918b0576f5dfc1a93508807ba1398490ef1307a1f693d9ccbf08707471c5d8438759a489ce353c019b47d2c750c75f880a24ef1a55d71cae14dfe27c33daca7a
|
7
|
+
data.tar.gz: 645d4f5978e77a56f608ff030436540df63588429097e9d51657d94b4af52e6ef0f47f5ceab45a29eced166a1e6ec0072c2bb95d04869cc6fd0cb6cf34efd396
|
data/lib/lightning/bolt.rb
CHANGED
@@ -282,13 +282,14 @@ module Lightning
|
|
282
282
|
def remember(rule)
|
283
283
|
cortex = rule.scan(Regexp.new(@keys["keys"]["memorize"]))
|
284
284
|
bank = rule.split("+:")
|
285
|
-
|
285
|
+
hash = Digest::SHA256.hexdigest(bank[1])
|
286
|
+
memory = @memory[hash]
|
286
287
|
if memory
|
287
288
|
return memory
|
288
289
|
else
|
289
|
-
bank = rule.split("+:")
|
290
290
|
rule = decrypt(bank[0])
|
291
291
|
memory = decrypt(bank[0])
|
292
|
+
@memory[hash] = memory
|
292
293
|
return memory
|
293
294
|
end
|
294
295
|
end
|