importo 2.0.5 → 3.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -5
- data/Rakefile +16 -17
- data/app/controllers/concerns/maintenance_standards.rb +1 -1
- data/app/controllers/importo/imports_controller.rb +15 -12
- data/app/helpers/importo/application_helper.rb +11 -11
- data/app/importers/concerns/exportable.rb +31 -24
- data/app/importers/concerns/importable.rb +144 -62
- data/app/importers/concerns/importer_dsl.rb +6 -14
- data/app/importers/concerns/original.rb +23 -23
- data/app/importers/concerns/result_feedback.rb +62 -44
- data/app/importers/concerns/revertable.rb +11 -12
- data/app/importers/importo/base_importer.rb +16 -4
- data/app/importers/importo/import_job_callback.rb +29 -0
- data/app/jobs/importo/import_job.rb +40 -0
- data/app/mailers/importo/application_mailer.rb +2 -2
- data/app/models/importo/import.rb +35 -8
- data/app/models/importo/result.rb +5 -0
- data/app/services/importo/import_service.rb +1 -3
- data/app/services/importo/revert_service.rb +1 -1
- data/app/tables/importo/imports_table.rb +13 -17
- data/app/tables/importo/mensa_imports_table.rb +35 -0
- data/app/views/importo/imports/index.html.slim +6 -2
- data/app/views/importo/imports/new.html.slim +30 -20
- data/config/locales/en.yml +21 -9
- data/config/locales/nl.yml +10 -4
- data/config/routes.rb +4 -4
- data/db/migrate/20180409151031_create_importo_import.rb +9 -9
- data/db/migrate/20180628175535_add_locale_importo_import.rb +1 -1
- data/db/migrate/20230510051447_remove_result_from_imports.rb +5 -0
- data/db/migrate/20230510083043_create_importo_results.rb +11 -0
- data/lib/generators/importo/importer_generator.rb +1 -1
- data/lib/generators/importo/install_generator.rb +7 -8
- data/lib/generators/importo/templates/importo.rb +11 -0
- data/lib/generators/satis/install_generator.rb +22 -0
- data/lib/generators/satis/tailwind_config_generator.rb +24 -0
- data/lib/generators/satis/templates/config/initializers/satis.rb +13 -0
- data/lib/importo/acts_as_import_owner.rb +1 -1
- data/lib/importo/configuration.rb +52 -49
- data/lib/importo/engine.rb +11 -9
- data/lib/importo/import_column.rb +18 -6
- data/lib/importo/test_helpers.rb +19 -0
- data/lib/importo/version.rb +1 -1
- data/lib/importo.rb +12 -17
- metadata +75 -24
- data/app/services/importo/callback_service.rb +0 -14
- data/lib/generators/templates/importo.rb +0 -21
- /data/lib/generators/{templates → importo/templates}/README +0 -0
- /data/lib/generators/{templates → importo/templates}/application_importer.rb +0 -0
- /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:
|
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:
|
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: '
|
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: '
|
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:
|
127
|
+
name: signum
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
130
|
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: '
|
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: '
|
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:
|
267
|
+
name: solargraph
|
226
268
|
requirement: !ruby/object:Gem::Requirement
|
227
269
|
requirements:
|
228
270
|
- - "~>"
|
229
271
|
- !ruby/object:Gem::Version
|
230
|
-
version: '0.
|
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.
|
279
|
+
version: '0.47'
|
238
280
|
- !ruby/object:Gem::Dependency
|
239
|
-
name:
|
281
|
+
name: standard
|
240
282
|
requirement: !ruby/object:Gem::Requirement
|
241
283
|
requirements:
|
242
|
-
- - "
|
284
|
+
- - ">="
|
243
285
|
- !ruby/object:Gem::Version
|
244
|
-
version: '
|
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: '
|
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,18 +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
|
277
320
|
- app/jobs/importo/application_job.rb
|
321
|
+
- app/jobs/importo/import_job.rb
|
278
322
|
- app/jobs/importo/purge_import_job.rb
|
279
323
|
- app/mailers/importo/application_mailer.rb
|
280
324
|
- app/models/importo/application_record.rb
|
281
325
|
- app/models/importo/import.rb
|
326
|
+
- app/models/importo/result.rb
|
282
327
|
- app/services/importo/application_context.rb
|
283
328
|
- app/services/importo/application_service.rb
|
284
|
-
- app/services/importo/callback_service.rb
|
285
329
|
- app/services/importo/import_context.rb
|
286
330
|
- app/services/importo/import_service.rb
|
287
331
|
- app/services/importo/revert_service.rb
|
288
332
|
- app/tables/importo/imports_table.rb
|
333
|
+
- app/tables/importo/mensa_imports_table.rb
|
289
334
|
- app/views/importo/imports/index.html.slim
|
290
335
|
- app/views/importo/imports/new.html.slim
|
291
336
|
- config/locales/en.yml
|
@@ -294,25 +339,31 @@ files:
|
|
294
339
|
- db/migrate/20180409151031_create_importo_import.rb
|
295
340
|
- db/migrate/20180628175535_add_locale_importo_import.rb
|
296
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
|
297
344
|
- lib/generators/importo/USAGE
|
298
345
|
- lib/generators/importo/importer_generator.rb
|
299
346
|
- lib/generators/importo/install_generator.rb
|
300
|
-
- lib/generators/templates/README
|
301
|
-
- lib/generators/templates/application_importer.rb
|
302
|
-
- lib/generators/templates/importer.rb
|
303
|
-
- 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
|
304
354
|
- lib/importo.rb
|
305
355
|
- lib/importo/acts_as_import_owner.rb
|
306
356
|
- lib/importo/configuration.rb
|
307
357
|
- lib/importo/engine.rb
|
308
358
|
- lib/importo/import_column.rb
|
309
359
|
- lib/importo/import_helpers.rb
|
360
|
+
- lib/importo/test_helpers.rb
|
310
361
|
- lib/importo/version.rb
|
311
362
|
homepage: https://github.com/entdec/importo
|
312
363
|
licenses:
|
313
364
|
- MIT
|
314
365
|
metadata: {}
|
315
|
-
post_install_message:
|
366
|
+
post_install_message:
|
316
367
|
rdoc_options: []
|
317
368
|
require_paths:
|
318
369
|
- lib
|
@@ -327,8 +378,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
327
378
|
- !ruby/object:Gem::Version
|
328
379
|
version: '0'
|
329
380
|
requirements: []
|
330
|
-
rubygems_version: 3.
|
331
|
-
signing_key:
|
381
|
+
rubygems_version: 3.4.10
|
382
|
+
signing_key:
|
332
383
|
specification_version: 4
|
333
384
|
summary: Rails engine allowing uploads and imports
|
334
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
|
File without changes
|
File without changes
|
File without changes
|