motor-admin 0.2.3 → 0.2.7

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: 45ba4c64d6749aa260a6a14f49a3f71484fe1e127f93f31e0adbba201bfe840f
4
- data.tar.gz: 483590c08e2194dc9232ed29de69143167723836b05dab95a90cb0e997191590
3
+ metadata.gz: df47d07159a23d82ea4c5b2806ba9458acf28716d68a8a0b69a0c3788a0865f5
4
+ data.tar.gz: 112179163150a05ed240128622a77a07c6779281645b212e42aa187bd25d7b73
5
5
  SHA512:
6
- metadata.gz: 5171324efad5960ed06d800f7872d7b0fbe823486aff3dfe346e9032c8d0bc9667a5a0c77dc106b8c0bfea8a1a4f0d3654c0986976b32744e4c3178be63b2d0a
7
- data.tar.gz: 28519dfb8c532d3d803325977a0f65d30bd74277f0826a610f2c7c527d0aa1fc74b1820f01f64a3cf444133f6f5c054651949d8d5cad92c86445bea333ce30e6
6
+ metadata.gz: ae3708b9bbe101d3c137c11990941895be2ed7ed9a7f531c4d39f7adff07849c51d552794953a3a1393516bf0d15383f03c05f5a4fa8c35ff02ccf230319a057
7
+ data.tar.gz: 26538902eb92d66322018d4b6b52a2e92a42f6fdad84445b5dfda56e9374e2c690d253d3d21a2a13e9143737b164bd6da4c67b0a5f2bb39a8c8bbcd28aa42007
@@ -262,3 +262,5 @@ en:
262
262
  activate: Activate
263
263
  load_existing_options_from_database: Load existing options from the database
264
264
  add_database: Add Database
265
+ audio: Audio
266
+ video: Video
@@ -262,6 +262,8 @@ es:
262
262
  activate: Activar
263
263
  load_existing_options_from_database: Cargar las opciones existentes de la base de datos
264
264
  add_database: Añadir base de datos
265
+ audio: Audio
266
+ video: Video
265
267
  i:
266
268
  locale: es
267
269
  select:
@@ -258,6 +258,8 @@ pt:
258
258
  visibility: "Visibilidade"
259
259
  visualization: "Visualização"
260
260
  write_only: "Somente gravação"
261
+ audio: Áudio
262
+ video: Vídeo
261
263
  i:
262
264
  locale: pt
263
265
  select:
@@ -16,6 +16,8 @@ if Rails::VERSION::MAJOR == 6
16
16
  end
17
17
 
18
18
  def build_filters(manager, alias_tracker)
19
+ return unless @filters
20
+
19
21
  where_clause = nil
20
22
 
21
23
  @filters.each do |filters|
data/lib/motor/admin.rb CHANGED
@@ -45,7 +45,7 @@ module Motor
45
45
  initializer 'motor.alerts.scheduler' do
46
46
  config.after_initialize do
47
47
  next unless Motor.server?
48
- next if Motor.development?
48
+ next unless Rails.env.production?
49
49
 
50
50
  Motor::Alerts::Scheduler::SCHEDULER_TASK.execute
51
51
  end
@@ -4,6 +4,8 @@ module Motor
4
4
  module CancanUtils
5
5
  module AbilityPatch
6
6
  def serialized_rules
7
+ return [] unless @rules
8
+
7
9
  @rules.map do |rule|
8
10
  {
9
11
  base_behavior: rule.base_behavior,
@@ -13,7 +13,7 @@ module Motor
13
13
  module_function
14
14
 
15
15
  def call(current_user = nil, current_ability = nil, cache_keys: LoadFromCache.load_cache_keys)
16
- CACHE_STORE.fetch("#{I18n.locale}#{cache_keys.hash}#{current_user&.id}") do
16
+ CACHE_STORE.fetch("#{I18n.locale}#{cache_keys.hash}#{current_user&.id}#{current_ability&.rules_hash}") do
17
17
  CACHE_STORE.clear
18
18
 
19
19
  data = build_data(cache_keys, current_user, current_ability)
@@ -14,7 +14,7 @@ module Motor
14
14
 
15
15
  maybe_fetch_from_cache(
16
16
  model,
17
- cache_key,
17
+ cache_key.to_s + model.object_id.to_s,
18
18
  lambda {
19
19
  resource_config = configs.find { |r| r.name == model.name.underscore }
20
20
 
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.2.3'
4
+ VERSION = '0.2.7'
5
5
  end
@@ -2601,9 +2601,9 @@
2601
2601
  "icons/zoom-out.svg.gz": "icons/zoom-out.svg.gz",
2602
2602
  "icons/zoom-question.svg": "icons/zoom-question.svg",
2603
2603
  "icons/zoom-question.svg.gz": "icons/zoom-question.svg.gz",
2604
- "main-1e1b7c867f581bccfb2d.css.gz": "main-1e1b7c867f581bccfb2d.css.gz",
2605
- "main-1e1b7c867f581bccfb2d.js.LICENSE.txt": "main-1e1b7c867f581bccfb2d.js.LICENSE.txt",
2606
- "main-1e1b7c867f581bccfb2d.js.gz": "main-1e1b7c867f581bccfb2d.js.gz",
2607
- "main.css": "main-1e1b7c867f581bccfb2d.css",
2608
- "main.js": "main-1e1b7c867f581bccfb2d.js"
2604
+ "main-32da50c51ef9fcddf634.css.gz": "main-32da50c51ef9fcddf634.css.gz",
2605
+ "main-32da50c51ef9fcddf634.js.LICENSE.txt": "main-32da50c51ef9fcddf634.js.LICENSE.txt",
2606
+ "main-32da50c51ef9fcddf634.js.gz": "main-32da50c51ef9fcddf634.js.gz",
2607
+ "main.css": "main-32da50c51ef9fcddf634.css",
2608
+ "main.js": "main-32da50c51ef9fcddf634.js"
2609
2609
  }
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.2.3
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Matsyburka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-01 00:00:00.000000000 Z
11
+ date: 2021-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord-filter
@@ -1523,8 +1523,8 @@ files:
1523
1523
  - ui/dist/icons/zoom-money.svg.gz
1524
1524
  - ui/dist/icons/zoom-out.svg.gz
1525
1525
  - ui/dist/icons/zoom-question.svg.gz
1526
- - ui/dist/main-1e1b7c867f581bccfb2d.css.gz
1527
- - ui/dist/main-1e1b7c867f581bccfb2d.js.gz
1526
+ - ui/dist/main-32da50c51ef9fcddf634.css.gz
1527
+ - ui/dist/main-32da50c51ef9fcddf634.js.gz
1528
1528
  - ui/dist/manifest.json
1529
1529
  homepage:
1530
1530
  licenses: