yajl-ruby 0.5.7 → 0.5.8
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.
Potentially problematic release.
This version of yajl-ruby might be problematic. Click here for more details.
- data/.gitignore +2 -1
- data/CHANGELOG.md +9 -0
- data/README.rdoc +2 -2
- data/VERSION.yml +1 -1
- data/examples/encoding/chunked_encoding.rb +27 -0
- data/examples/encoding/one_shot.rb +13 -0
- data/examples/encoding/to_an_io.rb +12 -0
- data/examples/parsing/from_file.rb +1 -1
- data/examples/parsing/from_stdin.rb +1 -1
- data/examples/parsing/from_string.rb +1 -1
- data/ext/yajl_ext.c +69 -30
- data/ext/yajl_ext.h +14 -5
- data/lib/yajl.rb +5 -3
- data/lib/yajl/http_stream.rb +2 -2
- data/spec/encoding/encoding_spec.rb +1 -1
- data/yajl-ruby.gemspec +8 -2
- metadata +8 -2
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.5.8 (July 6th, 2009)
|
4
|
+
* Bugfix in Yajl::HttpStream for proper handling of the Content-type header (Rob Sharp)
|
5
|
+
* Yajl::Encoder now has an on_progress callback setter, which can be used to harness the encoder's streaming ability.
|
6
|
+
** The passed Proc/lambda will be called, and passed every chunk (currently 8kb) of the encoded JSON string as it's being encoded.
|
7
|
+
* API CHANGE WARNING: Yajl::Encoder.encode's block will now be used as (and work the same as) the on_progress callback
|
8
|
+
** This means the block will be passed chunks of the JSON string at a time, giving the caller the ability to start processing the encoded data while it's still being encoded.
|
9
|
+
* fixed grammatical error in README (Neil Berkman)
|
10
|
+
* Added some encoder examples
|
11
|
+
|
3
12
|
## 0.5.7 (June 23rd, 2009)
|
4
13
|
* You can now pass parser options (like :symbolize_keys for example) to Yajl::HttpStream.get
|
5
14
|
* Refactored spec tests a bit, DRYing up the Yajl::HttpStream specs quite a bit.
|
data/README.rdoc
CHANGED
@@ -167,7 +167,7 @@ This includes the following API:
|
|
167
167
|
JSON.parse, JSON.generate, JSON.pretty_generate, JSON.load, JSON.dump
|
168
168
|
and all of the #to_json instance method overrides for Ruby's primitive objects
|
169
169
|
|
170
|
-
Once the compatibility API is enabled,
|
170
|
+
Once the compatibility API is enabled, your existing or new project should work as if the JSON gem itself were being used. Only you'll be using Yajl ;)
|
171
171
|
|
172
172
|
There are a lot more possibilities that I'd love to see other gems/plugins for someday.
|
173
173
|
|
@@ -267,4 +267,4 @@ I've had a lot of inspiration, and a lot of help. Thanks to everyone who's been
|
|
267
267
|
* Rick http://github.com/technoweenie - for making an ActiveSupport patch with support for this library and teasing me that it might go into Rails 3. You sure lit a fire under my ass and I got a ton of work done because of it! :)
|
268
268
|
* The entire Github Crew - http://github.com/ - my inspiration, time spent writing this, finding Yajl, So many-MANY other things wouldn't have been possible without this awesome service. I owe you guys some whiskey at Kilowatt.
|
269
269
|
* benburkert - http://github.com/benburkert
|
270
|
-
* Aman Gupta - http://github.com/tmm1 - tons of suggestions and inspiration for the most recent features, and hopefully more to come ;)
|
270
|
+
* Aman Gupta - http://github.com/tmm1 - tons of suggestions and inspiration for the most recent features, and hopefully more to come ;)
|
data/VERSION.yml
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'yajl'
|
5
|
+
|
6
|
+
obj = {
|
7
|
+
:a_test => "of encoding in one pass" * 512,
|
8
|
+
:a_test2 => "of encoding in one pass" * 512,
|
9
|
+
:a_test3 => "of encoding in one pass" * 512,
|
10
|
+
:a_test4 => "of encoding in one pass" * 512,
|
11
|
+
:which_will => "simply return a string when finished" * 512,
|
12
|
+
:which_will2 => "simply return a string when finished" * 512,
|
13
|
+
:which_will3 => "simply return a string when finished" * 512,
|
14
|
+
:which_will4 => "simply return a string when finished" * 512,
|
15
|
+
:as_easy_as => 123
|
16
|
+
}
|
17
|
+
|
18
|
+
chunks = 0
|
19
|
+
total_size = 0
|
20
|
+
|
21
|
+
Yajl::Encoder.encode(obj) do |chunk|
|
22
|
+
chunks += 1
|
23
|
+
total_size += chunk.size
|
24
|
+
STDOUT << chunk
|
25
|
+
end
|
26
|
+
|
27
|
+
puts "\n\nEncoder generated #{total_size} bytes of data, in #{chunks} chunks"
|
data/ext/yajl_ext.c
CHANGED
@@ -60,25 +60,41 @@ inline void yajl_set_static_value(void * ctx, VALUE val) {
|
|
60
60
|
}
|
61
61
|
}
|
62
62
|
|
63
|
-
void
|
63
|
+
static void yajl_encoder_wrapper_free(void * wrapper) {
|
64
|
+
struct yajl_encoder_wrapper * w = wrapper;
|
65
|
+
yajl_gen_free(w->encoder);
|
66
|
+
free(w);
|
67
|
+
}
|
68
|
+
|
69
|
+
static void yajl_encoder_wrapper_mark(void * wrapper) {
|
70
|
+
struct yajl_encoder_wrapper * w = wrapper;
|
71
|
+
rb_gc_mark(w->on_progress_callback);
|
72
|
+
}
|
73
|
+
|
74
|
+
void yajl_encode_part(void * wrapper, VALUE obj, VALUE io) {
|
64
75
|
VALUE str, outBuff, otherObj;
|
76
|
+
struct yajl_encoder_wrapper * w = wrapper;
|
65
77
|
yajl_gen_status status;
|
66
78
|
int idx = 0;
|
67
79
|
const unsigned char * buffer;
|
68
80
|
unsigned int len;
|
69
81
|
|
70
|
-
if (io != Qnil) {
|
71
|
-
status = yajl_gen_get_buf(
|
82
|
+
if (io != Qnil || w->on_progress_callback != Qnil) {
|
83
|
+
status = yajl_gen_get_buf(w->encoder, &buffer, &len);
|
72
84
|
if (len >= WRITE_BUFSIZE) {
|
73
85
|
outBuff = rb_str_new((const char *)buffer, len);
|
74
|
-
|
75
|
-
|
86
|
+
if (io != Qnil) {
|
87
|
+
rb_io_write(io, outBuff);
|
88
|
+
} else if (w->on_progress_callback != Qnil) {
|
89
|
+
rb_funcall(w->on_progress_callback, intern_call, 1, outBuff);
|
90
|
+
}
|
91
|
+
yajl_gen_clear(w->encoder);
|
76
92
|
}
|
77
93
|
}
|
78
94
|
|
79
95
|
switch (TYPE(obj)) {
|
80
96
|
case T_HASH:
|
81
|
-
status = yajl_gen_map_open(
|
97
|
+
status = yajl_gen_map_open(w->encoder);
|
82
98
|
|
83
99
|
// TODO: itterate through keys in the hash
|
84
100
|
VALUE keys = rb_funcall(obj, intern_keys, 0);
|
@@ -87,38 +103,38 @@ void yajl_encode_part(yajl_gen hand, VALUE obj, VALUE io) {
|
|
87
103
|
entry = rb_ary_entry(keys, idx);
|
88
104
|
keyStr = rb_funcall(entry, intern_to_s, 0); // key must be a string
|
89
105
|
// the key
|
90
|
-
yajl_encode_part(
|
106
|
+
yajl_encode_part(w, keyStr, io);
|
91
107
|
// the value
|
92
|
-
yajl_encode_part(
|
108
|
+
yajl_encode_part(w, rb_hash_aref(obj, entry), io);
|
93
109
|
}
|
94
110
|
|
95
|
-
status = yajl_gen_map_close(
|
111
|
+
status = yajl_gen_map_close(w->encoder);
|
96
112
|
break;
|
97
113
|
case T_ARRAY:
|
98
|
-
status = yajl_gen_array_open(
|
114
|
+
status = yajl_gen_array_open(w->encoder);
|
99
115
|
for(idx=0; idx<RARRAY_LEN(obj); idx++) {
|
100
116
|
otherObj = rb_ary_entry(obj, idx);
|
101
|
-
yajl_encode_part(
|
117
|
+
yajl_encode_part(w, otherObj, io);
|
102
118
|
}
|
103
|
-
status = yajl_gen_array_close(
|
119
|
+
status = yajl_gen_array_close(w->encoder);
|
104
120
|
break;
|
105
121
|
case T_NIL:
|
106
|
-
status = yajl_gen_null(
|
122
|
+
status = yajl_gen_null(w->encoder);
|
107
123
|
break;
|
108
124
|
case T_TRUE:
|
109
|
-
status = yajl_gen_bool(
|
125
|
+
status = yajl_gen_bool(w->encoder, 1);
|
110
126
|
break;
|
111
127
|
case T_FALSE:
|
112
|
-
status = yajl_gen_bool(
|
128
|
+
status = yajl_gen_bool(w->encoder, 0);
|
113
129
|
break;
|
114
130
|
case T_FIXNUM:
|
115
131
|
case T_FLOAT:
|
116
132
|
case T_BIGNUM:
|
117
133
|
str = rb_funcall(obj, intern_to_s, 0);
|
118
|
-
status = yajl_gen_number(
|
134
|
+
status = yajl_gen_number(w->encoder, RSTRING_PTR(str), (unsigned int)RSTRING_LEN(str));
|
119
135
|
break;
|
120
136
|
case T_STRING:
|
121
|
-
status = yajl_gen_string(
|
137
|
+
status = yajl_gen_string(w->encoder, (const unsigned char *)RSTRING_PTR(obj), (unsigned int)RSTRING_LEN(obj));
|
122
138
|
break;
|
123
139
|
default:
|
124
140
|
if (rb_respond_to(obj, intern_to_json)) {
|
@@ -126,7 +142,7 @@ void yajl_encode_part(yajl_gen hand, VALUE obj, VALUE io) {
|
|
126
142
|
} else {
|
127
143
|
str = rb_funcall(obj, intern_to_s, 0);
|
128
144
|
}
|
129
|
-
status = yajl_gen_string(
|
145
|
+
status = yajl_gen_string(w->encoder, (const unsigned char *)RSTRING_PTR(str), (unsigned int)RSTRING_LEN(str));
|
130
146
|
break;
|
131
147
|
}
|
132
148
|
}
|
@@ -348,7 +364,7 @@ static VALUE rb_yajl_parser_parse(int argc, VALUE * argv, VALUE self) {
|
|
348
364
|
Check_Type(rbufsize, T_FIXNUM);
|
349
365
|
}
|
350
366
|
if (!NIL_P(blk)) {
|
351
|
-
|
367
|
+
rb_yajl_parser_set_complete_cb(self, blk);
|
352
368
|
}
|
353
369
|
|
354
370
|
if (TYPE(input) == T_STRING) {
|
@@ -407,11 +423,11 @@ static VALUE rb_yajl_parser_parse_chunk(VALUE self, VALUE chunk) {
|
|
407
423
|
*
|
408
424
|
* call-seq: on_parse_complete = Proc.new { |obj| ... }
|
409
425
|
*
|
410
|
-
* This callback setter allows you to pass a Proc/lambda or any other object that
|
426
|
+
* This callback setter allows you to pass a Proc/lambda or any other object that responds to #call.
|
411
427
|
*
|
412
428
|
* It will pass a single parameter, the ruby object built from the last parsed JSON object
|
413
429
|
*/
|
414
|
-
static VALUE
|
430
|
+
static VALUE rb_yajl_parser_set_complete_cb(VALUE self, VALUE callback) {
|
415
431
|
struct yajl_parser_wrapper * wrapper;
|
416
432
|
GetParser(self, wrapper);
|
417
433
|
wrapper->parse_complete_callback = callback;
|
@@ -436,8 +452,8 @@ static VALUE rb_yajl_set_complete_cb(VALUE self, VALUE callback) {
|
|
436
452
|
* :indent is the character(s) used to indent the output string.
|
437
453
|
*/
|
438
454
|
static VALUE rb_yajl_encoder_new(int argc, VALUE * argv, VALUE klass) {
|
455
|
+
struct yajl_encoder_wrapper * wrapper;
|
439
456
|
yajl_gen_config cfg;
|
440
|
-
yajl_gen encoder;
|
441
457
|
VALUE opts, obj, indent;
|
442
458
|
const char * indentString = " ";
|
443
459
|
int beautify = 0;
|
@@ -457,8 +473,9 @@ static VALUE rb_yajl_encoder_new(int argc, VALUE * argv, VALUE klass) {
|
|
457
473
|
}
|
458
474
|
cfg = (yajl_gen_config){beautify, indentString};
|
459
475
|
|
460
|
-
|
461
|
-
|
476
|
+
obj = Data_Make_Struct(klass, struct yajl_encoder_wrapper, yajl_encoder_wrapper_mark, yajl_encoder_wrapper_free, wrapper);
|
477
|
+
wrapper->encoder = yajl_gen_alloc(&cfg, NULL);
|
478
|
+
wrapper->on_progress_callback = Qnil;
|
462
479
|
rb_obj_call_init(obj, 0, 0);
|
463
480
|
return obj;
|
464
481
|
}
|
@@ -493,22 +510,26 @@ static VALUE rb_yajl_encoder_init(int argc, VALUE * argv, VALUE self) {
|
|
493
510
|
* ruby objects to encode. This is how streaming is accomplished.
|
494
511
|
*/
|
495
512
|
static VALUE rb_yajl_encoder_encode(int argc, VALUE * argv, VALUE self) {
|
496
|
-
|
513
|
+
struct yajl_encoder_wrapper * wrapper;
|
497
514
|
const unsigned char * buffer;
|
498
515
|
unsigned int len;
|
499
516
|
VALUE obj, io, blk, outBuff;
|
500
517
|
|
501
|
-
GetEncoder(self,
|
518
|
+
GetEncoder(self, wrapper);
|
502
519
|
|
503
520
|
rb_scan_args(argc, argv, "11&", &obj, &io, &blk);
|
504
521
|
|
522
|
+
if (blk != Qnil) {
|
523
|
+
wrapper->on_progress_callback = blk;
|
524
|
+
}
|
525
|
+
|
505
526
|
// begin encode process
|
506
|
-
yajl_encode_part(
|
527
|
+
yajl_encode_part(wrapper, obj, io);
|
507
528
|
|
508
529
|
// just make sure we output the remaining buffer
|
509
|
-
yajl_gen_get_buf(encoder, &buffer, &len);
|
530
|
+
yajl_gen_get_buf(wrapper->encoder, &buffer, &len);
|
510
531
|
outBuff = rb_str_new((const char *)buffer, len);
|
511
|
-
yajl_gen_clear(encoder);
|
532
|
+
yajl_gen_clear(wrapper->encoder);
|
512
533
|
if (io != Qnil) {
|
513
534
|
rb_io_write(io, outBuff);
|
514
535
|
return Qnil;
|
@@ -521,6 +542,23 @@ static VALUE rb_yajl_encoder_encode(int argc, VALUE * argv, VALUE self) {
|
|
521
542
|
return Qnil;
|
522
543
|
}
|
523
544
|
|
545
|
+
/*
|
546
|
+
* Document-method: on_progress
|
547
|
+
*
|
548
|
+
* call-seq: on_progress = Proc.new {|str| ...}
|
549
|
+
*
|
550
|
+
* This callback setter allows you to pass a Proc/lambda or any other object that responds to #call.
|
551
|
+
*
|
552
|
+
* It will pass the caller a chunk of the encode buffer after it's reached it's internal max buffer size (defaults to 8kb).
|
553
|
+
* For example, encoding a large object that would normally result in 24288 bytes of data will result in 3 calls to this callback (assuming the 8kb default encode buffer).
|
554
|
+
*/
|
555
|
+
static VALUE rb_yajl_encoder_set_progress_cb(VALUE self, VALUE callback) {
|
556
|
+
struct yajl_encoder_wrapper * wrapper;
|
557
|
+
GetEncoder(self, wrapper);
|
558
|
+
wrapper->on_progress_callback = callback;
|
559
|
+
return Qnil;
|
560
|
+
}
|
561
|
+
|
524
562
|
|
525
563
|
// JSON Gem compatibility
|
526
564
|
|
@@ -750,12 +788,13 @@ void Init_yajl_ext() {
|
|
750
788
|
rb_define_method(cParser, "parse", rb_yajl_parser_parse, -1);
|
751
789
|
rb_define_method(cParser, "parse_chunk", rb_yajl_parser_parse_chunk, -1);
|
752
790
|
rb_define_method(cParser, "<<", rb_yajl_parser_parse_chunk, 1);
|
753
|
-
rb_define_method(cParser, "on_parse_complete=",
|
791
|
+
rb_define_method(cParser, "on_parse_complete=", rb_yajl_parser_set_complete_cb, 1);
|
754
792
|
|
755
793
|
cEncoder = rb_define_class_under(mYajl, "Encoder", rb_cObject);
|
756
794
|
rb_define_singleton_method(cEncoder, "new", rb_yajl_encoder_new, -1);
|
757
795
|
rb_define_method(cEncoder, "initialize", rb_yajl_encoder_init, -1);
|
758
796
|
rb_define_method(cEncoder, "encode", rb_yajl_encoder_encode, -1);
|
797
|
+
rb_define_method(cEncoder, "on_progress=", rb_yajl_encoder_set_progress_cb, 1);
|
759
798
|
|
760
799
|
rb_define_singleton_method(cEncoder, "enable_json_gem_compatability", rb_yajl_encoder_enable_json_gem_ext, 0);
|
761
800
|
|
data/ext/yajl_ext.h
CHANGED
@@ -10,11 +10,11 @@ static ID intern_io_read, intern_eof, intern_call, intern_keys, intern_to_s, int
|
|
10
10
|
sym_allow_comments, sym_check_utf8, sym_pretty, sym_indent, sym_symbolize_keys;
|
11
11
|
|
12
12
|
#define GetParser(obj, sval) (sval = (struct yajl_parser_wrapper*)DATA_PTR(obj));
|
13
|
-
#define GetEncoder(obj, sval) (sval = (
|
13
|
+
#define GetEncoder(obj, sval) (sval = (struct yajl_encoder_wrapper*)DATA_PTR(obj));
|
14
14
|
|
15
15
|
inline void yajl_check_and_fire_callback(void * ctx);
|
16
16
|
inline void yajl_set_static_value(void * ctx, VALUE val);
|
17
|
-
void yajl_encode_part(
|
17
|
+
void yajl_encode_part(void * wrapper, VALUE obj, VALUE io);
|
18
18
|
void yajl_parse_chunk(const unsigned char * chunk, unsigned int len, yajl_handle parser);
|
19
19
|
|
20
20
|
static int yajl_found_null(void * ctx);
|
@@ -26,6 +26,7 @@ static int yajl_found_start_hash(void * ctx);
|
|
26
26
|
static int yajl_found_end_hash(void * ctx);
|
27
27
|
static int yajl_found_start_array(void * ctx);
|
28
28
|
static int yajl_found_end_array(void * ctx);
|
29
|
+
|
29
30
|
static yajl_callbacks callbacks = {
|
30
31
|
yajl_found_null,
|
31
32
|
yajl_found_boolean,
|
@@ -49,18 +50,26 @@ struct yajl_parser_wrapper {
|
|
49
50
|
int symbolizeKeys;
|
50
51
|
yajl_handle parser;
|
51
52
|
};
|
52
|
-
|
53
|
-
|
53
|
+
|
54
|
+
struct yajl_encoder_wrapper {
|
55
|
+
VALUE on_progress_callback;
|
56
|
+
yajl_gen encoder;
|
57
|
+
};
|
54
58
|
|
55
59
|
static VALUE rb_yajl_parser_new(int argc, VALUE * argv, VALUE self);
|
56
60
|
static VALUE rb_yajl_parser_init(int argc, VALUE * argv, VALUE self);
|
57
61
|
static VALUE rb_yajl_parser_parse(int argc, VALUE * argv, VALUE self);
|
58
62
|
static VALUE rb_yajl_parser_parse_chunk(VALUE self, VALUE chunk);
|
59
|
-
static VALUE
|
63
|
+
static VALUE rb_yajl_parser_set_complete_cb(VALUE self, VALUE callback);
|
64
|
+
static void yajl_parser_wrapper_free(void * wrapper);
|
65
|
+
static void yajl_parser_wrapper_mark(void * wrapper);
|
60
66
|
|
61
67
|
static VALUE rb_yajl_encoder_new(int argc, VALUE * argv, VALUE klass);
|
62
68
|
static VALUE rb_yajl_encoder_init(int argc, VALUE * argv, VALUE self);
|
63
69
|
static VALUE rb_yajl_encoder_encode(int argc, VALUE * argv, VALUE self);
|
70
|
+
static VALUE rb_yajl_encoder_set_progress_cb(VALUE self, VALUE callback);
|
71
|
+
static void yajl_encoder_wrapper_free(void * wrapper);
|
72
|
+
static void yajl_encoder_wrapper_mark(void * wrapper);
|
64
73
|
|
65
74
|
static VALUE rb_yajl_json_ext_object_to_json(int argc, VALUE * argv, VALUE self);
|
66
75
|
static VALUE rb_yajl_json_ext_hash_to_json(int argc, VALUE * argv, VALUE self);
|
data/lib/yajl.rb
CHANGED
@@ -13,7 +13,7 @@ require 'yajl_ext'
|
|
13
13
|
#
|
14
14
|
# Ruby bindings to the excellent Yajl (Yet Another JSON Parser) ANSI C library.
|
15
15
|
module Yajl
|
16
|
-
VERSION = "0.5.
|
16
|
+
VERSION = "0.5.8"
|
17
17
|
|
18
18
|
class Parser
|
19
19
|
# A helper method for parse-and-forget use-cases
|
@@ -34,9 +34,9 @@ module Yajl
|
|
34
34
|
# A helper method for encode-and-forget use-cases
|
35
35
|
#
|
36
36
|
# Examples:
|
37
|
-
# Yajl::Encoder.encode(obj[, io, :pretty => true, :indent => "\t"])
|
37
|
+
# Yajl::Encoder.encode(obj[, io, :pretty => true, :indent => "\t", &block])
|
38
38
|
#
|
39
|
-
# output = Yajl::Encoder.encode(obj[, :pretty => true, :indent => "\t"])
|
39
|
+
# output = Yajl::Encoder.encode(obj[, :pretty => true, :indent => "\t", &block])
|
40
40
|
#
|
41
41
|
# +obj+ is a ruby object to encode to JSON format
|
42
42
|
#
|
@@ -48,6 +48,8 @@ module Yajl
|
|
48
48
|
# :pretty accepts a boolean and will enable/disable "pretty printing" the resulting output
|
49
49
|
#
|
50
50
|
# :indent accepts a string and will be used as the indent character(s) during the pretty print process
|
51
|
+
#
|
52
|
+
# If a block is passed, it will be used as (and work the same as) the +on_progress+ callback
|
51
53
|
def self.encode(obj, *args, &block)
|
52
54
|
# TODO: this code smells, any ideas?
|
53
55
|
options = {}
|
data/lib/yajl/http_stream.rb
CHANGED
@@ -77,7 +77,7 @@ module Yajl
|
|
77
77
|
raise Exception, "Chunked responses detected, but no block given to handle the chunks."
|
78
78
|
end
|
79
79
|
else
|
80
|
-
content_type = response_head[:headers]["Content-Type"].split(';
|
80
|
+
content_type = response_head[:headers]["Content-Type"].split(';')
|
81
81
|
content_type = content_type.first
|
82
82
|
if ALLOWED_MIME_TYPES.include?(content_type)
|
83
83
|
case response_head[:headers]["Content-Encoding"]
|
@@ -98,4 +98,4 @@ module Yajl
|
|
98
98
|
socket.close
|
99
99
|
end
|
100
100
|
end
|
101
|
-
end
|
101
|
+
end
|
data/yajl-ruby.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{yajl-ruby}
|
5
|
-
s.version = "0.5.
|
5
|
+
s.version = "0.5.8"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Brian Lopez", "Lloyd Hilaiel"]
|
9
|
-
s.date = %q{2009-06
|
9
|
+
s.date = %q{2009-07-06}
|
10
10
|
s.email = %q{seniorlopez@gmail.com}
|
11
11
|
s.extensions = ["ext/extconf.rb"]
|
12
12
|
s.extra_rdoc_files = [
|
@@ -34,6 +34,9 @@ Gem::Specification.new do |s|
|
|
34
34
|
"benchmark/subjects/twitter_search.json",
|
35
35
|
"benchmark/subjects/twitter_stream.json",
|
36
36
|
"benchmark/subjects/unicode.json",
|
37
|
+
"examples/encoding/chunked_encoding.rb",
|
38
|
+
"examples/encoding/one_shot.rb",
|
39
|
+
"examples/encoding/to_an_io.rb",
|
37
40
|
"examples/http/twitter_search_api.rb",
|
38
41
|
"examples/http/twitter_stream_api.rb",
|
39
42
|
"examples/parsing/from_file.rb",
|
@@ -160,6 +163,9 @@ Gem::Specification.new do |s|
|
|
160
163
|
"spec/parsing/fixtures_spec.rb",
|
161
164
|
"spec/parsing/one_off_spec.rb",
|
162
165
|
"spec/spec_helper.rb",
|
166
|
+
"examples/encoding/chunked_encoding.rb",
|
167
|
+
"examples/encoding/one_shot.rb",
|
168
|
+
"examples/encoding/to_an_io.rb",
|
163
169
|
"examples/http/twitter_search_api.rb",
|
164
170
|
"examples/http/twitter_stream_api.rb",
|
165
171
|
"examples/parsing/from_file.rb",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yajl-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Lopez
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-06
|
13
|
+
date: 2009-07-06 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|
@@ -44,6 +44,9 @@ files:
|
|
44
44
|
- benchmark/subjects/twitter_search.json
|
45
45
|
- benchmark/subjects/twitter_stream.json
|
46
46
|
- benchmark/subjects/unicode.json
|
47
|
+
- examples/encoding/chunked_encoding.rb
|
48
|
+
- examples/encoding/one_shot.rb
|
49
|
+
- examples/encoding/to_an_io.rb
|
47
50
|
- examples/http/twitter_search_api.rb
|
48
51
|
- examples/http/twitter_stream_api.rb
|
49
52
|
- examples/parsing/from_file.rb
|
@@ -192,6 +195,9 @@ test_files:
|
|
192
195
|
- spec/parsing/fixtures_spec.rb
|
193
196
|
- spec/parsing/one_off_spec.rb
|
194
197
|
- spec/spec_helper.rb
|
198
|
+
- examples/encoding/chunked_encoding.rb
|
199
|
+
- examples/encoding/one_shot.rb
|
200
|
+
- examples/encoding/to_an_io.rb
|
195
201
|
- examples/http/twitter_search_api.rb
|
196
202
|
- examples/http/twitter_stream_api.rb
|
197
203
|
- examples/parsing/from_file.rb
|