From 4063210302181cf0356267a186a1363e5ad15762 Mon Sep 17 00:00:00 2001 From: Chris Anderson Date: Sun, 1 Jun 2008 10:23:24 -0700 Subject: [PATCH] update to new Couch, vendor finish --- lib/couch_rest.rb | 10 ++-------- spec/couch_rest_spec.rb | 3 ++- spec/database_spec.rb | 3 ++- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/couch_rest.rb b/lib/couch_rest.rb index 3f9f172..8d24f15 100644 --- a/lib/couch_rest.rb +++ b/lib/couch_rest.rb @@ -1,13 +1,7 @@ -require File.dirname(__FILE__) + '/../deps/rest-client/lib/rest_client' +require File.dirname(__FILE__) + '/../vendor/rest-client/lib/rest_client' require "rubygems" require 'json' -# gem "json" -# begin -# require "json/ext" -# rescue LoadError -# $stderr.puts "C version of json (fjson) could not be loaded, using pure ruby one" -# require "json/pure" -# end + require File.dirname(__FILE__) + '/database' diff --git a/spec/couch_rest_spec.rb b/spec/couch_rest_spec.rb index 132c595..a49e97a 100644 --- a/spec/couch_rest_spec.rb +++ b/spec/couch_rest_spec.rb @@ -22,7 +22,8 @@ describe CouchRest do it "should be up to date" do v = @cr.info["version"] vi = v.split(/a/).pop.to_i - vi.should be_between(658733, 660751) + vi.should be >= 661484 # versions older than this will likely fail many specs + vi.should be <= 661484 # versions newer than this haven't been tried end end diff --git a/spec/database_spec.rb b/spec/database_spec.rb index e29e148..5c54df7 100644 --- a/spec/database_spec.rb +++ b/spec/database_spec.rb @@ -53,7 +53,8 @@ describe CouchRest::Database do end it "should return the result of the temporary function" do rs = @db.temp_view(:map => "function(doc){emit(doc.beverage, doc.count)}", :reduce => "function(beverage,counts){return sum(counts)}") - rs['result'].should == 9 + # rs.should == 'x' + rs['rows'][0]['value'].should == 9 end end