yaji 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY.markdown CHANGED
@@ -1,3 +1,9 @@
1
+ === 0.2.1 / 2012-03-14
2
+
3
+ * Revert "Close input after work"
4
+ * Update rake dependency
5
+ * Check chunk for nil before stripping
6
+
1
7
  === 0.2.0 / 2012-01-12
2
8
 
3
9
  * Fix root element (broken backward compatibility, see tests)
@@ -259,16 +259,14 @@ static VALUE rb_yaji_parser_parse(int argc, VALUE* argv, VALUE self)
259
259
  rc = yajl_parse_complete(p->handle);
260
260
 
261
261
  if (rc == yajl_status_error ||
262
- (rc == yajl_status_insufficient_data && RSTRING_LEN(rb_funcall(p->chunk, id_strip, 0)) != 0)) {
262
+ (rc == yajl_status_insufficient_data && p->chunk != Qnil &&
263
+ RSTRING_LEN(rb_funcall(p->chunk, id_strip, 0)) != 0)) {
263
264
  RERAISE_PARSER_ERROR(p);
264
265
  }
265
266
  for (i=0; i<RARRAY_LEN(p->events); i++) {
266
267
  rb_funcall(p->parser_cb, id_call, 1, RARRAY_PTR(p->events)[i]);
267
268
  }
268
269
 
269
- if (rb_respond_to(p->input, id_close)) {
270
- rb_funcall(p->input, id_close, 0);
271
- }
272
270
  return Qnil;
273
271
  }
274
272
 
@@ -413,7 +411,6 @@ void Init_parser_ext() {
413
411
  rb_define_method(c_yaji_parser, "each", rb_yaji_parser_each, -1);
414
412
 
415
413
  id_call = rb_intern("call");
416
- id_close = rb_intern("close");
417
414
  id_read = rb_intern("read");
418
415
  id_parse = rb_intern("parse");
419
416
  id_strip = rb_intern("strip");
@@ -41,7 +41,7 @@ static rb_encoding *utf8_encoding;
41
41
 
42
42
  static VALUE m_yaji, c_yaji_parser, c_parse_error, c_stringio;
43
43
 
44
- static ID id_call, id_close, id_read, id_parse, id_perform, id_on_body, id_bytesize, id_strip;
44
+ static ID id_call, id_read, id_parse, id_perform, id_on_body, id_bytesize, id_strip;
45
45
  static ID sym_allow_comments, sym_check_utf8, sym_symbolize_keys, sym_with_path,
46
46
  sym_read_buffer_size, sym_null, sym_boolean, sym_number, sym_string,
47
47
  sym_hash_key, sym_start_hash, sym_end_hash, sym_start_array,
data/lib/yaji/version.rb CHANGED
@@ -18,5 +18,5 @@
18
18
  #
19
19
 
20
20
  module YAJI
21
- VERSION = "0.2.0"
21
+ VERSION = "0.2.1"
22
22
  end
data/yaji.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.extensions = `git ls-files -- ext/**/extconf.rb`.split("\n")
21
21
  s.require_paths = ["lib"]
22
22
 
23
- s.add_development_dependency 'rake', '0.8.7'
23
+ s.add_development_dependency 'rake', '~> 0.8.7'
24
24
  s.add_development_dependency 'rake-compiler'
25
25
  s.add_development_dependency 'minitest'
26
26
  s.add_development_dependency 'curb'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaji
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,22 +9,27 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-12 00:00:00.000000000Z
12
+ date: 2012-03-14 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &23267520 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - =
19
+ - - ~>
20
20
  - !ruby/object:Gem::Version
21
21
  version: 0.8.7
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *23267520
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.8.7
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: rake-compiler
27
- requirement: &23267120 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: '0'
33
38
  type: :development
34
39
  prerelease: false
35
- version_requirements: *23267120
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: minitest
38
- requirement: &23266660 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: '0'
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *23266660
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: curb
49
- requirement: &23266240 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ! '>='
@@ -54,10 +69,15 @@ dependencies:
54
69
  version: '0'
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *23266240
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
58
78
  - !ruby/object:Gem::Dependency
59
79
  name: ruby-debug19
60
- requirement: &23265780 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ! '>='
@@ -65,7 +85,12 @@ dependencies:
65
85
  version: '0'
66
86
  type: :development
67
87
  prerelease: false
68
- version_requirements: *23265780
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
69
94
  description: YAJI is a ruby wrapper to YAJL providing iterator interface to streaming
70
95
  JSON parser
71
96
  email: info@couchbase.com
@@ -131,11 +156,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
156
  version: '0'
132
157
  requirements: []
133
158
  rubyforge_project: yaji
134
- rubygems_version: 1.8.10
159
+ rubygems_version: 1.8.18
135
160
  signing_key:
136
161
  specification_version: 3
137
162
  summary: Yet another JSON iterator
138
- test_files:
139
- - test/fixture.json
140
- - test/test_parser.rb
163
+ test_files: []
141
164
  has_rdoc: