From b0ee08ded6aca81a58b82ebd99dbfaaa441ac9f2 Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 4 Sep 2012 18:26:19 +0200 Subject: added test for CouchStream, made url_for protected --- lib/couch_stream.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/couch_stream.rb b/lib/couch_stream.rb index e3f66cc..bed296a 100644 --- a/lib/couch_stream.rb +++ b/lib/couch_stream.rb @@ -11,8 +11,10 @@ class CouchStream yield(hash) end end + + protected - def url_for(path, options) + def url_for(path, options = {}) url = @server + @db + '/' + path url += '?' if options.any? url += options.map {|k,v| "#{k}=#{v}"}.join('&') -- cgit v1.2.3