motor-admin 0.4.25 → 0.4.26

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: 348ae639231cccca61f74fd3f92c913ac2d63778807e67ad264f43e6be2afa01
4
- data.tar.gz: 9f7568df6897b21182d70da600d764a74d806a24affb7764872ef00eb6b345e4
3
+ metadata.gz: c3d3f74d751d9aab63f2752c05ce5e2505211f1fc9f5a1e70d261e12f6bc2717
4
+ data.tar.gz: 2635bb819b6c3914e9a043322b0e9796401c5c094b818aa396e2a712868ef0b5
5
5
  SHA512:
6
- metadata.gz: 42982ac002c2d2ba6d34c42d9ca3b734a8fb8ec2f2b4077408696530c5dcb2d8e0589dc016300b088a4d645452ca9e489c08382f67ebf0f825e7848c2136538a
7
- data.tar.gz: 1ed7b6047594f336ddeba7e90348289325d03a3d61c5903174fbca5841c7c4453940ffbbbd2ac01c3f6b2548f6c52c7f3c917a2729f4f8e97d2c19df4cd39d83
6
+ metadata.gz: b271b04762f0fcf0e123a7eb1275bd08c94e99d3e6c5cf4cc37282ccc05934afaf05dc428c2e0a62db4bdd80b014a1f4f100329a4c7789c604ebaf8abc689b5a
7
+ data.tar.gz: bd88869c1cd00d8e655f7b4169da380e1b649e5f0f128c9a95adf6a86438c433e09b2f666deaa7ae25b51ef8b593a9f66369d79ea24d2f0bc682c326d7e8f993
@@ -9,7 +9,11 @@ module Motor
9
9
 
10
10
  def all
11
11
  ActiveRecord::Base.logger.silence do
12
- CACHE_STORE.fetch(Motor::Alert.all.maximum(:updated_at)) do
12
+ cache_key = Motor::Alert.all.maximum(:updated_at)
13
+
14
+ return [] if cache_key.nil?
15
+
16
+ CACHE_STORE.fetch(cache_key) do
13
17
  clear
14
18
 
15
19
  Motor::Alert.all.active.enabled.to_a
data/lib/motor/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Motor
4
- VERSION = '0.4.25'
4
+ VERSION = '0.4.26'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motor-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.25
4
+ version: 0.4.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Matsyburka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-29 00:00:00.000000000 Z
11
+ date: 2024-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ar_lazy_preload