summaryrefslogtreecommitdiff
path: root/lib/tapicero/json_stream.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tapicero/json_stream.rb')
-rw-r--r--lib/tapicero/json_stream.rb31
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/tapicero/json_stream.rb b/lib/tapicero/json_stream.rb
deleted file mode 100644
index 64b160f..0000000
--- a/lib/tapicero/json_stream.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-require 'net/http'
-require 'uri'
-require 'yajl'
-
-# UNUSED: We're currently using couchrest instead as that is what we use all
-# over the place. It internally uses curl to fetch the stream.
-#
-# Since Yajl HTTP Stream will go a way in version 2.0 here's a simple substitude.
-#
-module Tapicero
- class JsonStream
-
- def self.get(url, options, &block)
- uri = URI(url)
- parser = Yajl::Parser.new(options)
- parser.on_parse_complete = block
- Net::HTTP.start(uri.host, uri.port) do |http|
- request = Net::HTTP::Get.new uri.request_uri
-
-
- http.request request do |response|
- response.read_body do |chunk|
- parser << chunk
- end
- end
- end
-
- end
- end
-end
-