summaryrefslogtreecommitdiff
path: root/lib/tapicero/json_stream.rb
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2013-09-12 09:57:45 +0200
committerAzul <azul@riseup.net>2013-09-12 09:57:45 +0200
commit37f87300c9804bdad66d730b676715e242b9ca42 (patch)
tree7fa746846c2a127812d28d58cc5f0abd04cf180d /lib/tapicero/json_stream.rb
parent929fcdea37f92f6b175482c6e0d1b8ff3229854f (diff)
use CouchRest::Database#changes, store and retrieve seq
This commit bundles a few different changes: * we now use the CouchRest::Database#changes stream instead of our own * we store and read the last sequence number so on a restart we can start where we left * we now have a UserDatabase class rather than the CouchDatabaseCreator. It also knows about it's name and we create an instance of it per database we want to create. It's also more flexible when the databases already exist.
Diffstat (limited to 'lib/tapicero/json_stream.rb')
-rw-r--r--lib/tapicero/json_stream.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/tapicero/json_stream.rb b/lib/tapicero/json_stream.rb
index d906ce2..64b160f 100644
--- a/lib/tapicero/json_stream.rb
+++ b/lib/tapicero/json_stream.rb
@@ -2,8 +2,11 @@ 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