wankel 0.2.0 → 0.3.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 +15 -0
- data/Rakefile +3 -1
- data/ext/wankel/wankel_sax_encoder.c +3 -3
- data/ext/wankel/wankel_sax_parser.c +2 -1
- data/test/encoding/sax_encoder_test.rb +4 -4
- data/wankel.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 820fc80e5cf50976025731b5151b1ba941a46758
|
4
|
+
data.tar.gz: 8db0022010b5da08d31b52df372918b7de07c73d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f1846a7234dade3c2afb24a19be695c270ae8f8d61df172527f7afba27d6a77be2df2e9783cb2d7b12f0db779507e86e6ffc0be36f68ac564312d5fc0e23dac
|
7
|
+
data.tar.gz: c38cad9f0d72a5786542ae6983de3c6957e5f6e51b521773e51283bea5c481059e30c1453b201e02148f8f8f646a6e75f976bf0394d893dd8971f4bd758c0f8d
|
data/CHANGELOG.md
ADDED
data/Rakefile
CHANGED
@@ -10,7 +10,7 @@ static VALUE wankelSaxEncoder_initialize(int argc, VALUE * argv, VALUE self);
|
|
10
10
|
static VALUE wankelSaxEncoder_number(VALUE self, VALUE number);
|
11
11
|
static VALUE wankelSaxEncoder_string(VALUE self, VALUE string);
|
12
12
|
static VALUE wankelSaxEncoder_null(VALUE self);
|
13
|
-
static VALUE
|
13
|
+
static VALUE wankelSaxEncoder_boolean(VALUE self, VALUE b);
|
14
14
|
static VALUE wankelSaxEncoder_map_open(VALUE self);
|
15
15
|
static VALUE wankelSaxEncoder_map_close(VALUE self);
|
16
16
|
static VALUE wankelSaxEncoder_array_open(VALUE self);
|
@@ -136,7 +136,7 @@ static VALUE wankelSaxEncoder_null(VALUE self) {
|
|
136
136
|
return Qnil;
|
137
137
|
}
|
138
138
|
|
139
|
-
static VALUE
|
139
|
+
static VALUE wankelSaxEncoder_boolean(VALUE self, VALUE b) {
|
140
140
|
wankel_encoder * p;
|
141
141
|
yajl_gen_status status;
|
142
142
|
Data_Get_Struct(self, wankel_encoder, p);
|
@@ -247,7 +247,7 @@ void Init_wankel_sax_encoder() {
|
|
247
247
|
rb_define_method(c_wankelSaxEncoder, "number", wankelSaxEncoder_number, 1);
|
248
248
|
rb_define_method(c_wankelSaxEncoder, "string", wankelSaxEncoder_string, 1);
|
249
249
|
rb_define_method(c_wankelSaxEncoder, "null", wankelSaxEncoder_null, 0);
|
250
|
-
rb_define_method(c_wankelSaxEncoder, "
|
250
|
+
rb_define_method(c_wankelSaxEncoder, "boolean", wankelSaxEncoder_boolean, 1);
|
251
251
|
rb_define_method(c_wankelSaxEncoder, "map_open", wankelSaxEncoder_map_open, 0);
|
252
252
|
rb_define_method(c_wankelSaxEncoder, "map_close", wankelSaxEncoder_map_close, 0);
|
253
253
|
rb_define_method(c_wankelSaxEncoder, "array_open", wankelSaxEncoder_array_open, 0);
|
@@ -122,9 +122,10 @@ static VALUE sax_parser_complete(VALUE self) {
|
|
122
122
|
sax_parser * p;
|
123
123
|
Data_Get_Struct(self, sax_parser, p);
|
124
124
|
|
125
|
+
|
125
126
|
status = yajl_complete_parse(p->h);
|
126
127
|
yajl_helper_check_status(p->h, status, 0, NULL, 0);
|
127
|
-
|
128
|
+
|
128
129
|
return Qnil;
|
129
130
|
}
|
130
131
|
|
@@ -36,18 +36,18 @@ class Wankel::SaxEncoderTest < Minitest::Test
|
|
36
36
|
assert_equal("null", output.string)
|
37
37
|
end
|
38
38
|
|
39
|
-
test "
|
39
|
+
test "boolean(false)" do
|
40
40
|
output = StringIO.new
|
41
41
|
encoder = Wankel::SaxEncoder.new(output)
|
42
|
-
encoder.
|
42
|
+
encoder.boolean(false)
|
43
43
|
encoder.complete
|
44
44
|
assert_equal("false", output.string)
|
45
45
|
end
|
46
46
|
|
47
|
-
test "
|
47
|
+
test "boolean(true)" do
|
48
48
|
output = StringIO.new
|
49
49
|
encoder = Wankel::SaxEncoder.new(output)
|
50
|
-
encoder.
|
50
|
+
encoder.boolean(true)
|
51
51
|
encoder.complete
|
52
52
|
assert_equal("true", output.string)
|
53
53
|
end
|
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.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Bracy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-compiler
|
@@ -75,6 +75,7 @@ extensions:
|
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
77
|
- ".gitignore"
|
78
|
+
- CHANGELOG.md
|
78
79
|
- LICENSE
|
79
80
|
- README.md
|
80
81
|
- Rakefile
|