yajl-ruby 0.6.0 → 0.6.1
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 +3 -0
- data/VERSION.yml +1 -1
- data/lib/yajl.rb +1 -1
- data/lib/yajl/http_stream.rb +5 -5
- data/yajl-ruby.gemspec +2 -2
- metadata +2 -2
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.6.1 (August 20th, 2009)
|
4
|
+
* Fixed a bug in Yajl::HttpStream where responses contained multiple JSON strings but weren't Transfer-Encoding: chunked (thanks @dacort!)
|
5
|
+
|
3
6
|
## 0.6.0 (August 19th, 2009)
|
4
7
|
* Added POST, PUT and DELETE support to Yajl::HttpStream
|
5
8
|
** 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.
|
data/VERSION.yml
CHANGED
data/lib/yajl.rb
CHANGED
data/lib/yajl/http_stream.rb
CHANGED
@@ -84,9 +84,9 @@ module Yajl
|
|
84
84
|
end
|
85
85
|
end
|
86
86
|
parser = Yajl::Parser.new(opts)
|
87
|
+
parser.on_parse_complete = block if block_given?
|
87
88
|
if response_head[:headers]["Transfer-Encoding"] == 'chunked'
|
88
89
|
if block_given?
|
89
|
-
parser.on_parse_complete = block
|
90
90
|
chunkLeft = 0
|
91
91
|
while !socket.eof? && (size = socket.gets.hex)
|
92
92
|
next if size == 0
|
@@ -108,13 +108,13 @@ module Yajl
|
|
108
108
|
if ALLOWED_MIME_TYPES.include?(content_type)
|
109
109
|
case response_head[:headers]["Content-Encoding"]
|
110
110
|
when "gzip"
|
111
|
-
return Yajl::Gzip::StreamReader.parse(socket, opts)
|
111
|
+
return Yajl::Gzip::StreamReader.parse(socket, opts, &block)
|
112
112
|
when "deflate"
|
113
|
-
return Yajl::Deflate::StreamReader.parse(socket, opts.merge({:deflate_options => -Zlib::MAX_WBITS}))
|
113
|
+
return Yajl::Deflate::StreamReader.parse(socket, opts.merge({:deflate_options => -Zlib::MAX_WBITS}), &block)
|
114
114
|
when "bzip2"
|
115
|
-
return Yajl::Bzip2::StreamReader.parse(socket, opts)
|
115
|
+
return Yajl::Bzip2::StreamReader.parse(socket, opts, &block)
|
116
116
|
else
|
117
|
-
return
|
117
|
+
return parser.parse(socket)
|
118
118
|
end
|
119
119
|
else
|
120
120
|
raise InvalidContentType, "The response MIME type #{content_type}"
|
data/yajl-ruby.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{yajl-ruby}
|
8
|
-
s.version = "0.6.
|
8
|
+
s.version = "0.6.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Brian Lopez", "Lloyd Hilaiel"]
|
12
|
-
s.date = %q{2009-08-
|
12
|
+
s.date = %q{2009-08-20}
|
13
13
|
s.email = %q{seniorlopez@gmail.com}
|
14
14
|
s.extensions = ["ext/extconf.rb"]
|
15
15
|
s.extra_rdoc_files = [
|
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.6.
|
4
|
+
version: 0.6.1
|
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-08-
|
13
|
+
date: 2009-08-20 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|