motor-admin 0.1.20 → 0.1.21

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: d952208606d9f6e899a942bf6521fa2e4280b699ebe5b33d0e8639f22d6b4cbc
4
- data.tar.gz: ad3699eca7039750c3a3c9563ecc7795893aa32e8673c0060a2ecf2fe9f56b88
3
+ metadata.gz: c6b8a4bcbd17fc0eed3b91dfac13285623adbfeda90a20a414193384070cccff
4
+ data.tar.gz: 303af4bb7f49abfd02dfe91c6aa03278e1d6572e1831e73cd60fcef0b2a96a29
5
5
  SHA512:
6
- metadata.gz: 2c3a8d7d355771f8c83edd3048f7417c9bf8459f0ef5900e7a09532b0c9e214bc2f94dbebd58930b939e5d1e28259b8e2e853d369bd24a3727a27d0f30038166
7
- data.tar.gz: a14340525096bbe45e9ac32e8f5deafe8ae5b0ed9541b7eb837930853fe2bacdfd1307e63ca9fa811dce3fa67136ddcc55a2191f46d6f2742cb219e004f6944b
6
+ metadata.gz: 144c32f7aa7902c4b2200fdde19b7487d1476856380c79b1d694d164227f98529b204a81f4bffcfc281a0951be13f585a9fe5ae57014bb66b38b94e49199b44b
7
+ data.tar.gz: 78b1501b59c676ecc389febca43eadc961514e3720fcc3256c6664086f60f5c0167973c7b19c7ce1a8705404b2111136872a683a451bd9633b21531bf59a06e0
data/lib/motor.rb CHANGED
@@ -6,7 +6,6 @@ require 'js_regex'
6
6
  require 'fugit'
7
7
  require 'csv'
8
8
  require 'active_record/filter'
9
- require 'base64'
10
9
 
11
10
  module Motor
12
11
  PATH = Pathname.new(__dir__)
@@ -27,6 +26,18 @@ module Motor
27
26
  true
28
27
  end
29
28
 
29
+ def server?
30
+ defined?(::Rails::Server) ||
31
+ defined?(::Thin::Server) ||
32
+ defined?(::PhusionPassenger) ||
33
+ (defined?(::Puma) && File.basename($PROGRAM_NAME) == 'puma') ||
34
+ defined?(::Unicorn::HttpServer) ||
35
+ defined?(::Mongrel::HttpServer) ||
36
+ defined?(::WEBrick::VERSION) ||
37
+ defined?(JRuby::Rack::VERSION) ||
38
+ defined?(::Trinidad::Server)
39
+ end
40
+
30
41
  def development?
31
42
  ENV['MOTOR_DEVELOPMENT'].present?
32
43
  end
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ module ActiveRecordUtils
4
+ end
5
+
3
6
  require_relative './active_record_utils/types'
4
7
  require_relative './active_record_utils/fetch_methods'
5
8
  require_relative './active_record_utils/defined_scopes_extension'
6
9
  require_relative './active_record_utils/active_storage_links_extension'
7
-
8
- module ActiveRecordUtils
9
- end
@@ -9,11 +9,15 @@ module Motor
9
9
  UNIFIED_TYPES = {
10
10
  'smallint' => 'integer',
11
11
  'int' => 'integer',
12
+ 'int4' => 'integer',
12
13
  'int8' => 'integer',
13
14
  'int16' => 'integer',
14
15
  'bigint' => 'integer',
15
16
  'numeric' => 'float',
16
17
  'decimal' => 'float',
18
+ 'float4' => 'float',
19
+ 'float8' => 'float',
20
+ 'float16' => 'float',
17
21
  'text' => 'string',
18
22
  'citext' => 'string',
19
23
  'jsonb' => 'json',
data/lib/motor/admin.rb CHANGED
@@ -8,7 +8,7 @@ module Motor
8
8
 
9
9
  initializer 'motor.alerts.scheduler' do
10
10
  config.after_initialize do |_app|
11
- next unless defined?(Rails::Server)
11
+ next unless Motor.server?
12
12
 
13
13
  Motor::Alerts::Scheduler::SCHEDULER_TASK.execute
14
14
  end
data/lib/motor/alerts.rb CHANGED
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative './alerts/scheduler'
4
- require_relative './alerts/scheduled_alerts_cache'
5
- require_relative './alerts/persistance'
6
-
7
3
  module Motor
8
4
  module Alerts
9
5
  end
10
6
  end
7
+
8
+ require_relative './alerts/scheduler'
9
+ require_relative './alerts/scheduled_alerts_cache'
10
+ require_relative './alerts/persistance'
@@ -1,13 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative './api_query/sort'
4
- require_relative './api_query/paginate'
5
- require_relative './api_query/filter'
6
- require_relative './api_query/search'
7
- require_relative './api_query/apply_scope'
8
- require_relative './api_query/build_meta'
9
- require_relative './api_query/build_json'
10
-
11
3
  module Motor
12
4
  module ApiQuery
13
5
  module_function
@@ -22,3 +14,11 @@ module Motor
22
14
  end
23
15
  end
24
16
  end
17
+
18
+ require_relative './api_query/sort'
19
+ require_relative './api_query/paginate'
20
+ require_relative './api_query/filter'
21
+ require_relative './api_query/search'
22
+ require_relative './api_query/apply_scope'
23
+ require_relative './api_query/build_meta'
24
+ require_relative './api_query/build_json'
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative './dashboards/persistance'
4
-
5
3
  module Motor
6
4
  module Dashboards
7
5
  end
8
6
  end
7
+
8
+ require_relative './dashboards/persistance'
data/lib/motor/forms.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative './forms/persistance'
4
-
5
3
  module Motor
6
4
  module Forms
7
5
  end
8
6
  end
7
+
8
+ require_relative './forms/persistance'
data/lib/motor/queries.rb CHANGED
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative './queries/run_query'
4
- require_relative './queries/persistance'
5
- require_relative './queries/postgresql_exec_query'
6
-
7
3
  module Motor
8
4
  module Queries
9
5
  end
10
6
  end
7
+
8
+ require_relative './queries/run_query'
9
+ require_relative './queries/persistance'
10
+ require_relative './queries/postgresql_exec_query'
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.1.20'
4
+ VERSION = '0.1.21'
5
5
  end
@@ -5,9 +5,9 @@
5
5
  "fonts/ionicons.ttf?v=3.0.0-alpha.3": "fonts/ionicons.ttf",
6
6
  "fonts/ionicons.woff2?v=3.0.0-alpha.3": "fonts/ionicons.woff2",
7
7
  "fonts/ionicons.woff?v=3.0.0-alpha.3": "fonts/ionicons.woff",
8
- "main-6c3f6ebef4c238d9efa7.css.gz": "main-6c3f6ebef4c238d9efa7.css.gz",
9
- "main-6c3f6ebef4c238d9efa7.js.LICENSE.txt": "main-6c3f6ebef4c238d9efa7.js.LICENSE.txt",
10
- "main-6c3f6ebef4c238d9efa7.js.gz": "main-6c3f6ebef4c238d9efa7.js.gz",
11
- "main.css": "main-6c3f6ebef4c238d9efa7.css",
12
- "main.js": "main-6c3f6ebef4c238d9efa7.js"
8
+ "main-015cc9721345d5b8af80.css.gz": "main-015cc9721345d5b8af80.css.gz",
9
+ "main-015cc9721345d5b8af80.js.LICENSE.txt": "main-015cc9721345d5b8af80.js.LICENSE.txt",
10
+ "main-015cc9721345d5b8af80.js.gz": "main-015cc9721345d5b8af80.js.gz",
11
+ "main.css": "main-015cc9721345d5b8af80.css",
12
+ "main.js": "main-015cc9721345d5b8af80.js"
13
13
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motor-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20
4
+ version: 0.1.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Matsyburka
@@ -213,8 +213,8 @@ files:
213
213
  - lib/motor/ui_configs.rb
214
214
  - lib/motor/version.rb
215
215
  - ui/dist/fonts/ionicons.woff2
216
- - ui/dist/main-6c3f6ebef4c238d9efa7.css.gz
217
- - ui/dist/main-6c3f6ebef4c238d9efa7.js.gz
216
+ - ui/dist/main-015cc9721345d5b8af80.css.gz
217
+ - ui/dist/main-015cc9721345d5b8af80.js.gz
218
218
  - ui/dist/manifest.json
219
219
  homepage:
220
220
  licenses: