yajl-ruby 0.7.9 → 0.8.0
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 +4 -0
- data/Gemfile +1 -5
- data/Rakefile +0 -6
- data/ext/yajl/api/yajl_gen.h +2 -0
- data/ext/yajl/yajl_encode.c +9 -3
- data/ext/yajl/yajl_encode.h +4 -2
- data/ext/yajl/yajl_ext.c +6 -2
- data/ext/yajl/yajl_ext.h +1 -1
- data/ext/yajl/yajl_gen.c +3 -1
- data/lib/yajl.rb +0 -2
- data/lib/yajl/version.rb +3 -0
- data/spec/encoding/encoding_spec.rb +13 -0
- data/yajl-ruby.gemspec +11 -199
- metadata +99 -20
- data/Gemfile.lock +0 -28
- data/VERSION.yml +0 -5
- data/tasks/jeweler.rake +0 -17
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.8.0 (February 2nd, 2011)
|
4
|
+
* added a new html_safe option to Yajl::Encoder to escape '/' characters for use in the DOM
|
5
|
+
* moved away from Jeweler to a Bundler/manual gemfile management setup
|
6
|
+
|
3
7
|
## 0.7.9 (January 11th, 2011)
|
4
8
|
* moved to rspec2
|
5
9
|
* fixed some compilation warnings on 1.9.3
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/ext/yajl/api/yajl_gen.h
CHANGED
@@ -82,6 +82,8 @@ extern "C" {
|
|
82
82
|
* some number of spaces. default is four spaces ' '. This
|
83
83
|
* member is only relevant when beautify is true */
|
84
84
|
const char * indentString;
|
85
|
+
/** escape the '/' character */
|
86
|
+
unsigned int htmlSafe;
|
85
87
|
} yajl_gen_config;
|
86
88
|
|
87
89
|
/** allocate a generator handle
|
data/ext/yajl/yajl_encode.c
CHANGED
@@ -46,16 +46,17 @@ static void CharToHex(unsigned char c, char * hexBuf)
|
|
46
46
|
|
47
47
|
void
|
48
48
|
yajl_string_encode(yajl_buf buf, const unsigned char * str,
|
49
|
-
unsigned int len)
|
49
|
+
unsigned int len, unsigned int htmlSafe)
|
50
50
|
{
|
51
|
-
yajl_string_encode2((const yajl_print_t) &yajl_buf_append, buf, str, len);
|
51
|
+
yajl_string_encode2((const yajl_print_t) &yajl_buf_append, buf, str, len, htmlSafe);
|
52
52
|
}
|
53
53
|
|
54
54
|
void
|
55
55
|
yajl_string_encode2(const yajl_print_t print,
|
56
56
|
void * ctx,
|
57
57
|
const unsigned char * str,
|
58
|
-
unsigned int len
|
58
|
+
unsigned int len,
|
59
|
+
unsigned int htmlSafe)
|
59
60
|
{
|
60
61
|
unsigned int beg = 0;
|
61
62
|
unsigned int end = 0;
|
@@ -74,6 +75,11 @@ yajl_string_encode2(const yajl_print_t print,
|
|
74
75
|
case '\f': escaped = "\\f"; break;
|
75
76
|
case '\b': escaped = "\\b"; break;
|
76
77
|
case '\t': escaped = "\\t"; break;
|
78
|
+
case '/':
|
79
|
+
if (htmlSafe) {
|
80
|
+
escaped = "\\/";
|
81
|
+
}
|
82
|
+
break;
|
77
83
|
default:
|
78
84
|
if ((unsigned char) str[end] < 32) {
|
79
85
|
CharToHex(str[end], hexBuf + 4);
|
data/ext/yajl/yajl_encode.h
CHANGED
@@ -39,10 +39,12 @@
|
|
39
39
|
void yajl_string_encode2(const yajl_print_t printer,
|
40
40
|
void * ctx,
|
41
41
|
const unsigned char * str,
|
42
|
-
unsigned int length
|
42
|
+
unsigned int length,
|
43
|
+
unsigned int htmlSafe);
|
43
44
|
|
44
45
|
void yajl_string_encode(yajl_buf buf, const unsigned char * str,
|
45
|
-
unsigned int length
|
46
|
+
unsigned int length,
|
47
|
+
unsigned int htmlSafe);
|
46
48
|
|
47
49
|
void yajl_string_decode(yajl_buf buf, const unsigned char * str,
|
48
50
|
unsigned int length);
|
data/ext/yajl/yajl_ext.c
CHANGED
@@ -553,7 +553,7 @@ static VALUE rb_yajl_encoder_new(int argc, VALUE * argv, VALUE klass) {
|
|
553
553
|
yajl_gen_config cfg;
|
554
554
|
VALUE opts, obj, indent;
|
555
555
|
unsigned char *indentString = NULL, *actualIndent = NULL;
|
556
|
-
int beautify = 0;
|
556
|
+
int beautify = 0, htmlSafe = 0;
|
557
557
|
|
558
558
|
/* Scan off config vars */
|
559
559
|
if (rb_scan_args(argc, argv, "01", &opts) == 1) {
|
@@ -573,11 +573,14 @@ static VALUE rb_yajl_encoder_new(int argc, VALUE * argv, VALUE klass) {
|
|
573
573
|
actualIndent = indentString;
|
574
574
|
}
|
575
575
|
}
|
576
|
+
if (rb_hash_aref(opts, sym_html_safe) == Qtrue) {
|
577
|
+
htmlSafe = 1;
|
578
|
+
}
|
576
579
|
}
|
577
580
|
if (!indentString) {
|
578
581
|
indentString = defaultIndentString;
|
579
582
|
}
|
580
|
-
cfg = (yajl_gen_config){beautify, (const char *)indentString};
|
583
|
+
cfg = (yajl_gen_config){beautify, (const char *)indentString, htmlSafe};
|
581
584
|
|
582
585
|
obj = Data_Make_Struct(klass, yajl_encoder_wrapper, yajl_encoder_wrapper_mark, yajl_encoder_wrapper_free, wrapper);
|
583
586
|
wrapper->indentString = actualIndent;
|
@@ -885,6 +888,7 @@ void Init_yajl() {
|
|
885
888
|
sym_check_utf8 = ID2SYM(rb_intern("check_utf8"));
|
886
889
|
sym_pretty = ID2SYM(rb_intern("pretty"));
|
887
890
|
sym_indent = ID2SYM(rb_intern("indent"));
|
891
|
+
sym_html_safe = ID2SYM(rb_intern("html_safe"));
|
888
892
|
sym_terminator = ID2SYM(rb_intern("terminator"));
|
889
893
|
sym_symbolize_keys = ID2SYM(rb_intern("symbolize_keys"));
|
890
894
|
|
data/ext/yajl/yajl_ext.h
CHANGED
@@ -50,7 +50,7 @@ static rb_encoding *utf8Encoding;
|
|
50
50
|
static VALUE cParseError, cEncodeError, mYajl, cParser, cEncoder;
|
51
51
|
static ID intern_io_read, intern_call, intern_keys, intern_to_s,
|
52
52
|
intern_to_json, intern_has_key, intern_to_sym, intern_as_json;
|
53
|
-
static ID sym_allow_comments, sym_check_utf8, sym_pretty, sym_indent, sym_terminator, sym_symbolize_keys;
|
53
|
+
static ID sym_allow_comments, sym_check_utf8, sym_pretty, sym_indent, sym_terminator, sym_symbolize_keys, sym_html_safe;
|
54
54
|
|
55
55
|
#define GetParser(obj, sval) (sval = (yajl_parser_wrapper*)DATA_PTR(obj));
|
56
56
|
#define GetEncoder(obj, sval) (sval = (yajl_encoder_wrapper*)DATA_PTR(obj));
|
data/ext/yajl/yajl_gen.c
CHANGED
@@ -60,6 +60,7 @@ struct yajl_gen_t
|
|
60
60
|
void * ctx; /* yajl_buf */
|
61
61
|
/* memory allocation routines */
|
62
62
|
yajl_alloc_funcs alloc;
|
63
|
+
unsigned int htmlSafe;
|
63
64
|
};
|
64
65
|
|
65
66
|
yajl_gen
|
@@ -97,6 +98,7 @@ yajl_gen_alloc2(const yajl_print_t callback,
|
|
97
98
|
if (config) {
|
98
99
|
g->pretty = config->beautify;
|
99
100
|
g->indentString = config->indentString ? config->indentString : " ";
|
101
|
+
g->htmlSafe = config->htmlSafe;
|
100
102
|
}
|
101
103
|
|
102
104
|
if (callback) {
|
@@ -220,7 +222,7 @@ yajl_gen_string(yajl_gen g, const unsigned char * str,
|
|
220
222
|
{
|
221
223
|
ENSURE_VALID_STATE; INSERT_SEP; INSERT_WHITESPACE;
|
222
224
|
g->print(g->ctx, "\"", 1);
|
223
|
-
yajl_string_encode2(g->print, g->ctx, str, len);
|
225
|
+
yajl_string_encode2(g->print, g->ctx, str, len, g->htmlSafe);
|
224
226
|
g->print(g->ctx, "\"", 1);
|
225
227
|
APPENDED_ATOM;
|
226
228
|
FINAL_NEWLINE;
|
data/lib/yajl.rb
CHANGED
@@ -13,8 +13,6 @@ require 'yajl/yajl'
|
|
13
13
|
#
|
14
14
|
# Ruby bindings to the excellent Yajl (Yet Another JSON Parser) ANSI C library.
|
15
15
|
module Yajl
|
16
|
-
VERSION = "0.7.9"
|
17
|
-
|
18
16
|
# For compatibility, has the same signature of Yajl::Parser.parse
|
19
17
|
def self.load(str_or_io, options={}, read_bufsize=nil, &block)
|
20
18
|
Parser.parse(str_or_io, options, read_bufsize, &block)
|
data/lib/yajl/version.rb
ADDED
@@ -231,4 +231,17 @@ describe "Yajl JSON encoder" do
|
|
231
231
|
Yajl::Encoder.encode(hash).encoding.should eql(Encoding.find('utf-8'))
|
232
232
|
end
|
233
233
|
end
|
234
|
+
|
235
|
+
it "should be able to escape / characters if html_safe is enabled" do
|
236
|
+
unsafe_encoder = Yajl::Encoder.new(:html_safe => false)
|
237
|
+
safe_encoder = Yajl::Encoder.new(:html_safe => true)
|
238
|
+
|
239
|
+
unsafe_encoder.encode("</script>").should_not eql("\"<\\/script>\"")
|
240
|
+
safe_encoder.encode("</script>").should eql("\"<\\/script>\"")
|
241
|
+
end
|
242
|
+
|
243
|
+
it "should default to *not* escaping / characters" do
|
244
|
+
unsafe_encoder = Yajl::Encoder.new
|
245
|
+
unsafe_encoder.encode("</script>").should_not eql("\"<\\/script>\"")
|
246
|
+
end
|
234
247
|
end
|
data/yajl-ruby.gemspec
CHANGED
@@ -1,215 +1,27 @@
|
|
1
|
-
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
-
# -*- encoding: utf-8 -*-
|
1
|
+
require './lib/yajl/version'
|
5
2
|
|
6
3
|
Gem::Specification.new do |s|
|
7
4
|
s.name = %q{yajl-ruby}
|
8
|
-
s.version =
|
9
|
-
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
5
|
+
s.version = Yajl::VERSION
|
11
6
|
s.authors = ["Brian Lopez", "Lloyd Hilaiel"]
|
12
|
-
s.date = %
|
7
|
+
s.date = Time.now.utc.strftime("%Y-%m-%d")
|
13
8
|
s.email = %q{seniorlopez@gmail.com}
|
14
9
|
s.extensions = ["ext/yajl/extconf.rb"]
|
15
10
|
s.extra_rdoc_files = [
|
16
11
|
"README.rdoc"
|
17
12
|
]
|
18
|
-
s.files =
|
19
|
-
".gitignore",
|
20
|
-
".rspec",
|
21
|
-
"CHANGELOG.md",
|
22
|
-
"Gemfile",
|
23
|
-
"Gemfile.lock",
|
24
|
-
"MIT-LICENSE",
|
25
|
-
"README.rdoc",
|
26
|
-
"Rakefile",
|
27
|
-
"VERSION.yml",
|
28
|
-
"benchmark/encode.rb",
|
29
|
-
"benchmark/encode_json_and_marshal.rb",
|
30
|
-
"benchmark/encode_json_and_yaml.rb",
|
31
|
-
"benchmark/http.rb",
|
32
|
-
"benchmark/parse.rb",
|
33
|
-
"benchmark/parse_json_and_marshal.rb",
|
34
|
-
"benchmark/parse_json_and_yaml.rb",
|
35
|
-
"benchmark/parse_stream.rb",
|
36
|
-
"benchmark/subjects/item.json",
|
37
|
-
"benchmark/subjects/ohai.json",
|
38
|
-
"benchmark/subjects/ohai.marshal_dump",
|
39
|
-
"benchmark/subjects/ohai.yml",
|
40
|
-
"benchmark/subjects/twitter_search.json",
|
41
|
-
"benchmark/subjects/twitter_stream.json",
|
42
|
-
"benchmark/subjects/unicode.json",
|
43
|
-
"examples/encoding/chunked_encoding.rb",
|
44
|
-
"examples/encoding/one_shot.rb",
|
45
|
-
"examples/encoding/to_an_io.rb",
|
46
|
-
"examples/http/twitter_search_api.rb",
|
47
|
-
"examples/http/twitter_stream_api.rb",
|
48
|
-
"examples/parsing/from_file.rb",
|
49
|
-
"examples/parsing/from_stdin.rb",
|
50
|
-
"examples/parsing/from_string.rb",
|
51
|
-
"ext/yajl/api/yajl_common.h",
|
52
|
-
"ext/yajl/api/yajl_gen.h",
|
53
|
-
"ext/yajl/api/yajl_parse.h",
|
54
|
-
"ext/yajl/api/yajl_version.h",
|
55
|
-
"ext/yajl/extconf.rb",
|
56
|
-
"ext/yajl/yajl.c",
|
57
|
-
"ext/yajl/yajl_alloc.c",
|
58
|
-
"ext/yajl/yajl_alloc.h",
|
59
|
-
"ext/yajl/yajl_buf.c",
|
60
|
-
"ext/yajl/yajl_buf.h",
|
61
|
-
"ext/yajl/yajl_bytestack.h",
|
62
|
-
"ext/yajl/yajl_encode.c",
|
63
|
-
"ext/yajl/yajl_encode.h",
|
64
|
-
"ext/yajl/yajl_ext.c",
|
65
|
-
"ext/yajl/yajl_ext.h",
|
66
|
-
"ext/yajl/yajl_gen.c",
|
67
|
-
"ext/yajl/yajl_lex.c",
|
68
|
-
"ext/yajl/yajl_lex.h",
|
69
|
-
"ext/yajl/yajl_parser.c",
|
70
|
-
"ext/yajl/yajl_parser.h",
|
71
|
-
"ext/yajl/yajl_version.c",
|
72
|
-
"lib/yajl.rb",
|
73
|
-
"lib/yajl/bzip2.rb",
|
74
|
-
"lib/yajl/bzip2/stream_reader.rb",
|
75
|
-
"lib/yajl/bzip2/stream_writer.rb",
|
76
|
-
"lib/yajl/deflate.rb",
|
77
|
-
"lib/yajl/deflate/stream_reader.rb",
|
78
|
-
"lib/yajl/deflate/stream_writer.rb",
|
79
|
-
"lib/yajl/gzip.rb",
|
80
|
-
"lib/yajl/gzip/stream_reader.rb",
|
81
|
-
"lib/yajl/gzip/stream_writer.rb",
|
82
|
-
"lib/yajl/http_stream.rb",
|
83
|
-
"lib/yajl/json_gem.rb",
|
84
|
-
"lib/yajl/json_gem/encoding.rb",
|
85
|
-
"lib/yajl/json_gem/parsing.rb",
|
86
|
-
"spec/encoding/encoding_spec.rb",
|
87
|
-
"spec/global/global_spec.rb",
|
88
|
-
"spec/http/fixtures/http.bzip2.dump",
|
89
|
-
"spec/http/fixtures/http.chunked.dump",
|
90
|
-
"spec/http/fixtures/http.deflate.dump",
|
91
|
-
"spec/http/fixtures/http.error.dump",
|
92
|
-
"spec/http/fixtures/http.gzip.dump",
|
93
|
-
"spec/http/fixtures/http.html.dump",
|
94
|
-
"spec/http/fixtures/http.raw.dump",
|
95
|
-
"spec/http/http_delete_spec.rb",
|
96
|
-
"spec/http/http_error_spec.rb",
|
97
|
-
"spec/http/http_get_spec.rb",
|
98
|
-
"spec/http/http_post_spec.rb",
|
99
|
-
"spec/http/http_put_spec.rb",
|
100
|
-
"spec/json_gem_compatibility/compatibility_spec.rb",
|
101
|
-
"spec/parsing/active_support_spec.rb",
|
102
|
-
"spec/parsing/chunked_spec.rb",
|
103
|
-
"spec/parsing/fixtures/fail.15.json",
|
104
|
-
"spec/parsing/fixtures/fail.16.json",
|
105
|
-
"spec/parsing/fixtures/fail.17.json",
|
106
|
-
"spec/parsing/fixtures/fail.26.json",
|
107
|
-
"spec/parsing/fixtures/fail11.json",
|
108
|
-
"spec/parsing/fixtures/fail12.json",
|
109
|
-
"spec/parsing/fixtures/fail13.json",
|
110
|
-
"spec/parsing/fixtures/fail14.json",
|
111
|
-
"spec/parsing/fixtures/fail19.json",
|
112
|
-
"spec/parsing/fixtures/fail20.json",
|
113
|
-
"spec/parsing/fixtures/fail21.json",
|
114
|
-
"spec/parsing/fixtures/fail22.json",
|
115
|
-
"spec/parsing/fixtures/fail23.json",
|
116
|
-
"spec/parsing/fixtures/fail24.json",
|
117
|
-
"spec/parsing/fixtures/fail25.json",
|
118
|
-
"spec/parsing/fixtures/fail27.json",
|
119
|
-
"spec/parsing/fixtures/fail28.json",
|
120
|
-
"spec/parsing/fixtures/fail3.json",
|
121
|
-
"spec/parsing/fixtures/fail4.json",
|
122
|
-
"spec/parsing/fixtures/fail5.json",
|
123
|
-
"spec/parsing/fixtures/fail6.json",
|
124
|
-
"spec/parsing/fixtures/fail9.json",
|
125
|
-
"spec/parsing/fixtures/pass.array.json",
|
126
|
-
"spec/parsing/fixtures/pass.codepoints_from_unicode_org.json",
|
127
|
-
"spec/parsing/fixtures/pass.contacts.json",
|
128
|
-
"spec/parsing/fixtures/pass.db100.xml.json",
|
129
|
-
"spec/parsing/fixtures/pass.db1000.xml.json",
|
130
|
-
"spec/parsing/fixtures/pass.dc_simple_with_comments.json",
|
131
|
-
"spec/parsing/fixtures/pass.deep_arrays.json",
|
132
|
-
"spec/parsing/fixtures/pass.difficult_json_c_test_case.json",
|
133
|
-
"spec/parsing/fixtures/pass.difficult_json_c_test_case_with_comments.json",
|
134
|
-
"spec/parsing/fixtures/pass.doubles.json",
|
135
|
-
"spec/parsing/fixtures/pass.empty_array.json",
|
136
|
-
"spec/parsing/fixtures/pass.empty_string.json",
|
137
|
-
"spec/parsing/fixtures/pass.escaped_bulgarian.json",
|
138
|
-
"spec/parsing/fixtures/pass.escaped_foobar.json",
|
139
|
-
"spec/parsing/fixtures/pass.item.json",
|
140
|
-
"spec/parsing/fixtures/pass.json-org-sample1.json",
|
141
|
-
"spec/parsing/fixtures/pass.json-org-sample2.json",
|
142
|
-
"spec/parsing/fixtures/pass.json-org-sample3.json",
|
143
|
-
"spec/parsing/fixtures/pass.json-org-sample4-nows.json",
|
144
|
-
"spec/parsing/fixtures/pass.json-org-sample4.json",
|
145
|
-
"spec/parsing/fixtures/pass.json-org-sample5.json",
|
146
|
-
"spec/parsing/fixtures/pass.map-spain.xml.json",
|
147
|
-
"spec/parsing/fixtures/pass.ns-invoice100.xml.json",
|
148
|
-
"spec/parsing/fixtures/pass.ns-soap.xml.json",
|
149
|
-
"spec/parsing/fixtures/pass.numbers-fp-4k.json",
|
150
|
-
"spec/parsing/fixtures/pass.numbers-fp-64k.json",
|
151
|
-
"spec/parsing/fixtures/pass.numbers-int-4k.json",
|
152
|
-
"spec/parsing/fixtures/pass.numbers-int-64k.json",
|
153
|
-
"spec/parsing/fixtures/pass.twitter-search.json",
|
154
|
-
"spec/parsing/fixtures/pass.twitter-search2.json",
|
155
|
-
"spec/parsing/fixtures/pass.unicode.json",
|
156
|
-
"spec/parsing/fixtures/pass.yelp.json",
|
157
|
-
"spec/parsing/fixtures/pass1.json",
|
158
|
-
"spec/parsing/fixtures/pass2.json",
|
159
|
-
"spec/parsing/fixtures/pass3.json",
|
160
|
-
"spec/parsing/fixtures_spec.rb",
|
161
|
-
"spec/parsing/one_off_spec.rb",
|
162
|
-
"spec/rcov.opts",
|
163
|
-
"spec/spec_helper.rb",
|
164
|
-
"tasks/compile.rake",
|
165
|
-
"tasks/jeweler.rake",
|
166
|
-
"tasks/rspec.rake",
|
167
|
-
"yajl-ruby.gemspec"
|
168
|
-
]
|
13
|
+
s.files = `git ls-files`.split("\n")
|
169
14
|
s.homepage = %q{http://github.com/brianmario/yajl-ruby}
|
170
15
|
s.require_paths = ["lib", "ext"]
|
171
16
|
s.rubygems_version = %q{1.4.2}
|
172
17
|
s.summary = %q{Ruby C bindings to the excellent Yajl JSON stream-based parser library.}
|
173
|
-
s.test_files =
|
174
|
-
"examples/encoding/chunked_encoding.rb",
|
175
|
-
"examples/encoding/one_shot.rb",
|
176
|
-
"examples/encoding/to_an_io.rb",
|
177
|
-
"examples/http/twitter_search_api.rb",
|
178
|
-
"examples/http/twitter_stream_api.rb",
|
179
|
-
"examples/parsing/from_file.rb",
|
180
|
-
"examples/parsing/from_stdin.rb",
|
181
|
-
"examples/parsing/from_string.rb",
|
182
|
-
"spec/encoding/encoding_spec.rb",
|
183
|
-
"spec/global/global_spec.rb",
|
184
|
-
"spec/http/http_delete_spec.rb",
|
185
|
-
"spec/http/http_error_spec.rb",
|
186
|
-
"spec/http/http_get_spec.rb",
|
187
|
-
"spec/http/http_post_spec.rb",
|
188
|
-
"spec/http/http_put_spec.rb",
|
189
|
-
"spec/json_gem_compatibility/compatibility_spec.rb",
|
190
|
-
"spec/parsing/active_support_spec.rb",
|
191
|
-
"spec/parsing/chunked_spec.rb",
|
192
|
-
"spec/parsing/fixtures_spec.rb",
|
193
|
-
"spec/parsing/one_off_spec.rb",
|
194
|
-
"spec/spec_helper.rb"
|
195
|
-
]
|
196
|
-
|
197
|
-
if s.respond_to? :specification_version then
|
198
|
-
s.specification_version = 3
|
18
|
+
s.test_files = `git ls-files spec examples`.split("\n")
|
199
19
|
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
207
|
-
s.add_dependency(%q<rspec>, [">= 0"])
|
208
|
-
end
|
209
|
-
else
|
210
|
-
s.add_dependency(%q<rake-compiler>, [">= 0.7.5"])
|
211
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
212
|
-
s.add_dependency(%q<rspec>, [">= 0"])
|
213
|
-
end
|
20
|
+
# tests
|
21
|
+
s.add_development_dependency 'rake-compiler', ">= 0.7.5"
|
22
|
+
s.add_development_dependency 'rspec', ">= 2.0.0"
|
23
|
+
# benchmarks
|
24
|
+
s.add_development_dependency 'activesupport'
|
25
|
+
s.add_development_dependency 'json'
|
214
26
|
end
|
215
27
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yajl-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 63
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 8
|
9
|
+
- 0
|
10
|
+
version: 0.8.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brian Lopez
|
@@ -16,14 +16,13 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
19
|
+
date: 2011-02-02 00:00:00 -08:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
|
-
prerelease: false
|
24
23
|
name: rake-compiler
|
25
|
-
|
26
|
-
|
24
|
+
prerelease: false
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
27
26
|
none: false
|
28
27
|
requirements:
|
29
28
|
- - ">="
|
@@ -34,12 +33,28 @@ dependencies:
|
|
34
33
|
- 7
|
35
34
|
- 5
|
36
35
|
version: 0.7.5
|
37
|
-
|
36
|
+
type: :development
|
37
|
+
version_requirements: *id001
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
|
+
name: rspec
|
39
40
|
prerelease: false
|
40
|
-
|
41
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
hash: 15
|
47
|
+
segments:
|
48
|
+
- 2
|
49
|
+
- 0
|
50
|
+
- 0
|
51
|
+
version: 2.0.0
|
41
52
|
type: :development
|
42
|
-
version_requirements:
|
53
|
+
version_requirements: *id002
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: activesupport
|
56
|
+
prerelease: false
|
57
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
43
58
|
none: false
|
44
59
|
requirements:
|
45
60
|
- - ">="
|
@@ -48,12 +63,12 @@ dependencies:
|
|
48
63
|
segments:
|
49
64
|
- 0
|
50
65
|
version: "0"
|
51
|
-
|
66
|
+
type: :development
|
67
|
+
version_requirements: *id003
|
52
68
|
- !ruby/object:Gem::Dependency
|
69
|
+
name: json
|
53
70
|
prerelease: false
|
54
|
-
|
55
|
-
type: :development
|
56
|
-
version_requirements: &id003 !ruby/object:Gem::Requirement
|
71
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
57
72
|
none: false
|
58
73
|
requirements:
|
59
74
|
- - ">="
|
@@ -62,7 +77,8 @@ dependencies:
|
|
62
77
|
segments:
|
63
78
|
- 0
|
64
79
|
version: "0"
|
65
|
-
|
80
|
+
type: :development
|
81
|
+
version_requirements: *id004
|
66
82
|
description:
|
67
83
|
email: seniorlopez@gmail.com
|
68
84
|
executables: []
|
@@ -76,11 +92,9 @@ files:
|
|
76
92
|
- .rspec
|
77
93
|
- CHANGELOG.md
|
78
94
|
- Gemfile
|
79
|
-
- Gemfile.lock
|
80
95
|
- MIT-LICENSE
|
81
96
|
- README.rdoc
|
82
97
|
- Rakefile
|
83
|
-
- VERSION.yml
|
84
98
|
- benchmark/encode.rb
|
85
99
|
- benchmark/encode_json_and_marshal.rb
|
86
100
|
- benchmark/encode_json_and_yaml.rb
|
@@ -139,6 +153,7 @@ files:
|
|
139
153
|
- lib/yajl/json_gem.rb
|
140
154
|
- lib/yajl/json_gem/encoding.rb
|
141
155
|
- lib/yajl/json_gem/parsing.rb
|
156
|
+
- lib/yajl/version.rb
|
142
157
|
- spec/encoding/encoding_spec.rb
|
143
158
|
- spec/global/global_spec.rb
|
144
159
|
- spec/http/fixtures/http.bzip2.dump
|
@@ -218,7 +233,6 @@ files:
|
|
218
233
|
- spec/rcov.opts
|
219
234
|
- spec/spec_helper.rb
|
220
235
|
- tasks/compile.rake
|
221
|
-
- tasks/jeweler.rake
|
222
236
|
- tasks/rspec.rake
|
223
237
|
- yajl-ruby.gemspec
|
224
238
|
has_rdoc: true
|
@@ -252,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
252
266
|
requirements: []
|
253
267
|
|
254
268
|
rubyforge_project:
|
255
|
-
rubygems_version: 1.4.
|
269
|
+
rubygems_version: 1.4.1
|
256
270
|
signing_key:
|
257
271
|
specification_version: 3
|
258
272
|
summary: Ruby C bindings to the excellent Yajl JSON stream-based parser library.
|
@@ -267,6 +281,13 @@ test_files:
|
|
267
281
|
- examples/parsing/from_string.rb
|
268
282
|
- spec/encoding/encoding_spec.rb
|
269
283
|
- spec/global/global_spec.rb
|
284
|
+
- spec/http/fixtures/http.bzip2.dump
|
285
|
+
- spec/http/fixtures/http.chunked.dump
|
286
|
+
- spec/http/fixtures/http.deflate.dump
|
287
|
+
- spec/http/fixtures/http.error.dump
|
288
|
+
- spec/http/fixtures/http.gzip.dump
|
289
|
+
- spec/http/fixtures/http.html.dump
|
290
|
+
- spec/http/fixtures/http.raw.dump
|
270
291
|
- spec/http/http_delete_spec.rb
|
271
292
|
- spec/http/http_error_spec.rb
|
272
293
|
- spec/http/http_get_spec.rb
|
@@ -275,6 +296,64 @@ test_files:
|
|
275
296
|
- spec/json_gem_compatibility/compatibility_spec.rb
|
276
297
|
- spec/parsing/active_support_spec.rb
|
277
298
|
- spec/parsing/chunked_spec.rb
|
299
|
+
- spec/parsing/fixtures/fail.15.json
|
300
|
+
- spec/parsing/fixtures/fail.16.json
|
301
|
+
- spec/parsing/fixtures/fail.17.json
|
302
|
+
- spec/parsing/fixtures/fail.26.json
|
303
|
+
- spec/parsing/fixtures/fail11.json
|
304
|
+
- spec/parsing/fixtures/fail12.json
|
305
|
+
- spec/parsing/fixtures/fail13.json
|
306
|
+
- spec/parsing/fixtures/fail14.json
|
307
|
+
- spec/parsing/fixtures/fail19.json
|
308
|
+
- spec/parsing/fixtures/fail20.json
|
309
|
+
- spec/parsing/fixtures/fail21.json
|
310
|
+
- spec/parsing/fixtures/fail22.json
|
311
|
+
- spec/parsing/fixtures/fail23.json
|
312
|
+
- spec/parsing/fixtures/fail24.json
|
313
|
+
- spec/parsing/fixtures/fail25.json
|
314
|
+
- spec/parsing/fixtures/fail27.json
|
315
|
+
- spec/parsing/fixtures/fail28.json
|
316
|
+
- spec/parsing/fixtures/fail3.json
|
317
|
+
- spec/parsing/fixtures/fail4.json
|
318
|
+
- spec/parsing/fixtures/fail5.json
|
319
|
+
- spec/parsing/fixtures/fail6.json
|
320
|
+
- spec/parsing/fixtures/fail9.json
|
321
|
+
- spec/parsing/fixtures/pass.array.json
|
322
|
+
- spec/parsing/fixtures/pass.codepoints_from_unicode_org.json
|
323
|
+
- spec/parsing/fixtures/pass.contacts.json
|
324
|
+
- spec/parsing/fixtures/pass.db100.xml.json
|
325
|
+
- spec/parsing/fixtures/pass.db1000.xml.json
|
326
|
+
- spec/parsing/fixtures/pass.dc_simple_with_comments.json
|
327
|
+
- spec/parsing/fixtures/pass.deep_arrays.json
|
328
|
+
- spec/parsing/fixtures/pass.difficult_json_c_test_case.json
|
329
|
+
- spec/parsing/fixtures/pass.difficult_json_c_test_case_with_comments.json
|
330
|
+
- spec/parsing/fixtures/pass.doubles.json
|
331
|
+
- spec/parsing/fixtures/pass.empty_array.json
|
332
|
+
- spec/parsing/fixtures/pass.empty_string.json
|
333
|
+
- spec/parsing/fixtures/pass.escaped_bulgarian.json
|
334
|
+
- spec/parsing/fixtures/pass.escaped_foobar.json
|
335
|
+
- spec/parsing/fixtures/pass.item.json
|
336
|
+
- spec/parsing/fixtures/pass.json-org-sample1.json
|
337
|
+
- spec/parsing/fixtures/pass.json-org-sample2.json
|
338
|
+
- spec/parsing/fixtures/pass.json-org-sample3.json
|
339
|
+
- spec/parsing/fixtures/pass.json-org-sample4-nows.json
|
340
|
+
- spec/parsing/fixtures/pass.json-org-sample4.json
|
341
|
+
- spec/parsing/fixtures/pass.json-org-sample5.json
|
342
|
+
- spec/parsing/fixtures/pass.map-spain.xml.json
|
343
|
+
- spec/parsing/fixtures/pass.ns-invoice100.xml.json
|
344
|
+
- spec/parsing/fixtures/pass.ns-soap.xml.json
|
345
|
+
- spec/parsing/fixtures/pass.numbers-fp-4k.json
|
346
|
+
- spec/parsing/fixtures/pass.numbers-fp-64k.json
|
347
|
+
- spec/parsing/fixtures/pass.numbers-int-4k.json
|
348
|
+
- spec/parsing/fixtures/pass.numbers-int-64k.json
|
349
|
+
- spec/parsing/fixtures/pass.twitter-search.json
|
350
|
+
- spec/parsing/fixtures/pass.twitter-search2.json
|
351
|
+
- spec/parsing/fixtures/pass.unicode.json
|
352
|
+
- spec/parsing/fixtures/pass.yelp.json
|
353
|
+
- spec/parsing/fixtures/pass1.json
|
354
|
+
- spec/parsing/fixtures/pass2.json
|
355
|
+
- spec/parsing/fixtures/pass3.json
|
278
356
|
- spec/parsing/fixtures_spec.rb
|
279
357
|
- spec/parsing/one_off_spec.rb
|
358
|
+
- spec/rcov.opts
|
280
359
|
- spec/spec_helper.rb
|
data/Gemfile.lock
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: http://rubygems.org/
|
3
|
-
specs:
|
4
|
-
diff-lcs (1.1.2)
|
5
|
-
git (1.2.5)
|
6
|
-
jeweler (1.5.2)
|
7
|
-
bundler (~> 1.0.0)
|
8
|
-
git (>= 1.2.5)
|
9
|
-
rake
|
10
|
-
rake (0.8.7)
|
11
|
-
rake-compiler (0.7.5)
|
12
|
-
rake
|
13
|
-
rspec (2.3.0)
|
14
|
-
rspec-core (~> 2.3.0)
|
15
|
-
rspec-expectations (~> 2.3.0)
|
16
|
-
rspec-mocks (~> 2.3.0)
|
17
|
-
rspec-core (2.3.1)
|
18
|
-
rspec-expectations (2.3.0)
|
19
|
-
diff-lcs (~> 1.1.2)
|
20
|
-
rspec-mocks (2.3.0)
|
21
|
-
|
22
|
-
PLATFORMS
|
23
|
-
ruby
|
24
|
-
|
25
|
-
DEPENDENCIES
|
26
|
-
jeweler
|
27
|
-
rake-compiler (>= 0.7.5)
|
28
|
-
rspec
|
data/VERSION.yml
DELETED
data/tasks/jeweler.rake
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
begin
|
2
|
-
require 'jeweler'
|
3
|
-
Jeweler::Tasks.new do |gem|
|
4
|
-
gem.name = "yajl-ruby"
|
5
|
-
gem.summary = "Ruby C bindings to the excellent Yajl JSON stream-based parser library."
|
6
|
-
gem.email = "seniorlopez@gmail.com"
|
7
|
-
gem.homepage = "http://github.com/brianmario/yajl-ruby"
|
8
|
-
gem.authors = ["Brian Lopez", "Lloyd Hilaiel"]
|
9
|
-
gem.require_paths = ["lib", "ext"]
|
10
|
-
gem.extra_rdoc_files = `git ls-files *.rdoc`.split("\n")
|
11
|
-
gem.files = `git ls-files`.split("\n")
|
12
|
-
gem.extensions = ["ext/yajl/extconf.rb"]
|
13
|
-
gem.files.include %w(lib/jeweler/templates/.document lib/jeweler/templates/.gitignore)
|
14
|
-
end
|
15
|
-
rescue LoadError
|
16
|
-
puts "jeweler, or one of its dependencies, is not available. Install it with: sudo gem install jeweler -s http://gems.github.com"
|
17
|
-
end
|