motor-admin 0.4.4 → 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: a6872eec5b5b604ad90658e5cc46f3e6bcef920cf21712fad38400b761a99b70
4
- data.tar.gz: 862363ebf4310aa91a434916e37e977ae1f9c27f3887b751f0d7801f3f88f7e9
3
+ metadata.gz: 84e7e23b0861f5ec93e07aac64e0ce3a3dbdc5c4f3e99594b5e43c337865dccd
4
+ data.tar.gz: 578e34d82e6fe3ebb770917701cfdbcc5378446dfb0e731cedabafb6c69a384c
5
5
  SHA512:
6
- metadata.gz: 233119dd49ea625162f191f1d0831f27f21c09ab0fb719c733c17a7bf0ead23a44d45de97a6d21c11b9515c5560a66159625de4b2d2e1be83c94e632bc79b3ea
7
- data.tar.gz: 62c6f9104594d35bf9902fb0e58480e6c3bd6fbba15d7aa5e1bb19770b9ca4730e114378d46933aa75398d0ae108b029054004e35466274a3d6e3f4b01e2a83d
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/config/routes.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Motor::Admin.routes.draw do
4
4
  namespace :motor, path: '' do
5
- mount ActionCable.server => '/cable', as: :cabel if defined?(ActionCable)
5
+ mount ActionCable.server => '/cable', as: :cable if defined?(ActionCable)
6
6
 
7
7
  scope 'api', as: :api do
8
8
  resources :run_queries, only: %i[show create]
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
@@ -44,7 +44,7 @@ module Motor
44
44
  audits_count: Motor::Audit.count,
45
45
  i18n: i18n_data,
46
46
  base_path: Motor::Admin.routes.url_helpers.motor_path,
47
- cabel_path: Motor::Admin.routes.url_helpers.try(:motor_cabel_path),
47
+ cable_path: Motor::Admin.routes.url_helpers.try(:motor_cable_path),
48
48
  admin_settings_path: Rails.application.routes.url_helpers.try(:admin_settings_general_path),
49
49
  schema: Motor::BuildSchema.call(cache_keys, current_ability),
50
50
  header_links: header_links_data_hash(current_user, current_ability, configs_cache_key),
@@ -12,7 +12,7 @@ module Motor
12
12
 
13
13
  REMINDER_NOTIFICATIONS_JOIN_SQL = <<~SQL.squish
14
14
  LEFT JOIN motor_notifications
15
- ON motor_notifications.record_id = motor_reminders.id
15
+ ON cast(motor_notifications.record_id as int) = motor_reminders.id
16
16
  AND motor_notifications.record_type = 'Motor::Reminder'
17
17
  SQL
18
18
 
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.4'
4
+ VERSION = '0.4.6'
5
5
  end
@@ -3964,9 +3964,9 @@
3964
3964
  "images/layers-2x.png": "images/layers-2x.png",
3965
3965
  "images/layers.png": "images/layers.png",
3966
3966
  "images/marker-icon.png": "images/marker-icon.png",
3967
- "main-111931e5606f0c3faafa.css.gz": "main-111931e5606f0c3faafa.css.gz",
3968
- "main-111931e5606f0c3faafa.js.LICENSE.txt": "main-111931e5606f0c3faafa.js.LICENSE.txt",
3969
- "main-111931e5606f0c3faafa.js.gz": "main-111931e5606f0c3faafa.js.gz",
3970
- "main.css": "main-111931e5606f0c3faafa.css",
3971
- "main.js": "main-111931e5606f0c3faafa.js"
3967
+ "main-947a9a9c3b6ed918c60d.css.gz": "main-947a9a9c3b6ed918c60d.css.gz",
3968
+ "main-947a9a9c3b6ed918c60d.js.LICENSE.txt": "main-947a9a9c3b6ed918c60d.js.LICENSE.txt",
3969
+ "main-947a9a9c3b6ed918c60d.js.gz": "main-947a9a9c3b6ed918c60d.js.gz",
3970
+ "main.css": "main-947a9a9c3b6ed918c60d.css",
3971
+ "main.js": "main-947a9a9c3b6ed918c60d.js"
3972
3972
  }
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
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-08 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
@@ -2235,8 +2235,8 @@ files:
2235
2235
  - ui/dist/images/layers-2x.png
2236
2236
  - ui/dist/images/layers.png
2237
2237
  - ui/dist/images/marker-icon.png
2238
- - ui/dist/main-111931e5606f0c3faafa.css.gz
2239
- - ui/dist/main-111931e5606f0c3faafa.js.gz
2238
+ - ui/dist/main-947a9a9c3b6ed918c60d.css.gz
2239
+ - ui/dist/main-947a9a9c3b6ed918c60d.js.gz
2240
2240
  - ui/dist/manifest.json
2241
2241
  homepage:
2242
2242
  licenses: