Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Disabling reset_design_doc to avoid conflict errors

  • Loading branch information...
commit 0e282f0727f62403d96598cebbf6705a91ec21dd 1 parent ab6d833
Sam Lown authored
2  lib/couchrest.rb
View
@@ -28,7 +28,7 @@
# = CouchDB, close to the metal
module CouchRest
- VERSION = '0.37.3' unless self.const_defined?("VERSION")
+ VERSION = '0.37.4' unless self.const_defined?("VERSION")
autoload :Server, 'couchrest/core/server'
autoload :Database, 'couchrest/core/database'
9 lib/couchrest/mixins/design_doc.rb
View
@@ -60,7 +60,7 @@ def stored_design_doc(db = database)
def refresh_design_doc(db = database)
raise "Database missing for design document refresh" if db.nil?
unless design_doc_fresh(db)
- reset_design_doc
+ #reset_design_doc(db)
save_design_doc(db)
design_doc_fresh(db, true)
end
@@ -91,8 +91,9 @@ def design_doc_fresh(db, fresh = nil)
end
end
- def reset_design_doc
- current = stored_design_doc
+ # Depricated (not very useful)
+ def reset_design_doc(db = database)
+ current = stored_design_doc(db)
design_doc['_id'] = design_doc_id
if current.nil?
design_doc.delete('_rev')
@@ -104,7 +105,7 @@ def reset_design_doc
# Writes out a design_doc to a given database, returning the
# updated design doc
def update_design_doc(design_doc, db, force = false)
- saved = stored_design_doc
+ saved = stored_design_doc(db)
if saved
# Perform Hash comparison on views, only part that interests us
if force || design_doc['views'] != saved['views']
1  spec/couchrest/more/extended_doc_view_spec.rb
View
@@ -55,6 +55,7 @@ class Unattached < CouchRest::ExtendedDocument
Article.view_by :title
lambda{Article.by_title}.should_not raise_error
end
+
end
describe "another model with a simple view" do
Please sign in to comment.
Something went wrong with that request. Please try again.