yajl-ruby 0.5.12 → 0.6.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/CHANGELOG.md +4 -0
- data/README.rdoc +1 -1
- data/VERSION.yml +2 -2
- data/lib/yajl.rb +1 -1
- data/lib/yajl/http_stream.rb +96 -70
- data/spec/http/http_delete_spec.rb +85 -0
- data/spec/http/{http_spec.rb → http_get_spec.rb} +0 -0
- data/spec/http/http_post_spec.rb +86 -0
- data/spec/http/http_put_spec.rb +86 -0
- data/yajl-ruby.gemspec +13 -4
- metadata +10 -5
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.6.0 (August 19th, 2009)
|
4
|
+
* Added POST, PUT and DELETE support to Yajl::HttpStream
|
5
|
+
** POST support initially contributed by jdg (http://github.com/jdg) - Although oortle (http://github.com/oortle) coded it up in a fork with it as well.
|
6
|
+
|
3
7
|
## 0.5.12 (July 31st, 2009)
|
4
8
|
* Add another option that can be passed to Yajl::Encoder's constructor (:terminator) to allow the caller some control over
|
5
9
|
when a full JSON string has been generated by the encoder. More information on it's use in the README
|
data/README.rdoc
CHANGED
@@ -180,7 +180,7 @@ Using EventMachine and you want to encode and send in chunks?
|
|
180
180
|
#
|
181
181
|
# Send our MOTD and status
|
182
182
|
@encoder.encode(@motd) do |chunk|
|
183
|
-
if chunk.nil?
|
183
|
+
if chunk.nil? # got our terminator, encoding is done
|
184
184
|
close_connection_after_writing
|
185
185
|
else
|
186
186
|
send_data(chunk)
|
data/VERSION.yml
CHANGED
data/lib/yajl.rb
CHANGED
data/lib/yajl/http_stream.rb
CHANGED
@@ -16,86 +16,112 @@ module Yajl
|
|
16
16
|
ALLOWED_MIME_TYPES = ["application/json", "text/plain"]
|
17
17
|
|
18
18
|
# Makes a basic HTTP GET request to the URI provided
|
19
|
-
# 1. a raw socket is opened to the server/host provided
|
20
|
-
# 2. the request is made using HTTP/1.0, Accept-encoding: gzip (deflate support coming soon, too)
|
21
|
-
# 3. the response is read until the end of the headers
|
22
|
-
# 4. the _socket itself_ is passed directly to Yajl, for direct parsing off the stream; As it's being received over the wire!
|
23
19
|
def self.get(uri, opts = {}, &block)
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
request
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
request
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
if
|
46
|
-
|
47
|
-
|
48
|
-
header = line.split(": ")
|
49
|
-
if header.size == 1
|
50
|
-
header = header[0].split(" ")
|
51
|
-
response_head[:version] = header[0]
|
52
|
-
response_head[:code] = header[1].to_i
|
53
|
-
response_head[:msg] = header[2]
|
54
|
-
# this is the response code line
|
55
|
-
else
|
56
|
-
response_head[:headers][header[0]] = header[1].strip
|
57
|
-
end
|
20
|
+
request("GET", uri, opts, &block)
|
21
|
+
end
|
22
|
+
|
23
|
+
# Makes a basic HTTP POST request to the URI provided
|
24
|
+
def self.post(uri, body, opts = {}, &block)
|
25
|
+
request("POST", uri, opts.merge({:body => body}), &block)
|
26
|
+
end
|
27
|
+
|
28
|
+
# Makes a basic HTTP PUT request to the URI provided
|
29
|
+
def self.put(uri, body, opts = {}, &block)
|
30
|
+
request("PUT", uri, opts.merge({:body => body}), &block)
|
31
|
+
end
|
32
|
+
|
33
|
+
# Makes a basic HTTP DELETE request to the URI provided
|
34
|
+
def self.delete(uri, opts = {}, &block)
|
35
|
+
request("DELETE", uri, opts, &block)
|
36
|
+
end
|
37
|
+
|
38
|
+
protected
|
39
|
+
def self.request(method, uri, opts = {}, &block)
|
40
|
+
user_agent = opts.has_key?('User-Agent') ? opts.delete(['User-Agent']) : "Yajl::HttpStream #{Yajl::VERSION}"
|
41
|
+
if method == "POST" || method == "PUT"
|
42
|
+
content_type = opts.has_key?('Content-Type') ? opts.delete(['Content-Type']) : "application/x-www-form-urlencoded"
|
43
|
+
body = opts.delete(:body)
|
58
44
|
end
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
45
|
+
|
46
|
+
socket = TCPSocket.new(uri.host, uri.port)
|
47
|
+
request = "#{method} #{uri.path}#{uri.query ? "?"+uri.query : nil} HTTP/1.1\r\n"
|
48
|
+
request << "Host: #{uri.host}\r\n"
|
49
|
+
request << "Authorization: Basic #{[uri.userinfo].pack('m').strip!}\r\n" unless uri.userinfo.nil?
|
50
|
+
request << "User-Agent: #{user_agent}\r\n"
|
51
|
+
request << "Accept: */*\r\n"
|
52
|
+
if method == "POST" || method == "PUT"
|
53
|
+
request << "Content-Length: #{body.length}\r\n"
|
54
|
+
request << "Content-Type: #{content_type}\r\n"
|
55
|
+
end
|
56
|
+
request << "Connection: close\r\n"
|
57
|
+
encodings = []
|
58
|
+
encodings << "bzip2" if defined?(Yajl::Bzip2)
|
59
|
+
encodings << "gzip" if defined?(Yajl::Gzip)
|
60
|
+
encodings << "deflate" if defined?(Yajl::Deflate)
|
61
|
+
request << "Accept-Encoding: #{encodings.join(',')}\r\n" if encodings.any?
|
62
|
+
request << "Accept-Charset: utf-8\r\n\r\n"
|
63
|
+
if method == "POST" || method == "PUT"
|
64
|
+
request << body
|
65
|
+
end
|
66
|
+
socket.write(request)
|
67
|
+
response_head = {}
|
68
|
+
response_head[:headers] = {}
|
69
|
+
|
70
|
+
socket.each_line do |line|
|
71
|
+
if line == "\r\n" # end of the headers
|
72
|
+
break
|
73
|
+
else
|
74
|
+
header = line.split(": ")
|
75
|
+
if header.size == 1
|
76
|
+
header = header[0].split(" ")
|
77
|
+
response_head[:version] = header[0]
|
78
|
+
response_head[:code] = header[1].to_i
|
79
|
+
response_head[:msg] = header[2]
|
80
|
+
# this is the response code line
|
71
81
|
else
|
72
|
-
|
73
|
-
parser << socket.read(chunkLeft)
|
82
|
+
response_head[:headers][header[0]] = header[1].strip
|
74
83
|
end
|
75
84
|
end
|
76
|
-
else
|
77
|
-
raise Exception, "Chunked responses detected, but no block given to handle the chunks."
|
78
85
|
end
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
86
|
+
parser = Yajl::Parser.new(opts)
|
87
|
+
if response_head[:headers]["Transfer-Encoding"] == 'chunked'
|
88
|
+
if block_given?
|
89
|
+
parser.on_parse_complete = block
|
90
|
+
chunkLeft = 0
|
91
|
+
while !socket.eof? && (size = socket.gets.hex)
|
92
|
+
next if size == 0
|
93
|
+
json = socket.read(size)
|
94
|
+
chunkLeft = size-json.size
|
95
|
+
if chunkLeft == 0
|
96
|
+
parser << json
|
97
|
+
else
|
98
|
+
# received only part of the chunk, grab the rest
|
99
|
+
parser << socket.read(chunkLeft)
|
100
|
+
end
|
101
|
+
end
|
90
102
|
else
|
91
|
-
|
103
|
+
raise Exception, "Chunked responses detected, but no block given to handle the chunks."
|
92
104
|
end
|
93
105
|
else
|
94
|
-
|
106
|
+
content_type = response_head[:headers]["Content-Type"].split(';')
|
107
|
+
content_type = content_type.first
|
108
|
+
if ALLOWED_MIME_TYPES.include?(content_type)
|
109
|
+
case response_head[:headers]["Content-Encoding"]
|
110
|
+
when "gzip"
|
111
|
+
return Yajl::Gzip::StreamReader.parse(socket, opts)
|
112
|
+
when "deflate"
|
113
|
+
return Yajl::Deflate::StreamReader.parse(socket, opts.merge({:deflate_options => -Zlib::MAX_WBITS}))
|
114
|
+
when "bzip2"
|
115
|
+
return Yajl::Bzip2::StreamReader.parse(socket, opts)
|
116
|
+
else
|
117
|
+
return Yajl::Parser.new(opts).parse(socket)
|
118
|
+
end
|
119
|
+
else
|
120
|
+
raise InvalidContentType, "The response MIME type #{content_type}"
|
121
|
+
end
|
95
122
|
end
|
123
|
+
ensure
|
124
|
+
socket.close
|
96
125
|
end
|
97
|
-
ensure
|
98
|
-
socket.close
|
99
|
-
end
|
100
126
|
end
|
101
127
|
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper.rb')
|
3
|
+
require 'yajl/bzip2'
|
4
|
+
require 'yajl/gzip'
|
5
|
+
require 'yajl/deflate'
|
6
|
+
require 'yajl/http_stream'
|
7
|
+
|
8
|
+
def parse_off_headers(io)
|
9
|
+
io.each_line do |line|
|
10
|
+
if line == "\r\n" # end of the headers
|
11
|
+
break
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "Yajl HTTP DELETE request" do
|
17
|
+
before(:all) do
|
18
|
+
raw = File.new(File.expand_path(File.dirname(__FILE__) + '/fixtures/http.raw.dump'), 'r')
|
19
|
+
parse_off_headers(raw)
|
20
|
+
@template_hash = Yajl::Parser.parse(raw)
|
21
|
+
|
22
|
+
raw.rewind
|
23
|
+
parse_off_headers(raw)
|
24
|
+
@template_hash_symbolized = Yajl::Parser.parse(raw, :symbolize_keys => true)
|
25
|
+
|
26
|
+
@deflate = File.new(File.expand_path(File.dirname(__FILE__) + '/fixtures/http.deflate.dump'), 'r')
|
27
|
+
@gzip = File.new(File.expand_path(File.dirname(__FILE__) + '/fixtures/http.gzip.dump'), 'r')
|
28
|
+
end
|
29
|
+
|
30
|
+
after(:each) do
|
31
|
+
@file_path = nil
|
32
|
+
end
|
33
|
+
|
34
|
+
def prepare_mock_request_dump(format=:raw)
|
35
|
+
@request = File.new(File.expand_path(File.dirname(__FILE__) + "/fixtures/http.#{format}.dump"), 'r')
|
36
|
+
@uri = 'file://'+File.expand_path(File.dirname(__FILE__) + "/fixtures/http/http.#{format}.dump")
|
37
|
+
TCPSocket.should_receive(:new).and_return(@request)
|
38
|
+
@request.should_receive(:write)
|
39
|
+
@uri.should_receive(:host).at_least(2).times
|
40
|
+
@uri.should_receive(:port)
|
41
|
+
@uri.should_receive(:path)
|
42
|
+
@uri.should_receive(:query)
|
43
|
+
@uri.should_receive(:userinfo)
|
44
|
+
end
|
45
|
+
|
46
|
+
it "should parse a raw response" do
|
47
|
+
prepare_mock_request_dump :raw
|
48
|
+
@template_hash.should == Yajl::HttpStream.delete(@uri)
|
49
|
+
end
|
50
|
+
|
51
|
+
it "should parse a raw response and symbolize keys" do
|
52
|
+
prepare_mock_request_dump :raw
|
53
|
+
@template_hash_symbolized.should == Yajl::HttpStream.delete(@uri, :symbolize_keys => true)
|
54
|
+
end
|
55
|
+
|
56
|
+
it "should parse a bzip2 compressed response" do
|
57
|
+
prepare_mock_request_dump :bzip2
|
58
|
+
@template_hash.should == Yajl::HttpStream.delete(@uri)
|
59
|
+
end
|
60
|
+
|
61
|
+
it "should parse a bzip2 compressed response and symbolize keys" do
|
62
|
+
prepare_mock_request_dump :bzip2
|
63
|
+
@template_hash_symbolized.should == Yajl::HttpStream.delete(@uri, :symbolize_keys => true)
|
64
|
+
end
|
65
|
+
|
66
|
+
it "should parse a deflate compressed response" do
|
67
|
+
prepare_mock_request_dump :deflate
|
68
|
+
@template_hash.should == Yajl::HttpStream.delete(@uri)
|
69
|
+
end
|
70
|
+
|
71
|
+
it "should parse a deflate compressed response and symbolize keys" do
|
72
|
+
prepare_mock_request_dump :deflate
|
73
|
+
@template_hash_symbolized.should == Yajl::HttpStream.delete(@uri, :symbolize_keys => true)
|
74
|
+
end
|
75
|
+
|
76
|
+
it "should parse a gzip compressed response" do
|
77
|
+
prepare_mock_request_dump :gzip
|
78
|
+
@template_hash.should == Yajl::HttpStream.delete(@uri)
|
79
|
+
end
|
80
|
+
|
81
|
+
it "should parse a gzip compressed response and symbolize keys" do
|
82
|
+
prepare_mock_request_dump :gzip
|
83
|
+
@template_hash_symbolized.should == Yajl::HttpStream.delete(@uri, :symbolize_keys => true)
|
84
|
+
end
|
85
|
+
end
|
File without changes
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper.rb')
|
3
|
+
require 'yajl/bzip2'
|
4
|
+
require 'yajl/gzip'
|
5
|
+
require 'yajl/deflate'
|
6
|
+
require 'yajl/http_stream'
|
7
|
+
|
8
|
+
def parse_off_headers(io)
|
9
|
+
io.each_line do |line|
|
10
|
+
if line == "\r\n" # end of the headers
|
11
|
+
break
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "Yajl HTTP POST request" do
|
17
|
+
before(:all) do
|
18
|
+
raw = File.new(File.expand_path(File.dirname(__FILE__) + '/fixtures/http.raw.dump'), 'r')
|
19
|
+
parse_off_headers(raw)
|
20
|
+
@template_hash = Yajl::Parser.parse(raw)
|
21
|
+
|
22
|
+
raw.rewind
|
23
|
+
parse_off_headers(raw)
|
24
|
+
@template_hash_symbolized = Yajl::Parser.parse(raw, :symbolize_keys => true)
|
25
|
+
|
26
|
+
@deflate = File.new(File.expand_path(File.dirname(__FILE__) + '/fixtures/http.deflate.dump'), 'r')
|
27
|
+
@gzip = File.new(File.expand_path(File.dirname(__FILE__) + '/fixtures/http.gzip.dump'), 'r')
|
28
|
+
@body = "blah=foo&bar=baz"
|
29
|
+
end
|
30
|
+
|
31
|
+
after(:each) do
|
32
|
+
@file_path = nil
|
33
|
+
end
|
34
|
+
|
35
|
+
def prepare_mock_request_dump(format=:raw)
|
36
|
+
@request = File.new(File.expand_path(File.dirname(__FILE__) + "/fixtures/http.#{format}.dump"), 'r')
|
37
|
+
@uri = 'file://'+File.expand_path(File.dirname(__FILE__) + "/fixtures/http/http.#{format}.dump")
|
38
|
+
TCPSocket.should_receive(:new).and_return(@request)
|
39
|
+
@request.should_receive(:write)
|
40
|
+
@uri.should_receive(:host).at_least(2).times
|
41
|
+
@uri.should_receive(:port)
|
42
|
+
@uri.should_receive(:path)
|
43
|
+
@uri.should_receive(:query)
|
44
|
+
@uri.should_receive(:userinfo)
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should parse a raw response" do
|
48
|
+
prepare_mock_request_dump :raw
|
49
|
+
@template_hash.should == Yajl::HttpStream.post(@uri, @body)
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should parse a raw response and symbolize keys" do
|
53
|
+
prepare_mock_request_dump :raw
|
54
|
+
@template_hash_symbolized.should == Yajl::HttpStream.post(@uri, @body, :symbolize_keys => true)
|
55
|
+
end
|
56
|
+
|
57
|
+
it "should parse a bzip2 compressed response" do
|
58
|
+
prepare_mock_request_dump :bzip2
|
59
|
+
@template_hash.should == Yajl::HttpStream.post(@uri, @body)
|
60
|
+
end
|
61
|
+
|
62
|
+
it "should parse a bzip2 compressed response and symbolize keys" do
|
63
|
+
prepare_mock_request_dump :bzip2
|
64
|
+
@template_hash_symbolized.should == Yajl::HttpStream.post(@uri, @body, :symbolize_keys => true)
|
65
|
+
end
|
66
|
+
|
67
|
+
it "should parse a deflate compressed response" do
|
68
|
+
prepare_mock_request_dump :deflate
|
69
|
+
@template_hash.should == Yajl::HttpStream.post(@uri, @body)
|
70
|
+
end
|
71
|
+
|
72
|
+
it "should parse a deflate compressed response and symbolize keys" do
|
73
|
+
prepare_mock_request_dump :deflate
|
74
|
+
@template_hash_symbolized.should == Yajl::HttpStream.post(@uri, @body, :symbolize_keys => true)
|
75
|
+
end
|
76
|
+
|
77
|
+
it "should parse a gzip compressed response" do
|
78
|
+
prepare_mock_request_dump :gzip
|
79
|
+
@template_hash.should == Yajl::HttpStream.post(@uri, @body)
|
80
|
+
end
|
81
|
+
|
82
|
+
it "should parse a gzip compressed response and symbolize keys" do
|
83
|
+
prepare_mock_request_dump :gzip
|
84
|
+
@template_hash_symbolized.should == Yajl::HttpStream.post(@uri, @body, :symbolize_keys => true)
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper.rb')
|
3
|
+
require 'yajl/bzip2'
|
4
|
+
require 'yajl/gzip'
|
5
|
+
require 'yajl/deflate'
|
6
|
+
require 'yajl/http_stream'
|
7
|
+
|
8
|
+
def parse_off_headers(io)
|
9
|
+
io.each_line do |line|
|
10
|
+
if line == "\r\n" # end of the headers
|
11
|
+
break
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "Yajl HTTP PUT request" do
|
17
|
+
before(:all) do
|
18
|
+
raw = File.new(File.expand_path(File.dirname(__FILE__) + '/fixtures/http.raw.dump'), 'r')
|
19
|
+
parse_off_headers(raw)
|
20
|
+
@template_hash = Yajl::Parser.parse(raw)
|
21
|
+
|
22
|
+
raw.rewind
|
23
|
+
parse_off_headers(raw)
|
24
|
+
@template_hash_symbolized = Yajl::Parser.parse(raw, :symbolize_keys => true)
|
25
|
+
|
26
|
+
@deflate = File.new(File.expand_path(File.dirname(__FILE__) + '/fixtures/http.deflate.dump'), 'r')
|
27
|
+
@gzip = File.new(File.expand_path(File.dirname(__FILE__) + '/fixtures/http.gzip.dump'), 'r')
|
28
|
+
@body = "blah=foo&bar=baz"
|
29
|
+
end
|
30
|
+
|
31
|
+
after(:each) do
|
32
|
+
@file_path = nil
|
33
|
+
end
|
34
|
+
|
35
|
+
def prepare_mock_request_dump(format=:raw)
|
36
|
+
@request = File.new(File.expand_path(File.dirname(__FILE__) + "/fixtures/http.#{format}.dump"), 'r')
|
37
|
+
@uri = 'file://'+File.expand_path(File.dirname(__FILE__) + "/fixtures/http/http.#{format}.dump")
|
38
|
+
TCPSocket.should_receive(:new).and_return(@request)
|
39
|
+
@request.should_receive(:write)
|
40
|
+
@uri.should_receive(:host).at_least(2).times
|
41
|
+
@uri.should_receive(:port)
|
42
|
+
@uri.should_receive(:path)
|
43
|
+
@uri.should_receive(:query)
|
44
|
+
@uri.should_receive(:userinfo)
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should parse a raw response" do
|
48
|
+
prepare_mock_request_dump :raw
|
49
|
+
@template_hash.should == Yajl::HttpStream.put(@uri, @body)
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should parse a raw response and symbolize keys" do
|
53
|
+
prepare_mock_request_dump :raw
|
54
|
+
@template_hash_symbolized.should == Yajl::HttpStream.put(@uri, @body, :symbolize_keys => true)
|
55
|
+
end
|
56
|
+
|
57
|
+
it "should parse a bzip2 compressed response" do
|
58
|
+
prepare_mock_request_dump :bzip2
|
59
|
+
@template_hash.should == Yajl::HttpStream.put(@uri, @body)
|
60
|
+
end
|
61
|
+
|
62
|
+
it "should parse a bzip2 compressed response and symbolize keys" do
|
63
|
+
prepare_mock_request_dump :bzip2
|
64
|
+
@template_hash_symbolized.should == Yajl::HttpStream.put(@uri, @body, :symbolize_keys => true)
|
65
|
+
end
|
66
|
+
|
67
|
+
it "should parse a deflate compressed response" do
|
68
|
+
prepare_mock_request_dump :deflate
|
69
|
+
@template_hash.should == Yajl::HttpStream.put(@uri, @body)
|
70
|
+
end
|
71
|
+
|
72
|
+
it "should parse a deflate compressed response and symbolize keys" do
|
73
|
+
prepare_mock_request_dump :deflate
|
74
|
+
@template_hash_symbolized.should == Yajl::HttpStream.put(@uri, @body, :symbolize_keys => true)
|
75
|
+
end
|
76
|
+
|
77
|
+
it "should parse a gzip compressed response" do
|
78
|
+
prepare_mock_request_dump :gzip
|
79
|
+
@template_hash.should == Yajl::HttpStream.put(@uri, @body)
|
80
|
+
end
|
81
|
+
|
82
|
+
it "should parse a gzip compressed response and symbolize keys" do
|
83
|
+
prepare_mock_request_dump :gzip
|
84
|
+
@template_hash_symbolized.should == Yajl::HttpStream.put(@uri, @body, :symbolize_keys => true)
|
85
|
+
end
|
86
|
+
end
|
data/yajl-ruby.gemspec
CHANGED
@@ -1,12 +1,15 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
1
4
|
# -*- encoding: utf-8 -*-
|
2
5
|
|
3
6
|
Gem::Specification.new do |s|
|
4
7
|
s.name = %q{yajl-ruby}
|
5
|
-
s.version = "0.
|
8
|
+
s.version = "0.6.0"
|
6
9
|
|
7
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
11
|
s.authors = ["Brian Lopez", "Lloyd Hilaiel"]
|
9
|
-
s.date = %q{2009-
|
12
|
+
s.date = %q{2009-08-19}
|
10
13
|
s.email = %q{seniorlopez@gmail.com}
|
11
14
|
s.extensions = ["ext/extconf.rb"]
|
12
15
|
s.extra_rdoc_files = [
|
@@ -80,7 +83,10 @@ Gem::Specification.new do |s|
|
|
80
83
|
"spec/http/fixtures/http.deflate.dump",
|
81
84
|
"spec/http/fixtures/http.gzip.dump",
|
82
85
|
"spec/http/fixtures/http.raw.dump",
|
83
|
-
"spec/http/
|
86
|
+
"spec/http/http_delete_spec.rb",
|
87
|
+
"spec/http/http_get_spec.rb",
|
88
|
+
"spec/http/http_post_spec.rb",
|
89
|
+
"spec/http/http_put_spec.rb",
|
84
90
|
"spec/json_gem_compatibility/compatibility_spec.rb",
|
85
91
|
"spec/parsing/active_support_spec.rb",
|
86
92
|
"spec/parsing/chunked_spec.rb",
|
@@ -156,7 +162,10 @@ Gem::Specification.new do |s|
|
|
156
162
|
s.summary = %q{Ruby C bindings to the excellent Yajl JSON stream-based parser library.}
|
157
163
|
s.test_files = [
|
158
164
|
"spec/encoding/encoding_spec.rb",
|
159
|
-
"spec/http/
|
165
|
+
"spec/http/http_delete_spec.rb",
|
166
|
+
"spec/http/http_get_spec.rb",
|
167
|
+
"spec/http/http_post_spec.rb",
|
168
|
+
"spec/http/http_put_spec.rb",
|
160
169
|
"spec/json_gem_compatibility/compatibility_spec.rb",
|
161
170
|
"spec/parsing/active_support_spec.rb",
|
162
171
|
"spec/parsing/chunked_spec.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.
|
4
|
+
version: 0.6.0
|
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-
|
13
|
+
date: 2009-08-19 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|
@@ -90,7 +90,10 @@ files:
|
|
90
90
|
- spec/http/fixtures/http.deflate.dump
|
91
91
|
- spec/http/fixtures/http.gzip.dump
|
92
92
|
- spec/http/fixtures/http.raw.dump
|
93
|
-
- spec/http/
|
93
|
+
- spec/http/http_delete_spec.rb
|
94
|
+
- spec/http/http_get_spec.rb
|
95
|
+
- spec/http/http_post_spec.rb
|
96
|
+
- spec/http/http_put_spec.rb
|
94
97
|
- spec/json_gem_compatibility/compatibility_spec.rb
|
95
98
|
- spec/parsing/active_support_spec.rb
|
96
99
|
- spec/parsing/chunked_spec.rb
|
@@ -184,12 +187,14 @@ requirements: []
|
|
184
187
|
rubyforge_project: yajl-ruby
|
185
188
|
rubygems_version: 1.3.5
|
186
189
|
signing_key:
|
187
|
-
source:
|
188
190
|
specification_version: 3
|
189
191
|
summary: Ruby C bindings to the excellent Yajl JSON stream-based parser library.
|
190
192
|
test_files:
|
191
193
|
- spec/encoding/encoding_spec.rb
|
192
|
-
- spec/http/
|
194
|
+
- spec/http/http_delete_spec.rb
|
195
|
+
- spec/http/http_get_spec.rb
|
196
|
+
- spec/http/http_post_spec.rb
|
197
|
+
- spec/http/http_put_spec.rb
|
193
198
|
- spec/json_gem_compatibility/compatibility_spec.rb
|
194
199
|
- spec/parsing/active_support_spec.rb
|
195
200
|
- spec/parsing/chunked_spec.rb
|