tomlib 0.3.0 → 0.4.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 +4 -0
- data/lib/tomlib/dumper.rb +2 -2
- data/lib/tomlib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb163d03d5ca307ad810914faacadd2ba5650d01d6ed7458849be829cd0d080b
|
4
|
+
data.tar.gz: a4e213b0ae1d737d9fd13f0e01381a20a3bf5bfcfa35c8d5021b120b51e1e96c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 943608fb548cb2448e83191cacb95aea330fd60a0bdb117c0fd96f2b2adc885f2b8ec2f46bfa455531d3308bee239f6d0996a95f8322e33282580813658d542e
|
7
|
+
data.tar.gz: 71132c66ba2eaa88cbb7607c847e82883c0f0ffc3aa601e464d7131b2a15406702d1221a4607cc2d3cd9c597670e2be77c7f0afa023b08928f8ab052ffe98ea7
|
data/CHANGELOG.md
CHANGED
data/lib/tomlib/dumper.rb
CHANGED
@@ -74,7 +74,7 @@ module Tomlib
|
|
74
74
|
end
|
75
75
|
|
76
76
|
footer << dump_hash(value, compound_key, skip ? indent_level : indent_level + 1)
|
77
|
-
elsif value.is_a?(Array) && value.all? { |e| e.is_a?(Hash) }
|
77
|
+
elsif value.is_a?(Array) && !value.empty? && value.all? { |e| e.is_a?(Hash) }
|
78
78
|
compound_key = to_toml_compound_key(base_key, toml_key)
|
79
79
|
indent = @use_indent ? INDENT * indent_level : ''.freeze
|
80
80
|
|
@@ -148,7 +148,7 @@ module Tomlib
|
|
148
148
|
when Hash
|
149
149
|
"{ #{value.map { |k, v| "#{to_toml_key(k)} = #{to_toml_value(v)}" }.join(', ')} }"
|
150
150
|
when Array
|
151
|
-
"[ #{value.map { |e| to_toml_value(e) }.join(', ')} ]"
|
151
|
+
value.empty? ? '[]' : "[ #{value.map { |e| to_toml_value(e) }.join(', ')} ]"
|
152
152
|
when nil
|
153
153
|
'""'.freeze
|
154
154
|
else
|
data/lib/tomlib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tomlib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kamil Giszczak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-08-
|
11
|
+
date: 2022-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Fast TOML parser and generator with native extension.
|
14
14
|
email:
|