tallty_import_export 1.0.32 → 1.0.33
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tallty_import_export/import.rb +5 -5
- data/lib/tallty_import_export/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27824038474eaaac3d03896f311952b08a41bec424d8a5e360ee8814cf439e02
|
4
|
+
data.tar.gz: b357c47d9b2ac449b58d9bc8c15c524e3ab4cf65342ca7b1df54ef834d48636b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46b8963859ceac6a7cfaaf734aa5a32421f0d8f20800db4eaef6b21aa3a54c4d892ffa5d2f42c31224d50cff958d7acb661777c877f8bb13e790cdb009b9edb2
|
7
|
+
data.tar.gz: 0c8f53e6a57eace206218376aa038f589bedc80fe4e1043ec2a85f238150216a888152942e0a68216d2d80d7b4c191fc845e16b0483b264f35e80c9248109c33
|
@@ -27,7 +27,7 @@ module TalltyImportExport
|
|
27
27
|
|
28
28
|
if TalltyImportExport::Excel === xlsx_file
|
29
29
|
xlsx_file.rows.each_with_excel_hash(@excel_hash) do |line_info|
|
30
|
-
process_line_info(line_info, associations)
|
30
|
+
process_line_info(line_info.with_indifferent_access, associations)
|
31
31
|
end
|
32
32
|
else
|
33
33
|
file_path = xlsx_file.is_a?(String) ? xlsx_file : xlsx_file.path
|
@@ -35,7 +35,7 @@ module TalltyImportExport
|
|
35
35
|
xlsx.each_with_pagename do |_sheetname, sheet|
|
36
36
|
sheet.each(**@excel_hash).with_index do |line_info, index|
|
37
37
|
next if index == 0
|
38
|
-
process_line_info(line_info, associations)
|
38
|
+
process_line_info(line_info.with_indifferent_access, associations)
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
@@ -44,7 +44,7 @@ module TalltyImportExport
|
|
44
44
|
def import_data data, associations, **options
|
45
45
|
process_options(options)
|
46
46
|
TalltyImportExport::Excel::Rows.new(data).each_with_excel_hash(@excel_hash) do |line_info|
|
47
|
-
process_line_info(line_info, associations)
|
47
|
+
process_line_info(line_info.with_indifferent_access, associations)
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
@@ -116,8 +116,8 @@ module TalltyImportExport
|
|
116
116
|
import_header_hash = import_headers.to_h { |header| [header.with_indifferent_access[:key], header] }.with_indifferent_access
|
117
117
|
@headers.map do |header|
|
118
118
|
key = header[:key]
|
119
|
-
if import_header_hash.
|
120
|
-
header[:proc] = import_header_hash.
|
119
|
+
if import_header_hash.dig(key, :proc).present?
|
120
|
+
header[:proc] = import_header_hash.dig(key, :proc)
|
121
121
|
end
|
122
122
|
header
|
123
123
|
end
|