motor-admin 0.2.76 → 0.2.79

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: 18e2c93dd34d0ae77436e9df549dcbe2ef0d3a2db500189a8ee62006937be637
4
- data.tar.gz: 4bc2541c6982b92a852de17952a1002113bdf54daa8cdfc2cc517ff24e3986df
3
+ metadata.gz: 10043b4f4322fa7e056f572c1679a262aa7e1ec0543be3f8db6763a5eef70518
4
+ data.tar.gz: b7b9dd3763e28a70d4c3b472d8169c83ac271d9b383530c6eefe4f57a9fdc07e
5
5
  SHA512:
6
- metadata.gz: cef668b01fcd5a5dcb3aaa5cb801f8723d7b4ce9a9641550d1da8ac8643d6dbd1ea76ac41c8652cbe35a50b3f074d354a80b71770188383057471033aff06f14
7
- data.tar.gz: e5bdbb4a1f4134fd13e60b30c913f5ef2290295007b73ba74238bcebc52206033b5262d96b15271e6cf39cde04aacf36c752d03bcf0683913e606059f82dcf4d
6
+ metadata.gz: dc193d263ab4d7730c81f75e54e29a7e394077da39a9006c4a2d048218df0acd22d541d3a39facdb3770d97b2339c7e86a567b7707bb7b89ee5764f2193c619d
7
+ data.tar.gz: d250a26bcb90a9f236367a33dc89750e28e6f5e4ebc1de72cbcac85600c6e421659a3863274d19080b13075e186891fb3bbaf191f61367cbeeac81e170a6b958
@@ -307,6 +307,7 @@ el:
307
307
  there_are_unsaved_changes_close_form: "There are unsaved changes. Close form?"
308
308
  send_file_url: Send file URL
309
309
  rating: Rating
310
+ total: Total
310
311
  i:
311
312
  locale: el
312
313
  select:
@@ -312,3 +312,4 @@ en:
312
312
  there_are_unsaved_changes_close_form: "There are unsaved changes. Close form?"
313
313
  send_file_url: Send file URL
314
314
  rating: Rating
315
+ total: Total
@@ -307,6 +307,7 @@ es:
307
307
  there_are_unsaved_changes_close_form: "There are unsaved changes. Close form?"
308
308
  send_file_url: Send file URL
309
309
  rating: Rating
310
+ total: Total
310
311
  i:
311
312
  locale: es
312
313
  select:
@@ -303,6 +303,7 @@ pt:
303
303
  there_are_unsaved_changes_close_form: "There are unsaved changes. Close form?"
304
304
  send_file_url: Send file URL
305
305
  rating: Rating
306
+ total: Total
306
307
  i:
307
308
  locale: pt
308
309
  select:
@@ -67,6 +67,8 @@ module Motor
67
67
 
68
68
  record.update!(attrs)
69
69
  end
70
+
71
+ ActiveRecordUtils.reset_id_sequence!(Motor::Config)
70
72
  end
71
73
 
72
74
  def sync_api_configs(configs_hash)
@@ -83,6 +85,8 @@ module Motor
83
85
  end
84
86
 
85
87
  archive_api_configs(configs_index, configs_hash[:api_configs])
88
+
89
+ ActiveRecordUtils.reset_id_sequence!(Motor::ApiConfig)
86
90
  end
87
91
 
88
92
  def archive_api_configs(configs_index, api_configs)
@@ -91,6 +95,7 @@ module Motor
91
95
  end
92
96
  end
93
97
 
98
+ # rubocop:disable Metrics/AbcSize
94
99
  def sync_resources(configs_hash)
95
100
  resources_index = Motor::Configs::LoadFromCache.load_resources.index_by(&:name)
96
101
 
@@ -105,7 +110,10 @@ module Motor
105
110
  record.updated_at_will_change!
106
111
  record.update!(attrs)
107
112
  end
113
+
114
+ ActiveRecordUtils.reset_id_sequence!(Motor::Resource)
108
115
  end
116
+ # rubocop:enable Metrics/AbcSize
109
117
 
110
118
  def sync_taggable(records, config_items, configs_timestamp, update_proc)
111
119
  processed_records, create_items = update_taggable_items(records, config_items, update_proc)
data/lib/motor/configs.rb CHANGED
@@ -10,6 +10,16 @@ module Motor
10
10
 
11
11
  module_function
12
12
 
13
+ def clear
14
+ Motor::Resource.destroy_all
15
+ Motor::Alert.destroy_all
16
+ Motor::Query.destroy_all
17
+ Motor::Dashboard.destroy_all
18
+ Motor::Form.destroy_all
19
+ Motor::ApiConfig.destroy_all
20
+ Motor::Config.destroy_all
21
+ end
22
+
13
23
  # @return [String]
14
24
  def file_path
15
25
  if Rails.root.to_s.start_with?(MEMFS_PATH)
@@ -21,6 +21,15 @@ namespace :motor do
21
21
  puts '✅ configs have been loaded from configs/motor.yml'
22
22
  end
23
23
 
24
+ task reload: :environment do
25
+ ActiveRecord::Base.transaction do
26
+ Motor::Configs.clear
27
+ Motor::Configs::SyncFromFile.call(with_exception: true)
28
+ end
29
+
30
+ puts '✅ configs have been loaded from configs/motor.yml'
31
+ end
32
+
24
33
  desc 'Synchronize configs with remote application'
25
34
 
26
35
  task sync: :environment do
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.2.76'
4
+ VERSION = '0.2.79'
5
5
  end
@@ -3961,9 +3961,9 @@
3961
3961
  "icons/zoom-pan.svg.gz": "icons/zoom-pan.svg.gz",
3962
3962
  "icons/zoom-question.svg": "icons/zoom-question.svg",
3963
3963
  "icons/zoom-question.svg.gz": "icons/zoom-question.svg.gz",
3964
- "main-490384ed80aab6944eff.css.gz": "main-490384ed80aab6944eff.css.gz",
3965
- "main-490384ed80aab6944eff.js.LICENSE.txt": "main-490384ed80aab6944eff.js.LICENSE.txt",
3966
- "main-490384ed80aab6944eff.js.gz": "main-490384ed80aab6944eff.js.gz",
3967
- "main.css": "main-490384ed80aab6944eff.css",
3968
- "main.js": "main-490384ed80aab6944eff.js"
3964
+ "main-dfff41ec5f382c46a787.css.gz": "main-dfff41ec5f382c46a787.css.gz",
3965
+ "main-dfff41ec5f382c46a787.js.LICENSE.txt": "main-dfff41ec5f382c46a787.js.LICENSE.txt",
3966
+ "main-dfff41ec5f382c46a787.js.gz": "main-dfff41ec5f382c46a787.js.gz",
3967
+ "main.css": "main-dfff41ec5f382c46a787.css",
3968
+ "main.js": "main-dfff41ec5f382c46a787.js"
3969
3969
  }
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.2.76
4
+ version: 0.2.79
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Matsyburka
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-23 00:00:00.000000000 Z
11
+ date: 2022-06-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord-filter
@@ -2213,8 +2213,8 @@ files:
2213
2213
  - ui/dist/icons/zoom-out.svg.gz
2214
2214
  - ui/dist/icons/zoom-pan.svg.gz
2215
2215
  - ui/dist/icons/zoom-question.svg.gz
2216
- - ui/dist/main-490384ed80aab6944eff.css.gz
2217
- - ui/dist/main-490384ed80aab6944eff.js.gz
2216
+ - ui/dist/main-dfff41ec5f382c46a787.css.gz
2217
+ - ui/dist/main-dfff41ec5f382c46a787.js.gz
2218
2218
  - ui/dist/manifest.json
2219
2219
  homepage:
2220
2220
  licenses: