common-data-caching 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/common_data_caching.rb +9 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d730266341a778fbe9be901c33888915f5ed61d1568021321c06be30a80a5eda
4
- data.tar.gz: ac3e37326cec7a8e2821bd20f9d2ea3e02a66b5a902dacf481133940eb2c57e7
3
+ metadata.gz: fd3f226deb5e5506068c4c077dbf5e2fadb8b4268d3bae92aa30922e43f024bd
4
+ data.tar.gz: '0827e9f74d4076509ff8bfc4afd095b9339b42b12fcaa0b996c4f922f3d0123b'
5
5
  SHA512:
6
- metadata.gz: 4703cfd883e6b6c5ddba969b9a0d1ad2993102bf43eb9c0abb6064a3edfeaf56c653842e3d055626971afd46f1e351238292cdff8d132b5f8ce6bf7d23ad5552
7
- data.tar.gz: 71180277c938de63200c76f51481fd427ae1d69995986e8fbdb3126be3ce45ee3184680c813344bc381f3378d8dabec8127f09603fbf0a774f6a867ad58814b1
6
+ metadata.gz: 88fb81de30d3159345e76c7a12635c1b5b83806d56140b30427fb36845c5cad68eea625ceb5d266d78ccae314965796bd46607232a7e0647e9c80d38ec779d19
7
+ data.tar.gz: d4bb6c8a0873ed6a0d915ae0065d4ad7e97ed9a7c93ad07c566a2e54f921d8c577c17ab33713672a5938aa29e6afbe1e89d1672cc2f4d81290bcaf837e8e6ebb
@@ -9,6 +9,15 @@ module CommonDataCaching
9
9
  Rails.cache.read('common-data-caching-versions') || {}
10
10
  end
11
11
 
12
+ def self.all_collections
13
+ versions.map do |entity, _version|
14
+ {
15
+ entity:,
16
+ objects: entity.constantize.common_data_cache_collection
17
+ }
18
+ end
19
+ end
20
+
12
21
  def self.update_cache
13
22
  # получение списка моделей
14
23
  Rails.application.eager_load!
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: common-data-caching
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Павел Бабин
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-30 00:00:00.000000000 Z
11
+ date: 2024-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails