yaml-write-stream 2.0.0 → 2.0.1
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/History.txt +4 -0
- data/lib/yaml-write-stream/stateful.rb +2 -1
- data/lib/yaml-write-stream/version.rb +1 -1
- data/lib/yaml-write-stream/yielding.rb +2 -1
- data/spec/stateful_spec.rb +8 -0
- data/spec/yielding_spec.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 056601295e460d268a19e94e908ee50e1a6fb839
|
4
|
+
data.tar.gz: fc0ab491262017a0e6a55a46ed0d895020fd9f6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c92e3d108d4e7f39ae3ed77e14c3e2c142f12a3f4400413d8aefeb04c4c21c04b229228f2365d2beabd03c9c4312bd85308b5f2f49f7ad29e54c0ec38cf352da
|
7
|
+
data.tar.gz: 940295e433a73dcaaaa959882e05bd983e51960b572fe51768532491a60fc17a9fad7a2b25ba8b964c7dc18b60ffee8bb65f7c326189130d8d0132e597267fde
|
data/History.txt
CHANGED
@@ -28,3 +28,7 @@
|
|
28
28
|
the string would have been dumped either with "non-specific" tag notation (i.e. "!") or
|
29
29
|
without quotes. Both result in an integer when parsed. Now if you want to dump a number
|
30
30
|
as a string, convert it to a string before serializing.
|
31
|
+
|
32
|
+
== 2.0.1
|
33
|
+
|
34
|
+
* Quote numeric string keys.
|
data/spec/stateful_spec.rb
CHANGED
@@ -65,6 +65,14 @@ describe YamlWriteStream::YieldingWriter do
|
|
65
65
|
expect(stream_writer).to be_closed
|
66
66
|
expect(stream).to be_closed
|
67
67
|
end
|
68
|
+
|
69
|
+
it 'quotes numeric string keys' do
|
70
|
+
stream_writer.write_map
|
71
|
+
stream_writer.write_key_value('110', 'foo')
|
72
|
+
stream_writer.close
|
73
|
+
|
74
|
+
expect(stream.string).to eq(utf8("\"110\": \"foo\"\n"))
|
75
|
+
end
|
68
76
|
end
|
69
77
|
|
70
78
|
describe '#closed?' do
|
data/spec/yielding_spec.rb
CHANGED
@@ -71,5 +71,14 @@ describe YamlWriteStream::YieldingWriter do
|
|
71
71
|
stream_writer.close
|
72
72
|
expect(stream.string).to eq("foo: \n")
|
73
73
|
end
|
74
|
+
|
75
|
+
it 'quotes numeric string keys' do
|
76
|
+
stream_writer.write_map do |map_writer|
|
77
|
+
map_writer.write_key_value('110', 'foo')
|
78
|
+
end
|
79
|
+
|
80
|
+
stream_writer.close
|
81
|
+
expect(stream.string).to eq(utf8("\"110\": \"foo\"\n"))
|
82
|
+
end
|
74
83
|
end
|
75
84
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yaml-write-stream
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Dutro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: An easy, streaming way to generate YAML.
|
14
14
|
email:
|