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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab0cc50d998434c23dbb9e9722a600b694b9177d7734d2abf347123c97e668cd
4
- data.tar.gz: c6f7837f40d9490d694d1491e691aa4154e8649fa6c9d890683a9bb607fdb1d4
3
+ metadata.gz: 84e7e23b0861f5ec93e07aac64e0ce3a3dbdc5c4f3e99594b5e43c337865dccd
4
+ data.tar.gz: 578e34d82e6fe3ebb770917701cfdbcc5378446dfb0e731cedabafb6c69a384c
5
5
  SHA512:
6
- metadata.gz: b11ed6e3233d6e92c95cf2981236f806d91a985544d83872a20a8bcd9cf2f06e17814ca2dfa1dfdb7031e639950afa97822079ba9b68dc36d76426cbfd6065b5
7
- data.tar.gz: dfa730ff66075b589c2a67fb6513fad839a6f60b01335b4eaff67599149822a2071467f1302ec4798235510a3baae77212f75cf02307543fbb3346839f7e0bb0
6
+ metadata.gz: 3216d3ff78046f3c32b8d3eb6a58be101d7fde2b5b3625a04c4677da404ecc53d8024ff36841f59b53c3ccad6898a7f366c4b95a42be9eeb8b324cc379d2543d
7
+ data.tar.gz: 57ae307c7c831101a6a363c657f709b963fff4e2f97cc83867d7ec6b4b56c3393e3e52bf6a873562af541abceb8575fbe4f47b5273fcb7aae35c887b604547f9
@@ -24,3 +24,5 @@ module Motor
24
24
  alias run result
25
25
  end
26
26
  end
27
+
28
+ ActiveSupport.run_load_hooks(:motor_query, Motor::Query)
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
- config.after_initialize do
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Motor
4
- VERSION = '0.4.5'
4
+ VERSION = '0.4.6'
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.4.5
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-14 00:00:00.000000000 Z
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