brianmario-yajl-ruby 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 6
3
- :patch: 0
3
+ :patch: 1
4
4
  :major: 0
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.6.0"
16
+ VERSION = "0.6.1"
17
17
 
18
18
  class Parser
19
19
  # A helper method for parse-and-forget use-cases
@@ -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 Yajl::Parser.new(opts).parse(socket)
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.0"
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-19}
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: brianmario-yajl-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
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-19 00:00:00 -07:00
13
+ date: 2009-08-20 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies: []
16
16