importo 2.0.4 → 3.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +22 -5
  3. data/Rakefile +16 -17
  4. data/app/controllers/concerns/maintenance_standards.rb +1 -1
  5. data/app/controllers/importo/imports_controller.rb +15 -12
  6. data/app/helpers/importo/application_helper.rb +11 -11
  7. data/app/importers/concerns/exportable.rb +31 -24
  8. data/app/importers/concerns/importable.rb +144 -62
  9. data/app/importers/concerns/importer_dsl.rb +6 -14
  10. data/app/importers/concerns/original.rb +23 -23
  11. data/app/importers/concerns/result_feedback.rb +62 -44
  12. data/app/importers/concerns/revertable.rb +11 -12
  13. data/app/importers/importo/base_importer.rb +16 -4
  14. data/app/importers/importo/import_job_callback.rb +29 -0
  15. data/app/jobs/importo/application_job.rb +4 -0
  16. data/app/jobs/importo/import_job.rb +40 -0
  17. data/app/jobs/importo/purge_import_job.rb +14 -0
  18. data/app/mailers/importo/application_mailer.rb +2 -2
  19. data/app/models/importo/import.rb +35 -8
  20. data/app/models/importo/result.rb +5 -0
  21. data/app/services/importo/import_service.rb +1 -3
  22. data/app/services/importo/revert_service.rb +1 -1
  23. data/app/tables/importo/imports_table.rb +13 -17
  24. data/app/tables/importo/mensa_imports_table.rb +35 -0
  25. data/app/views/importo/imports/index.html.slim +6 -2
  26. data/app/views/importo/imports/new.html.slim +30 -20
  27. data/config/locales/en.yml +21 -9
  28. data/config/locales/nl.yml +10 -4
  29. data/config/routes.rb +4 -4
  30. data/db/migrate/20180409151031_create_importo_import.rb +9 -9
  31. data/db/migrate/20180628175535_add_locale_importo_import.rb +1 -1
  32. data/db/migrate/20230510051447_remove_result_from_imports.rb +5 -0
  33. data/db/migrate/20230510083043_create_importo_results.rb +11 -0
  34. data/lib/generators/importo/importer_generator.rb +1 -1
  35. data/lib/generators/importo/install_generator.rb +7 -8
  36. data/lib/generators/importo/templates/importo.rb +11 -0
  37. data/lib/generators/satis/install_generator.rb +22 -0
  38. data/lib/generators/satis/tailwind_config_generator.rb +24 -0
  39. data/lib/generators/satis/templates/config/initializers/satis.rb +13 -0
  40. data/lib/importo/acts_as_import_owner.rb +1 -1
  41. data/lib/importo/configuration.rb +52 -49
  42. data/lib/importo/engine.rb +11 -9
  43. data/lib/importo/import_column.rb +18 -6
  44. data/lib/importo/test_helpers.rb +19 -0
  45. data/lib/importo/version.rb +1 -1
  46. data/lib/importo.rb +12 -17
  47. metadata +77 -24
  48. data/app/services/importo/callback_service.rb +0 -14
  49. data/lib/generators/templates/importo.rb +0 -21
  50. /data/lib/generators/{templates → importo/templates}/README +0 -0
  51. /data/lib/generators/{templates → importo/templates}/application_importer.rb +0 -0
  52. /data/lib/generators/{templates → importo/templates}/importer.rb +0 -0
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: importo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 3.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andre Meij
8
8
  - Tom de Grunt
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-11-07 00:00:00.000000000 Z
12
+ date: 2024-03-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: caxlsx
@@ -73,14 +73,14 @@ dependencies:
73
73
  requirements:
74
74
  - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: '1'
76
+ version: '2'
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - "~>"
82
82
  - !ruby/object:Gem::Version
83
- version: '1'
83
+ version: '2'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: servitium
86
86
  requirement: !ruby/object:Gem::Requirement
@@ -124,19 +124,61 @@ dependencies:
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0.5'
126
126
  - !ruby/object:Gem::Dependency
127
- name: state_machines-audit_trail
127
+ name: signum
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
130
  - - "~>"
131
131
  - !ruby/object:Gem::Version
132
- version: '2'
132
+ version: '0.3'
133
133
  type: :runtime
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
137
  - - "~>"
138
138
  - !ruby/object:Gem::Version
139
- version: '2'
139
+ version: '0.3'
140
+ - !ruby/object:Gem::Dependency
141
+ name: turbo-rails
142
+ requirement: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ version: '0'
147
+ type: :runtime
148
+ prerelease: false
149
+ version_requirements: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ version: '0'
154
+ - !ruby/object:Gem::Dependency
155
+ name: view_component
156
+ requirement: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ">="
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ type: :runtime
162
+ prerelease: false
163
+ version_requirements: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ - !ruby/object:Gem::Dependency
169
+ name: with_advisory_lock
170
+ requirement: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ type: :runtime
176
+ prerelease: false
177
+ version_requirements: !ruby/object:Gem::Requirement
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
140
182
  - !ruby/object:Gem::Dependency
141
183
  name: auxilium
142
184
  requirement: !ruby/object:Gem::Requirement
@@ -222,33 +264,33 @@ dependencies:
222
264
  - !ruby/object:Gem::Version
223
265
  version: '0.3'
224
266
  - !ruby/object:Gem::Dependency
225
- name: rubocop
267
+ name: solargraph
226
268
  requirement: !ruby/object:Gem::Requirement
227
269
  requirements:
228
270
  - - "~>"
229
271
  - !ruby/object:Gem::Version
230
- version: '0.49'
272
+ version: '0.47'
231
273
  type: :development
232
274
  prerelease: false
233
275
  version_requirements: !ruby/object:Gem::Requirement
234
276
  requirements:
235
277
  - - "~>"
236
278
  - !ruby/object:Gem::Version
237
- version: '0.49'
279
+ version: '0.47'
238
280
  - !ruby/object:Gem::Dependency
239
- name: solargraph
281
+ name: standard
240
282
  requirement: !ruby/object:Gem::Requirement
241
283
  requirements:
242
- - - "~>"
284
+ - - ">="
243
285
  - !ruby/object:Gem::Version
244
- version: '0.47'
286
+ version: '1'
245
287
  type: :development
246
288
  prerelease: false
247
289
  version_requirements: !ruby/object:Gem::Requirement
248
290
  requirements:
249
- - - "~>"
291
+ - - ">="
250
292
  - !ruby/object:Gem::Version
251
- version: '0.47'
293
+ version: '1'
252
294
  description: Upload xls, xlsx and csv files and import the data in rails models.
253
295
  email:
254
296
  - andre@itsmeij.com
@@ -274,16 +316,21 @@ files:
274
316
  - app/importers/concerns/result_feedback.rb
275
317
  - app/importers/concerns/revertable.rb
276
318
  - app/importers/importo/base_importer.rb
319
+ - app/importers/importo/import_job_callback.rb
320
+ - app/jobs/importo/application_job.rb
321
+ - app/jobs/importo/import_job.rb
322
+ - app/jobs/importo/purge_import_job.rb
277
323
  - app/mailers/importo/application_mailer.rb
278
324
  - app/models/importo/application_record.rb
279
325
  - app/models/importo/import.rb
326
+ - app/models/importo/result.rb
280
327
  - app/services/importo/application_context.rb
281
328
  - app/services/importo/application_service.rb
282
- - app/services/importo/callback_service.rb
283
329
  - app/services/importo/import_context.rb
284
330
  - app/services/importo/import_service.rb
285
331
  - app/services/importo/revert_service.rb
286
332
  - app/tables/importo/imports_table.rb
333
+ - app/tables/importo/mensa_imports_table.rb
287
334
  - app/views/importo/imports/index.html.slim
288
335
  - app/views/importo/imports/new.html.slim
289
336
  - config/locales/en.yml
@@ -292,25 +339,31 @@ files:
292
339
  - db/migrate/20180409151031_create_importo_import.rb
293
340
  - db/migrate/20180628175535_add_locale_importo_import.rb
294
341
  - db/migrate/20190827093548_add_selected_fields_to_import.rb
342
+ - db/migrate/20230510051447_remove_result_from_imports.rb
343
+ - db/migrate/20230510083043_create_importo_results.rb
295
344
  - lib/generators/importo/USAGE
296
345
  - lib/generators/importo/importer_generator.rb
297
346
  - lib/generators/importo/install_generator.rb
298
- - lib/generators/templates/README
299
- - lib/generators/templates/application_importer.rb
300
- - lib/generators/templates/importer.rb
301
- - lib/generators/templates/importo.rb
347
+ - lib/generators/importo/templates/README
348
+ - lib/generators/importo/templates/application_importer.rb
349
+ - lib/generators/importo/templates/importer.rb
350
+ - lib/generators/importo/templates/importo.rb
351
+ - lib/generators/satis/install_generator.rb
352
+ - lib/generators/satis/tailwind_config_generator.rb
353
+ - lib/generators/satis/templates/config/initializers/satis.rb
302
354
  - lib/importo.rb
303
355
  - lib/importo/acts_as_import_owner.rb
304
356
  - lib/importo/configuration.rb
305
357
  - lib/importo/engine.rb
306
358
  - lib/importo/import_column.rb
307
359
  - lib/importo/import_helpers.rb
360
+ - lib/importo/test_helpers.rb
308
361
  - lib/importo/version.rb
309
362
  homepage: https://github.com/entdec/importo
310
363
  licenses:
311
364
  - MIT
312
365
  metadata: {}
313
- post_install_message:
366
+ post_install_message:
314
367
  rdoc_options: []
315
368
  require_paths:
316
369
  - lib
@@ -325,8 +378,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
325
378
  - !ruby/object:Gem::Version
326
379
  version: '0'
327
380
  requirements: []
328
- rubygems_version: 3.3.7
329
- signing_key:
381
+ rubygems_version: 3.4.10
382
+ signing_key:
330
383
  specification_version: 4
331
384
  summary: Rails engine allowing uploads and imports
332
385
  test_files: []
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Importo
4
- class CallbackService < ApplicationService
5
- context do
6
- attribute :import
7
- attribute :callback
8
- end
9
-
10
- def perform
11
- Importo.config.import_callback(context.import, context.callback)
12
- end
13
- end
14
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- Importo.setup do |config|
4
- config.base_controller = '::ApplicationController'
5
- config.admin_authentication_module = 'Authenticated'
6
-
7
- # Current import owner
8
- config.current_import_owner = -> { User.current }
9
-
10
- # Set callbacks for the import states. You can configure callbacks to work with different states
11
- config.import_callbacks = {
12
- importing: lambda do |import|
13
- end,
14
- completed: lambda do |import|
15
- end,
16
- failed: lambda do |import|
17
- end
18
- }
19
-
20
- config.queue_name = :import
21
- end