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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/honey_format/value_converter.rb +2 -0
- data/lib/honey_format/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94ea71ae5f48d46c64294767a6e52f2b47971e7cb578418e8947a7abfbd188a0
|
4
|
+
data.tar.gz: df93394a4afd2cf7e7cff2d9c25f185febfb57b7b400d28cc7b2d703e6a2d0c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c95d38ebe74e9f1ace21c9ac8cb3e60dfbcd102996d8151a0dfc0c37e927a52ae9396a8b6f291160b69167bd4e6c2254a9f6290ef3e59b3a04d035dff06c124
|
7
|
+
data.tar.gz: f15d755c122826a0c20de5918e248a1e100b89d4b933569614a2732d2aed5300fbb4c252ce51a67d8f0a27cc2c4064383b246e3fe59b67ddab7e6ccec4f5568c
|
data/CHANGELOG.md
CHANGED
@@ -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 },
|
data/lib/honey_format/version.rb
CHANGED