From 0519fc57653302b9e04d43d33a1ec609c02fdfdc Mon Sep 17 00:00:00 2001 From: Matt Lyon Date: Fri, 16 Jan 2009 00:37:27 -0800 Subject: [PATCH] patch restclient locally instead of hoping/waiting for an upstream patch. --- lib/couchrest/monkeypatches.rb | 14 ++++++++++++++ spec/couchrest/core/database_spec.rb | 1 - 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/couchrest/monkeypatches.rb b/lib/couchrest/monkeypatches.rb index 58b8fe9..3147ff3 100644 --- a/lib/couchrest/monkeypatches.rb +++ b/lib/couchrest/monkeypatches.rb @@ -21,4 +21,18 @@ class Time # rescue # fallback # end +end + +module RestClient + def self.copy(url, headers={}) + Request.execute(:method => :copy, + :url => url, + :headers => headers) + end + + def self.move(url, headers={}) + Request.execute(:method => :move, + :url => url, + :headers => headers) + end end \ No newline at end of file diff --git a/spec/couchrest/core/database_spec.rb b/spec/couchrest/core/database_spec.rb index e84b5e3..5acec75 100644 --- a/spec/couchrest/core/database_spec.rb +++ b/spec/couchrest/core/database_spec.rb @@ -492,7 +492,6 @@ describe CouchRest::Database do it "should work" do @db.copy @doc, @docid newdoc = @db.get(@docid) - debugger newdoc['artist'].should == 'Zappa' end it "should fail without an _id" do