tallty_import_export 1.0.9 → 1.0.14

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: 8caa796932bff10fefba6f63f2d084488b1fcb2dd102f7fb1d3d8c84b4500244
4
- data.tar.gz: c46cdba654ab877946f7810d6d634c0ba326b882d9b177fba7dd17ed1b4350d9
3
+ metadata.gz: afdaeaa5f7a0eab21b85fdd7aafa0677afba151a2564fd0fdd1a9916132af0f2
4
+ data.tar.gz: ae51318bbda8fe1c37533ad29c34a64c9c5d52e2a3b9e7bcb491c8cee1039cd2
5
5
  SHA512:
6
- metadata.gz: 5d22ead9b9e98e6d2e23672bddcc2b187bea2287f2702c9b83a8bb3e32dc249c4e11d655b7bd2b2c68954bea7998ec4ff80e555ed93b5de8f7467fded4e2508c
7
- data.tar.gz: efc7da3bd4d17e2878fb2721948ccfabbbdb16b91981982be07b33f8165aa56e8b66dfb61e3242abb1773507bebd7b18cdfa891b601b55a64c3cc4356f586b5d
6
+ metadata.gz: b6966aa85b471dd960fa05ae537c4f1b6938efe30635d0261ec5763e66bd83cf8de5252831ddb46fdb248eeac3c622df52594f88738e8312a958b2bf734891d3
7
+ data.tar.gz: 252f71c459a9b1034a32b75421474671df4568145c0f33f19cbdb6f83fb42ee7f210e9dcff83a7ee65fdea42db11b52d03a3df8f287e3ede74bb25f231ee56be
@@ -174,6 +174,8 @@ module TalltyImportExport
174
174
  # 根据数据类型 attr_type 进行数据的格式化
175
175
  def handle_format data, header
176
176
  case header[:attr_type].to_s
177
+ when 'string'
178
+ data.to_s
177
179
  when 'datetime'
178
180
  data ? data.strftime('%F %H:%M') : nil
179
181
  when 'date'
@@ -51,7 +51,7 @@ module TalltyImportExport
51
51
 
52
52
  def process_options options
53
53
  options = options.with_indifferent_access
54
- @headers = options.delete(:headers)
54
+ @headers = options.delete(:headers) || import_headers
55
55
  @primary_keys = options.delete(:primary_keys) || @headers.map { |header| header[:primary_key] ? header[:key].to_sym : nil }.compact
56
56
 
57
57
  @excel_hash = @headers.reduce({}) do |h, header|
@@ -1,3 +1,3 @@
1
1
  module TalltyImportExport
2
- VERSION = "1.0.9"
2
+ VERSION = "1.0.14"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tallty_import_export
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - liyijie
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-29 00:00:00.000000000 Z
11
+ date: 2021-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zip-zip
@@ -149,8 +149,6 @@ files:
149
149
  - lib/tallty_import_export/import.rb
150
150
  - lib/tallty_import_export/importable.rb
151
151
  - lib/tallty_import_export/version.rb
152
- - tallty_import_export-1.0.3.gem
153
- - tallty_import_export-1.0.5.gem
154
152
  - tallty_import_export.gemspec
155
153
  homepage: https://git.tallty.com/open-source/tallty_import_export
156
154
  licenses:
Binary file
Binary file