wankel 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -1
- data/ext/wankel/wankel_stream_encoder.c +8 -0
- data/lib/wankel.rb +0 -1
- data/test/encoding/sax_encoder_test.rb +8 -0
- data/wankel.gemspec +1 -1
- 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: 6a30cd18f093f7366a4c609f85cf8dd4b18069da
|
4
|
+
data.tar.gz: f6f2487195546f47c0b5c90a7a5e5d66cabec691
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3b7d590baf87ea2b7fe04de19bf79b240f14ca076365e76e24a995f117755fef5ca34bf5304adbe01faa7497cac5de8ba98a4dad40a65fdcb8e4f2e9f7a7cd6
|
7
|
+
data.tar.gz: cf8ce5e0386a8ad28eb1fbcc5890f52102cf9a30b6fcaf0011057e54ad8248014436687021bb423b0cdf7e9a9eec164de133a8bfd121fcfb47f169b1f38831f8
|
data/CHANGELOG.md
CHANGED
@@ -95,6 +95,13 @@ static VALUE wankelStreamEncoder_change_io(VALUE self, VALUE io) {
|
|
95
95
|
return Qnil;
|
96
96
|
}
|
97
97
|
|
98
|
+
static VALUE wankelStreamEncoder_output(VALUE self) {
|
99
|
+
wankel_encoder * p;
|
100
|
+
Data_Get_Struct(self, wankel_encoder, p);
|
101
|
+
|
102
|
+
return p->output;
|
103
|
+
}
|
104
|
+
|
98
105
|
static VALUE wankelStreamEncoder_number(VALUE self, VALUE number) {
|
99
106
|
size_t len;
|
100
107
|
const char * cptr;
|
@@ -268,6 +275,7 @@ void Init_wankel_stream_encoder() {
|
|
268
275
|
rb_define_method(c_wankelStreamEncoder, "array_open", wankelStreamEncoder_array_open, 0);
|
269
276
|
rb_define_method(c_wankelStreamEncoder, "array_close", wankelStreamEncoder_array_close, 0);
|
270
277
|
rb_define_method(c_wankelStreamEncoder, "flush", wankelStreamEncoder_flush, 0);
|
278
|
+
rb_define_method(c_wankelStreamEncoder, "output", wankelStreamEncoder_output, 0);
|
271
279
|
rb_define_method(c_wankelStreamEncoder, "output=", wankelStreamEncoder_change_io, 1);
|
272
280
|
|
273
281
|
|
data/lib/wankel.rb
CHANGED
@@ -176,6 +176,14 @@ class Wankel::StreamEncoderTest < Minitest::Test
|
|
176
176
|
assert_equal('{"key":"value"}', output.string)
|
177
177
|
end
|
178
178
|
|
179
|
+
test 'output' do
|
180
|
+
output = StringIO.new
|
181
|
+
|
182
|
+
encoder = Wankel::StreamEncoder.new(output)
|
183
|
+
|
184
|
+
assert_equal(output.object_id, encoder.output.object_id)
|
185
|
+
end
|
186
|
+
|
179
187
|
test "output=, changing the output io during generation" do
|
180
188
|
output1 = StringIO.new
|
181
189
|
output2 = StringIO.new
|
data/wankel.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wankel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Bracy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|