summaryrefslogtreecommitdiff
path: root/lib/tapicero/couch_stream.rb
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2013-12-19 13:18:28 +0100
committerAzul <azul@riseup.net>2013-12-19 13:18:28 +0100
commite4df501035434cbb1920ccca21e489599b5ad382 (patch)
treedfacb19930d1c28cf53fe041cc8151fe39fe358e /lib/tapicero/couch_stream.rb
parent8104b882032a851604ba6a2a904c7e267523f158 (diff)
Version 0.2.0: use CouchRest::Changes
This also changes the format of the config file. Please make sure to adjust it.
Diffstat (limited to 'lib/tapicero/couch_stream.rb')
-rw-r--r--lib/tapicero/couch_stream.rb28
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/tapicero/couch_stream.rb b/lib/tapicero/couch_stream.rb
deleted file mode 100644
index b63a9fd..0000000
--- a/lib/tapicero/couch_stream.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# UNUSED: we currently use CouchRest's streamer instead. Still keeping this
-# around because it's a simple alternative that works.
-#
-
-module Tapicero
- class CouchStream
- def initialize(database_url)
- @database_url = database_url
- end
-
- def get(path, options)
- url = url_for(path, options)
- # puts url
- Tapicero::JsonStream.get(url, :symbolize_keys => true) do |hash|
- yield(hash)
- end
- end
-
- protected
-
- def url_for(path, options = {})
- url = [@database_url, path].join('/')
- url += '?' if options.any?
- url += options.map {|k,v| "#{k}=#{v}"}.join('&')
- end
- end
-end