nestedtext 4.4.5 → 4.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/nestedtext/decode.rb +2 -2
- data/lib/nestedtext/dumper.rb +5 -5
- data/lib/nestedtext/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: e4b5835126c6ab57f14e01e820bedac03315e2078f865123f0ceb5531dbc82c7
|
4
|
+
data.tar.gz: 292b7483ba149ef91a54129e216bbbc7f7eeec841adc8fc2fac439086b392f13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d5d7ff43936ffc2fe15a4dab0969dc265a809fd74cc5a67a0a36a3d33cccfe60876029c368934d923b6717cddefee898e7736d9f8ed6888bc1bfbd552a47ae5
|
7
|
+
data.tar.gz: c1057cfad0e963867c8554c3edc61f6dded65b64bd1b536ebee412086f36d5e1c19aeb116bd0bed1c4076a8ff85cfa6b0ed50c7c23252b93c0419ec621f457b1
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [4.4.6] - 2022-02-17
|
10
|
+
### Fixed
|
11
|
+
- rubydoc.info: don't force use hash value omission with rubycop. rubydoc.info is not on ruby 3.1 yet.
|
12
|
+
|
9
13
|
## [4.4.5] - 2022-02-17
|
10
14
|
### Fixed
|
11
15
|
- rubydoc.info: try remove unused module require.
|
data/lib/nestedtext/decode.rb
CHANGED
@@ -18,7 +18,7 @@ module NestedText
|
|
18
18
|
def self.load(ntstring, top_class: Object, strict: false)
|
19
19
|
raise Errors::WrongInputTypeError.new([String], ntstring) unless ntstring.nil? || ntstring.is_a?(String)
|
20
20
|
|
21
|
-
Parser.new(StringIO.new(ntstring), top_class, strict:).parse
|
21
|
+
Parser.new(StringIO.new(ntstring), top_class, strict: strict).parse
|
22
22
|
end
|
23
23
|
|
24
24
|
# Decode a NestedText stored in a given file.
|
@@ -36,7 +36,7 @@ module NestedText
|
|
36
36
|
|
37
37
|
# Open explicitly in text mode to detect \r as line ending.
|
38
38
|
File.open(filename, 'rt') do |file|
|
39
|
-
Parser.new(file, top_class, strict:).parse
|
39
|
+
Parser.new(file, top_class, strict: strict).parse
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
data/lib/nestedtext/dumper.rb
CHANGED
@@ -84,13 +84,13 @@ module NestedText
|
|
84
84
|
def dump_any(obj, depth: 0, **kwargs)
|
85
85
|
trace_cycles(obj) do
|
86
86
|
case obj
|
87
|
-
when Hash then dump_hash(obj, depth
|
88
|
-
when Array then dump_array(obj, depth
|
89
|
-
when String then dump_string(obj, depth
|
87
|
+
when Hash then dump_hash(obj, depth: depth, **kwargs)
|
88
|
+
when Array then dump_array(obj, depth: depth, **kwargs)
|
89
|
+
when String then dump_string(obj, depth: depth, **kwargs)
|
90
90
|
when nil
|
91
|
-
@strict ? '' : dump_custom_class(nil, depth
|
91
|
+
@strict ? '' : dump_custom_class(nil, depth: depth, **kwargs)
|
92
92
|
else
|
93
|
-
dump_custom_class(obj, depth
|
93
|
+
dump_custom_class(obj, depth: depth, **kwargs)
|
94
94
|
end
|
95
95
|
end
|
96
96
|
end
|
data/lib/nestedtext/version.rb
CHANGED