honey_format 0.8.1 → 0.8.2

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: c6fe52a88163c5a9bf96100e068a0c66128709872327e2048111a162d8058dbd
4
- data.tar.gz: 7f635b1522f3d16c93efaa57f191441a8667838935518ae7cf5133f0d7fea198
3
+ metadata.gz: 50238c752453380d738cfc60c2b0db25ea5f692887c39776905bed5e91aedf6b
4
+ data.tar.gz: 8cbdde37fbb98d69fa2d2f0bee3bf4eca78976fc7ff0ee93a17af630b557728f
5
5
  SHA512:
6
- metadata.gz: f9dbb76d7b1042b59d420a524cd88623c5d53af8f74bc08709b29b4d69102a05979679c48d5d606c33e763c9696c2649e841897da69577abc3f6bca61d55efd3
7
- data.tar.gz: 8c4633d67d28053b7b4abb29b6d10cd583150bf222ca77bd88edb6d9f8e63b3a8459f9604529998ec4878bbea71903251cc3208c275d0cf25715df2a8106a0fe
6
+ metadata.gz: 9c69b356e531fc429be88738e96669be8acca70a224cd80a1de87bc8caf489ac6b993eb0eac79cb93deb419a27f9e725486c1856b0698ed47c5653c902156758
7
+ data.tar.gz: ec12724d42d2bfcdf2c0fbfebd472671ea5d91250e8713cc03b6a9406943afceea89b05c5b62e3d3da76f3edd0d9b6d48ec6e134df5627dc13de25d042e02497
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # v0.8.2
2
+
3
+ * _[Bugfix]_ `#to_csv` now outputs nil values as empty string instead of `""`
4
+
1
5
  # v0.8.1
2
6
 
3
7
  * _[Bugfix]_ Properly quote cells with special CSV-characters in them. ([PR#7](https://github.com/buren/honey_format/pull/7))
@@ -12,11 +12,10 @@ module HoneyFormat
12
12
  def to_csv
13
13
  row = members.map do |column_name|
14
14
  column = public_send(column_name)
15
- if column.respond_to?(:to_csv)
16
- column.to_csv
17
- else
18
- column.to_s
19
- end
15
+ next column.to_csv if column.respond_to?(:to_csv)
16
+ next if column.nil?
17
+
18
+ column.to_s
20
19
  end
21
20
 
22
21
  ::CSV.generate_line(row)
@@ -1,4 +1,4 @@
1
1
  module HoneyFormat
2
2
  # Gem version
3
- VERSION = '0.8.1'
3
+ VERSION = '0.8.2'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honey_format
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Burenstam
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-15 00:00:00.000000000 Z
11
+ date: 2018-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler