motor-admin 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/motor/query.rb +2 -0
- data/lib/motor/admin.rb +11 -5
- 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: 84e7e23b0861f5ec93e07aac64e0ce3a3dbdc5c4f3e99594b5e43c337865dccd
|
4
|
+
data.tar.gz: 578e34d82e6fe3ebb770917701cfdbcc5378446dfb0e731cedabafb6c69a384c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3216d3ff78046f3c32b8d3eb6a58be101d7fde2b5b3625a04c4677da404ecc53d8024ff36841f59b53c3ccad6898a7f366c4b95a42be9eeb8b324cc379d2543d
|
7
|
+
data.tar.gz: 57ae307c7c831101a6a363c657f709b963fff4e2f97cc83867d7ec6b4b56c3393e3e52bf6a873562af541abceb8575fbe4f47b5273fcb7aae35c887b604547f9
|
data/app/models/motor/query.rb
CHANGED
data/lib/motor/admin.rb
CHANGED
@@ -4,6 +4,16 @@ module Motor
|
|
4
4
|
class Admin < ::Rails::Engine
|
5
5
|
config.custom_html = ''
|
6
6
|
|
7
|
+
unless Motor.development?
|
8
|
+
config.eager_load_paths.delete(File.expand_path('../../app/controllers', __dir__))
|
9
|
+
config.eager_load_paths.delete(File.expand_path('../../app/controllers/concerns', __dir__))
|
10
|
+
config.eager_load_paths.delete(File.expand_path('../../app/models', __dir__))
|
11
|
+
|
12
|
+
config.autoload_once_paths << File.expand_path('../../app/models', __dir__)
|
13
|
+
config.autoload_once_paths << File.expand_path('../../app/controllers', __dir__)
|
14
|
+
config.autoload_once_paths << File.expand_path('../../app/controllers/concerns', __dir__)
|
15
|
+
end
|
16
|
+
|
7
17
|
initializer 'motor.startup_message' do
|
8
18
|
config.after_initialize do
|
9
19
|
next unless Motor.server?
|
@@ -108,15 +118,13 @@ module Motor
|
|
108
118
|
end
|
109
119
|
|
110
120
|
initializer 'motor.upgrade' do
|
111
|
-
|
121
|
+
ActiveSupport.on_load(:motor_query) do
|
112
122
|
next unless Motor.server?
|
113
123
|
|
114
124
|
unless Motor::Query.table_exists?
|
115
125
|
puts
|
116
126
|
puts ' => Run `rails g motor:install && rake db:migrate` in order to create Motor Admin configuration tables'
|
117
127
|
puts
|
118
|
-
|
119
|
-
raise
|
120
128
|
end
|
121
129
|
|
122
130
|
if !Motor::ApiConfig.table_exists? || !Motor::Note.table_exists?
|
@@ -124,8 +132,6 @@ module Motor
|
|
124
132
|
puts ' => Run `rails g motor:upgrade && rake db:migrate` ' \
|
125
133
|
'to perform data migration and enable the latest features'
|
126
134
|
puts
|
127
|
-
|
128
|
-
raise
|
129
135
|
end
|
130
136
|
end
|
131
137
|
end
|
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.4.
|
4
|
+
version: 0.4.6
|
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-01-
|
11
|
+
date: 2023-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ar_lazy_preload
|