motor-admin 0.1.41 → 0.1.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e199bcfee455dceb3c76240eedc692aa869143ebc5521b3b1c7c6ebacc0ff7ec
4
- data.tar.gz: 979bd32b1670d8b455a84027979b6e7274ebe5805424382b04fb25ae2cc761d3
3
+ metadata.gz: 6b5c8de183eb4dca0deba15c13f4e17a5cd4b6042ba2aa72e69e4056f0dd07bb
4
+ data.tar.gz: 5696598a4d1a461fb401b6bd6b9036dbe8ac8d31ce71d8e19edabb0e68b4fa91
5
5
  SHA512:
6
- metadata.gz: 1dfc0454884759ce1d2ccb9d71acb083200465e5bc153ab4f0d4dc69492ac5d9d82e3b5525af1e6a332e4152073aa7d072c8f2031ca80469964a2976892b749b
7
- data.tar.gz: 311d119be7294aa3da85619543fa7a502be9a602ef72feaf524d263ead9fd10e48fd0c29ae5ad01874d7bb4178eed6173471acdf00b1a824734b098e8bd4e82b
6
+ metadata.gz: 05e81845c5be4540e7062b945b7ca21a51c197a6c540da1ce747fc478f8105e4e80b375bcf708a1e2b634fffe732c6024fa0626a77baaddfc99eb8bdbdcc6d4e
7
+ data.tar.gz: 581692e4333bdcde696190897b810206cc7cc222d8a82796d8ba098130b76801b843e6a72b791ba0b8a1aca1686ed88cb14c5c0161953f21273628ae811c55c5
@@ -1,6 +1,6 @@
1
1
  class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Migration.current_version %>]
2
2
  def self.up
3
- create_table :motor_queries, force: true do |t|
3
+ create_table :motor_queries do |t|
4
4
  t.column :name, :string, null: false
5
5
  t.column :description, :string
6
6
  t.column :sql_body, :string, null: false
@@ -18,7 +18,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Mi
18
18
  where: 'deleted_at IS NULL'
19
19
  end
20
20
 
21
- create_table :motor_dashboards, force: true do |t|
21
+ create_table :motor_dashboards do |t|
22
22
  t.column :title, :string, null: false
23
23
  t.column :description, :string
24
24
  t.column :preferences, :string, null: false, default: '{}'
@@ -35,7 +35,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Mi
35
35
  where: 'deleted_at IS NULL'
36
36
  end
37
37
 
38
- create_table :motor_forms, force: true do |t|
38
+ create_table :motor_forms do |t|
39
39
  t.column :name, :string, null: false
40
40
  t.column :description, :string
41
41
  t.column :api_path, :string, null: false
@@ -54,7 +54,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Mi
54
54
  where: 'deleted_at IS NULL'
55
55
  end
56
56
 
57
- create_table :motor_resources, force: true do |t|
57
+ create_table :motor_resources do |t|
58
58
  t.column :name, :string, null: false, index: { unique: true }
59
59
  t.column :preferences, :string, null: false, default: '{}'
60
60
 
@@ -63,7 +63,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Mi
63
63
  t.index :updated_at
64
64
  end
65
65
 
66
- create_table :motor_configs, force: true do |t|
66
+ create_table :motor_configs do |t|
67
67
  t.column :key, :string, null: false, index: { unique: true }
68
68
  t.column :value, :string, null: false, default: '{}'
69
69
 
@@ -72,7 +72,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Mi
72
72
  t.index :updated_at
73
73
  end
74
74
 
75
- create_table :motor_alerts, force: true do |t|
75
+ create_table :motor_alerts do |t|
76
76
  t.references :query, null: false, foreign_key: { to_table: :motor_queries }, index: true
77
77
  t.column :name, :string, null: false
78
78
  t.column :description, :string
@@ -92,7 +92,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Mi
92
92
  where: 'deleted_at IS NULL'
93
93
  end
94
94
 
95
- create_table :motor_alert_locks, force: true do |t|
95
+ create_table :motor_alert_locks do |t|
96
96
  t.references :alert, null: false, foreign_key: { to_table: :motor_alerts }
97
97
  t.column :lock_timestamp, :string, null: false
98
98
 
@@ -101,7 +101,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Mi
101
101
  t.index %i[alert_id lock_timestamp], unique: true
102
102
  end
103
103
 
104
- create_table :motor_tags, force: true do |t|
104
+ create_table :motor_tags do |t|
105
105
  t.column :name, :string, null: false
106
106
 
107
107
  t.timestamps
@@ -111,7 +111,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Mi
111
111
  unique: true
112
112
  end
113
113
 
114
- create_table :motor_taggable_tags, force: true do |t|
114
+ create_table :motor_taggable_tags do |t|
115
115
  t.references :tag, null: false, foreign_key: { to_table: :motor_tags }, index: true
116
116
  t.column :taggable_id, :integer, null: false
117
117
  t.column :taggable_type, :string, null: false
@@ -121,7 +121,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Mi
121
121
  unique: true
122
122
  end
123
123
 
124
- create_table :motor_audits, force: true do |t|
124
+ create_table :motor_audits do |t|
125
125
  t.column :auditable_id, :integer
126
126
  t.column :auditable_type, :string
127
127
  t.column :associated_id, :integer
@@ -3,35 +3,37 @@
3
3
  module Motor
4
4
  module BuildSchema
5
5
  module FindDisplayColumn
6
- DISPLAY_NAMES = %w[
7
- name
8
- full_name
9
- fullname
10
- last_name
11
- lastname
12
- first_name
13
- firstname
14
- fname
15
- lname
16
- sname
17
- company
18
- domain
19
- title
20
- phone
21
- phone_number
22
- email
23
- phone
24
- filename
25
- file_name
26
- url
27
- make
28
- brand
29
- manufacturer
30
- model
31
- address
32
- ].freeze
33
-
34
- DISPLAY_NAME_REGEXP = Regexp.new(Regexp.union(DISPLAY_NAMES).source, Regexp::IGNORECASE)
6
+ DISPLAY_NAMES = Set.new(
7
+ %w[
8
+ name
9
+ full_name
10
+ fullname
11
+ last_name
12
+ lastname
13
+ first_name
14
+ firstname
15
+ fname
16
+ lname
17
+ sname
18
+ company
19
+ domain
20
+ title
21
+ phone
22
+ phone_number
23
+ email
24
+ phone
25
+ filename
26
+ file_name
27
+ url
28
+ make
29
+ brand
30
+ manufacturer
31
+ model
32
+ address
33
+ ]
34
+ ).freeze
35
+
36
+ DISPLAY_NAME_REGEXP = Regexp.new(Regexp.union(DISPLAY_NAMES.to_a).source, Regexp::IGNORECASE)
35
37
 
36
38
  module_function
37
39
 
@@ -42,7 +44,7 @@ module Motor
42
44
  end
43
45
 
44
46
  def select_column_name(column_names)
45
- name = DISPLAY_NAMES.find { |column_name| column_name.in?(column_names) }
47
+ name = column_names.find { |column_name| column_name.in?(DISPLAY_NAMES) }
46
48
  name ||= column_names.find { |column_name| column_name.match?(DISPLAY_NAME_REGEXP) }
47
49
 
48
50
  name
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.41'
4
+ VERSION = '0.1.42'
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-0ef3be65da8d3b0dbabb.css.gz": "main-0ef3be65da8d3b0dbabb.css.gz",
9
- "main-0ef3be65da8d3b0dbabb.js.LICENSE.txt": "main-0ef3be65da8d3b0dbabb.js.LICENSE.txt",
10
- "main-0ef3be65da8d3b0dbabb.js.gz": "main-0ef3be65da8d3b0dbabb.js.gz",
11
- "main.css": "main-0ef3be65da8d3b0dbabb.css",
12
- "main.js": "main-0ef3be65da8d3b0dbabb.js"
8
+ "main-05401628fabd32884fa6.css.gz": "main-05401628fabd32884fa6.css.gz",
9
+ "main-05401628fabd32884fa6.js.LICENSE.txt": "main-05401628fabd32884fa6.js.LICENSE.txt",
10
+ "main-05401628fabd32884fa6.js.gz": "main-05401628fabd32884fa6.js.gz",
11
+ "main.css": "main-05401628fabd32884fa6.css",
12
+ "main.js": "main-05401628fabd32884fa6.js"
13
13
  }
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.1.41
4
+ version: 0.1.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Matsyburka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-16 00:00:00.000000000 Z
11
+ date: 2021-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord-filter
@@ -242,8 +242,8 @@ files:
242
242
  - lib/motor/tasks/motor.rake
243
243
  - lib/motor/version.rb
244
244
  - ui/dist/fonts/ionicons.woff2
245
- - ui/dist/main-0ef3be65da8d3b0dbabb.css.gz
246
- - ui/dist/main-0ef3be65da8d3b0dbabb.js.gz
245
+ - ui/dist/main-05401628fabd32884fa6.css.gz
246
+ - ui/dist/main-05401628fabd32884fa6.js.gz
247
247
  - ui/dist/manifest.json
248
248
  homepage:
249
249
  licenses: