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 +4 -4
- data/lib/motor/configs.rb +10 -0
- data/lib/motor/tasks/motor.rake +9 -0
- data/lib/motor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8079828af8d469f3dd4f3a77827541377f39522a9f2dbfbf7e867afbc3745af
|
4
|
+
data.tar.gz: 34137b38f20933daf40643c1005b36d59be11b8c2f0374e39d615a01b6f9abd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
data/lib/motor/tasks/motor.rake
CHANGED
@@ -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
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.
|
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-
|
11
|
+
date: 2022-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord-filter
|