motor-admin 0.2.76 → 0.2.77

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: 18e2c93dd34d0ae77436e9df549dcbe2ef0d3a2db500189a8ee62006937be637
4
- data.tar.gz: 4bc2541c6982b92a852de17952a1002113bdf54daa8cdfc2cc517ff24e3986df
3
+ metadata.gz: d8079828af8d469f3dd4f3a77827541377f39522a9f2dbfbf7e867afbc3745af
4
+ data.tar.gz: 34137b38f20933daf40643c1005b36d59be11b8c2f0374e39d615a01b6f9abd9
5
5
  SHA512:
6
- metadata.gz: cef668b01fcd5a5dcb3aaa5cb801f8723d7b4ce9a9641550d1da8ac8643d6dbd1ea76ac41c8652cbe35a50b3f074d354a80b71770188383057471033aff06f14
7
- data.tar.gz: e5bdbb4a1f4134fd13e60b30c913f5ef2290295007b73ba74238bcebc52206033b5262d96b15271e6cf39cde04aacf36c752d03bcf0683913e606059f82dcf4d
6
+ metadata.gz: ede5d9f24ad96a896b332995bc288bf87272d676a65ff6ed735d4da6772a15f3f6daf707f6f81670957c45df66e48bb2f74439120e7b2b209a5a2007e2f63f66
7
+ data.tar.gz: 654307b067e993885d1d911ea682b06825a4f4d11238bd92692a892da0f215a00e983332f2acab2d9e04e6295ec51a883797b8f73368ae3792d772c923eef0c0
data/lib/motor/configs.rb CHANGED
@@ -10,6 +10,16 @@ module Motor
10
10
 
11
11
  module_function
12
12
 
13
+ def clear
14
+ Motor::Resource.destroy_all
15
+ Motor::Alert.destroy_all
16
+ Motor::Query.destroy_all
17
+ Motor::Dashboard.destroy_all
18
+ Motor::Form.destroy_all
19
+ Motor::ApiConfig.destroy_all
20
+ Motor::Config.destroy_all
21
+ end
22
+
13
23
  # @return [String]
14
24
  def file_path
15
25
  if Rails.root.to_s.start_with?(MEMFS_PATH)
@@ -21,6 +21,15 @@ namespace :motor do
21
21
  puts '✅ configs have been loaded from configs/motor.yml'
22
22
  end
23
23
 
24
+ task reload: :environment do
25
+ ActiveRecord::Base.transaction do
26
+ Motor::Configs.clear
27
+ Motor::Configs::SyncFromFile.call(with_exception: true)
28
+ end
29
+
30
+ puts '✅ configs have been loaded from configs/motor.yml'
31
+ end
32
+
24
33
  desc 'Synchronize configs with remote application'
25
34
 
26
35
  task sync: :environment do
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.76'
4
+ VERSION = '0.2.77'
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.2.76
4
+ version: 0.2.77
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Matsyburka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-23 00:00:00.000000000 Z
11
+ date: 2022-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord-filter