tolq-parsers-csv 0.3.0 → 0.3.1

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
  SHA1:
3
- metadata.gz: 205e1ec8ace94c2cf77ba5b546f7e45d3a897d5d
4
- data.tar.gz: d822029f449818901d1ab1e4f452b5e974c8c704
3
+ metadata.gz: adf800e42e5f26bdf2f163aa5748c2d442946c83
4
+ data.tar.gz: 413aba3f970760c04a4bba9da409f3cd5b051ccb
5
5
  SHA512:
6
- metadata.gz: cdf304eca2f197e86e4bd1d8ccf9b3de141591e2781f327af0449eb83ad208a32dcca31f219ce6f231899749a9efe0e9648a397a567ae1579ef14681531a94cc
7
- data.tar.gz: d0ec5870fa88e724bf3443247669cd079655bfca356a916a9acdb550be9e328f45256e2054192d8001efb0645e82a4ab8d65158073b885f0abc2d5b2fb6b82c8
6
+ metadata.gz: dafd5a12af86b79eee2c4d3217c79d79c88804512064b3d8b3b5630c4e6a308af95607302adf50bb3b3044cad909e3b96872f20e96e478aa4689f121c6f84635
7
+ data.tar.gz: 84dce900f344234131a12cf03c2e2b7292b00311694dc01ba32d46cc6802f6530be01d0d22cbee808fbd7d34f02f8deefe18999c14aa0384890e675c0069164f
data/lib/csv/unparser.rb CHANGED
@@ -25,7 +25,11 @@ module Tolq::Parsers::CSV
25
25
  def generate_csv(translations)
26
26
  CSV.generate(force_quotes: true) do |csv|
27
27
  build_translation_matrix(translations).each do |row|
28
- csv << row.fill(nil, row.length..@maxcol)
28
+ if row.nil? # skipped empty rows
29
+ csv << [].fill(nil, 0..@maxcol)
30
+ else
31
+ csv << row.fill(nil, row.length..@maxcol)
32
+ end
29
33
  end
30
34
  end
31
35
  end
data/lib/csv/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Tolq
2
2
  module Parsers
3
3
  module CSV
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tolq-parsers-csv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timon Vonk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-09 00:00:00.000000000 Z
11
+ date: 2017-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler