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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc07ae6791e3abfee248a3dd1413dad877cdc1e262bf0b93f3d79d73ba37e22e
4
- data.tar.gz: b90999b8e70f6d3ecdf96ecfa2eb086ac2ff0a99abeaec0e11f45f887fc5ce14
3
+ metadata.gz: 27824038474eaaac3d03896f311952b08a41bec424d8a5e360ee8814cf439e02
4
+ data.tar.gz: b357c47d9b2ac449b58d9bc8c15c524e3ab4cf65342ca7b1df54ef834d48636b
5
5
  SHA512:
6
- metadata.gz: fa462f47d3f0b4b09d3a759a9c64b3b3e358d4398e2e7f6667cd929dd8d0f7b5b825ea7428a8c8d6c0d26c068399e9745fc8d3137619ebc30810f8a2dc338958
7
- data.tar.gz: 7fd7387e232a4b5be306f4e1c9d5b5836ab257e78b9ed45cc3092ce4e85201a91323c9cffda041f356951f59aa02bcda3c7ff36ce8834e970b9f02d00098f0ac
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.fetch(key)&.fetch(:proc).present?
120
- header[:proc] = import_header_hash.fetch(key)&.fetch(:proc)
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
@@ -1,3 +1,3 @@
1
1
  module TalltyImportExport
2
- VERSION = "1.0.32"
2
+ VERSION = "1.0.33"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tallty_import_export
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.32
4
+ version: 1.0.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - liyijie