ntq_excelsior_engine 0.4.2 → 0.4.3

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: 13a03024396714dbe927960c5444dc3c6e494f58b1cc536e76149011f3fb808e
4
- data.tar.gz: 80abc920a5774e739fb8fe305a2beabc89bb10d1769d49de0fbd3e03164010e0
3
+ metadata.gz: 79db4dc538577b30956cd4d4a21876615e3b8479be890c7b40749f8da2c93003
4
+ data.tar.gz: 42afde5cc58e02d6ae8d1afe592b6f8f31c6547982917b3a7a38e01816c7635c
5
5
  SHA512:
6
- metadata.gz: 3e271e7251b5bfb9bcb0fbe33478f5913b4853ee4be499cefff0b47ea65462c6c8b4d5f458e1fa9af88df98583a6595fda7323d7ca7383fe65a5fab1df9a82bf
7
- data.tar.gz: e3a67f73dc0b58f5c64641844b582373068e5fdd151f15f12041263d0c90075b6e4675db060bc51619ea53c3b552ccb4fe76ba421eb05982f0adbd887892a038
6
+ metadata.gz: ae6b64a326bce7e2407fd53d4430c216cacc37fe94a1ac434bdf2cae9d70e995810767400cf5444053e89c72322018acaf082a797f30b18d257f4def2749fde5
7
+ data.tar.gz: 1c16c720fadbd0540f536de749fe2352dea233bc8da88f12c09d5de234c241dad0bc59786a0e12a4a80bd510ad6007e8226875025ea1a8011b5d1cba8b381709
@@ -32,6 +32,7 @@ module NtqExcelsiorEngine
32
32
 
33
33
  def create
34
34
  @import_file = ::NtqExcelsiorEngine::Import.new import_type: params[:type]
35
+ @import_file.created_by = NtqExcelsiorEngine.request.whoimportit
35
36
  @import_file.file = file_params
36
37
  yield(@import_file) if block_given?
37
38
  @import_file.inspect
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "request_store"
4
+
5
+ module NtqExcelsiorEngine
6
+ module Request
7
+ module_function
8
+
9
+ def whoimportit=(value)
10
+ store[:whoimportit] = value
11
+ end
12
+
13
+ def whoimportit
14
+ who = store[:whoimportit]
15
+ who.respond_to?(:call) ? who.call : who
16
+ end
17
+
18
+ def store
19
+ RequestStore.store[:ntq_excelsior_engine] ||= {
20
+ whoimportit: nil
21
+ }
22
+ end
23
+ end
24
+ end
@@ -1,3 +1,3 @@
1
1
  module NtqExcelsiorEngine
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
@@ -1,5 +1,6 @@
1
1
  require "ntq_excelsior_engine/version"
2
2
  require "ntq_excelsior_engine/engine"
3
+ require "ntq_excelsior_engine/request"
3
4
 
4
5
  module NtqExcelsiorEngine
5
6
  mattr_accessor :import_active
@@ -26,6 +27,9 @@ module NtqExcelsiorEngine
26
27
  mattr_accessor :skip_import_on_errors
27
28
  @@skip_import_on_errors = true
28
29
 
30
+ mattr_accessor :request
31
+ @@request = NtqExcelsiorEngine::Request
32
+
29
33
  def self.setup
30
34
  yield self
31
35
  end
metadata CHANGED
@@ -1,35 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ntq_excelsior_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-19 00:00:00.000000000 Z
11
+ date: 2023-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "<"
18
- - !ruby/object:Gem::Version
19
- version: '8'
20
17
  - - ">="
21
18
  - !ruby/object:Gem::Version
22
19
  version: '6'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '8'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "<"
28
- - !ruby/object:Gem::Version
29
- version: '8'
30
27
  - - ">="
31
28
  - !ruby/object:Gem::Version
32
29
  version: '6'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '8'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: jbuilder
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -167,6 +167,7 @@ files:
167
167
  - lib/generators/templates/ntq_excelsior_engine.rb
168
168
  - lib/ntq_excelsior_engine.rb
169
169
  - lib/ntq_excelsior_engine/engine.rb
170
+ - lib/ntq_excelsior_engine/request.rb
170
171
  - lib/ntq_excelsior_engine/version.rb
171
172
  - lib/tasks/ntq_excelsior_engine_tasks.rake
172
173
  homepage: https://github.com/9troisquarts/ntq-excelsior-engine
@@ -176,7 +177,7 @@ metadata:
176
177
  homepage_uri: https://github.com/9troisquarts/ntq-excelsior-engine
177
178
  source_code_uri: https://github.com/9troisquarts/ntq-excelsior-engine
178
179
  changelog_uri: https://github.com/9troisquarts/ntq-excelsior-engine/CHANGELOG.md
179
- post_install_message:
180
+ post_install_message:
180
181
  rdoc_options: []
181
182
  require_paths:
182
183
  - lib
@@ -191,8 +192,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
192
  - !ruby/object:Gem::Version
192
193
  version: '0'
193
194
  requirements: []
194
- rubygems_version: 3.3.7
195
- signing_key:
195
+ rubygems_version: 3.0.3.1
196
+ signing_key:
196
197
  specification_version: 4
197
198
  summary: NtqExcelsiorEngine.
198
199
  test_files: []