lib/ruote/couch/database.rb in ruote-couch-2.1.7 vs lib/ruote/couch/database.rb in ruote-couch-2.1.8

- old
+ new

@@ -37,11 +37,15 @@ attr_reader :type def initialize (host, port, type, name, re_put_ok=true) - @couch = Rufus::Jig::Couch.new(host, port, name, :re_put_ok => re_put_ok) + opts = { :re_put_ok => re_put_ok } + #opts[:timeout] = TODO + + @couch = Rufus::Jig::Couch.new(host, port, name, opts) + @couch.put('.') unless @couch.get('.') @type = type prepare @@ -56,12 +60,12 @@ # :update_rev => true : # updating the current doc _rev, this trick allows # direct "create then apply" chaining end - def get (key) + def get (key, opts={}) - @couch.get(key) + @couch.get(key, opts) end def delete (doc) @couch.delete(doc)