honey_format 0.13.0 → 0.14.0

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: 0c4d5fc0d404dc7820a766b51307451f8900497495e51b42414498c569dbf782
4
- data.tar.gz: 96faa29782adeb254a1a8c3e9a4a2a2f19bd88d261bce4a96675ad9f234d6ae4
3
+ metadata.gz: 94ea71ae5f48d46c64294767a6e52f2b47971e7cb578418e8947a7abfbd188a0
4
+ data.tar.gz: df93394a4afd2cf7e7cff2d9c25f185febfb57b7b400d28cc7b2d703e6a2d0c6
5
5
  SHA512:
6
- metadata.gz: 6dd3cd150abd94f14b9f4416b2dc5d42756b1901f963144e8850cafe344ce657443f188d32d4cc008437a3d42430cda9b02a0d25f741f0417ede3b838cc848a8
7
- data.tar.gz: 0ec2641fc7346b44376460a8587a70248f7f61d249d3277e6a9a50f7d2f2f8b7ad8225f4f1bb4e1d797ee6adc85242026acb71ec9c8526499f403b86bd608d6c
6
+ metadata.gz: 5c95d38ebe74e9f1ace21c9ac8cb3e60dfbcd102996d8151a0dfc0c37e927a52ae9396a8b6f291160b69167bd4e6c2254a9f6290ef3e59b3a04d035dff06c124
7
+ data.tar.gz: f15d755c122826a0c20de5918e248a1e100b89d4b933569614a2732d2aed5300fbb4c252ce51a67d8f0a27cc2c4064383b246e3fe59b67ddab7e6ccec4f5568c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # HEAD
2
2
 
3
+ # v0.14.0
4
+
5
+ * Additional converters
6
+ + `integer_or_zero`
7
+ + `decimal_or_zero`
8
+
3
9
  # v0.13.0
4
10
 
5
11
  :warning: This release contains some backwards compatible changes.
@@ -39,7 +39,9 @@ module HoneyFormat
39
39
  },
40
40
  # safe variants
41
41
  decimal: proc { |v| Float(v) rescue nil },
42
+ decimal_or_zero: proc { |v| Float(v) rescue 0.0 },
42
43
  integer: proc { |v| Integer(v) rescue nil },
44
+ integer_or_zero: proc { |v| Integer(v) rescue 0 },
43
45
  date: proc { |v| Date.parse(v) rescue nil },
44
46
  datetime: proc { |v| Time.parse(v) rescue nil },
45
47
  symbol: proc { |v| v&.to_sym },
@@ -1,4 +1,4 @@
1
1
  module HoneyFormat
2
2
  # Gem version
3
- VERSION = '0.13.0'
3
+ VERSION = '0.14.0'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honey_format
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Burenstam