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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a2a9555df2d54b524e29a89321699384d49e0613
4
- data.tar.gz: 1e924383e839c3bda6f31b8a316ad2d55b67bd17
3
+ metadata.gz: 6a30cd18f093f7366a4c609f85cf8dd4b18069da
4
+ data.tar.gz: f6f2487195546f47c0b5c90a7a5e5d66cabec691
5
5
  SHA512:
6
- metadata.gz: 24847eb3f44ffd7c2eb6eebd205f96ee6e155e68b22aea2e64d826aaf3fe4ec9d5d7df485653f86034205bbf0cd5a07c19e8fe7055e2eccc9e9b7d4551abe62f
7
- data.tar.gz: 9efcc10ef6c1169cbadce7c63c27b3db150794666e4aeb0b69556699afe5800ca092fb4908e9868bdd3577a750ac5a089aa4b342476504767390b2723e60f71c
6
+ metadata.gz: e3b7d590baf87ea2b7fe04de19bf79b240f14ca076365e76e24a995f117755fef5ca34bf5304adbe01faa7497cac5de8ba98a4dad40a65fdcb8e4f2e9f7a7cd6
7
+ data.tar.gz: cf8ce5e0386a8ad28eb1fbcc5890f52102cf9a30b6fcaf0011057e54ad8248014436687021bb423b0cdf7e9a9eec164de133a8bfd121fcfb47f169b1f38831f8
@@ -8,7 +8,13 @@ Minor Changes:
8
8
 
9
9
  Bugfixes:
10
10
 
11
- ## 0.6.0
11
+ ## 0.6.1 (February 19th, 2015)
12
+
13
+ Minor Changes:
14
+
15
+ - Added abilitly to get the output stream via `Wankel::SaxEncoder#output`
16
+
17
+ ## 0.6.0 (February 3rd, 2015)
12
18
 
13
19
  New Features:
14
20
 
@@ -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
 
@@ -51,7 +51,6 @@ class Wankel
51
51
  :write_buffer_size => 8092,
52
52
  :beautify => false,
53
53
  :indent_string => ' ',
54
- :validate_utf8 => false,
55
54
  :escape_solidus => false
56
55
  }
57
56
  end
@@ -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
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'wankel'
3
- s.version = '0.6.0'
3
+ s.version = '0.6.1'
4
4
  s.licenses = ['MIT']
5
5
  s.authors = ['Jon Bracy']
6
6
  s.email = ['jonbracy@gmail.com']
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.0
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-03 00:00:00.000000000 Z
11
+ date: 2015-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler