ntq_excelsior_engine 1.1.0 → 1.1.2

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: 3c79891288740544625d31683772c350dfd222026769d1a81930646394ce1567
4
- data.tar.gz: b6fe5022f7fa908ff173cf332e6700420469f77efaa3dc6c21a239146c4e1877
3
+ metadata.gz: adc057b1e2e3be1d8c935f86ae233f0883d0b088ee62bf8ae57254295807cf6b
4
+ data.tar.gz: 7119a39155ed904925a3428294b82553d7154521fc9db7fe6d5e191cf344bc12
5
5
  SHA512:
6
- metadata.gz: 4393a059d3ca7124e79de0edb92875eabb2ad147299d254027a159ab687fe27d66c2da14e92e5ac121000fc9e7514ca27d275f0a983fb26101d02acd836742cd
7
- data.tar.gz: 4fb9e7fcc07d4f71f7df4ce13fd7739a0ec0029cd217d8675022c1fa756864ab1ba1355ab8f4da432d23f80db2ae525f99543aa9b92e713e94112a7c6441e496
6
+ metadata.gz: 3b0bd03dfed29c4d1bada5c95dea27df727259baa9750b25f8b89a4ddb4598f970aa92844fd88b804ed8a456ec0040ef307824f743d382f84163cd0ec1505c0a
7
+ data.tar.gz: e8395d599387614ae95a78ab8f74133d76779303dde776ca450741f2d108d41a1c68de42702ac7edabbeba475d3d6c1a84c461abd014e117853e7a8a3f71b2ca
@@ -1,4 +1,4 @@
1
1
  module NtqExcelsiorEngine
2
- class ApplicationController < ActionController::Base
2
+ class ApplicationController < ::ApplicationController
3
3
  end
4
4
  end
@@ -1,5 +1,5 @@
1
1
  module NtqExcelsiorEngine
2
- class ImportersController < ApplicationController
2
+ class ImportersController < NtqExcelsiorEngine::ApplicationController
3
3
  before_action :ensure_valid_importer_type!, except: [:status]
4
4
 
5
5
  def show
@@ -1,7 +1,7 @@
1
1
  require 'csv'
2
2
 
3
3
  module NtqExcelsiorEngine
4
- class ImportsController < ::ApplicationController
4
+ class ImportsController < NtqExcelsiorEngine::ApplicationController
5
5
  skip_before_action :verify_authenticity_token
6
6
  before_action :ensure_valid_importer_type!, only: [:create]
7
7
 
@@ -29,7 +29,6 @@ module NtqExcelsiorEngine
29
29
  render :status, layout: false
30
30
  end
31
31
 
32
-
33
32
  def create
34
33
  @import_file = ::NtqExcelsiorEngine::Import.new import_type: params[:type]
35
34
  @import_file.created_by = NtqExcelsiorEngine.request.whoimportit
@@ -11,6 +11,10 @@ module NtqExcelsiorEngine
11
11
  def call
12
12
  import = context.import
13
13
  importer = context.importer.new
14
+ importer.options ||= {}
15
+ importer.options.merge!({
16
+ import_id: import.id,
17
+ })
14
18
  begin
15
19
  import.update(state: 'importing')
16
20
  importer.class.before.call(importer.context, importer.options) if importer.class.before.is_a?(Proc)
@@ -7,7 +7,6 @@ module NtqExcelsiorEngine
7
7
  end
8
8
 
9
9
  def call
10
- sleep NtqExcelsiorEngine.delay_before_import if NtqExcelsiorEngine.delay_before_import > 0
11
10
  import = context.import
12
11
  importer = context.importer.new
13
12
  begin
@@ -2,7 +2,7 @@ module NtqExcelsiorEngine
2
2
  class ProcessImportJob
3
3
  include Sidekiq::Worker
4
4
  include Sidekiq::Status::Worker
5
-
5
+
6
6
  sidekiq_options queue: 'default', retry: 0
7
7
 
8
8
  def perform(id, actions = NtqExcelsiorEngine.actions_on_create.map(&:to_s).join(','))
@@ -1,3 +1,3 @@
1
1
  module NtqExcelsiorEngine
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ntq_excelsior_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-21 00:00:00.000000000 Z
11
+ date: 2024-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails