Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Disabling reset_design_doc to avoid conflict errors

  • Loading branch information...
commit 0e282f0727f62403d96598cebbf6705a91ec21dd 1 parent ab6d833
Sam Lown authored
2  lib/couchrest.rb
@@ -28,7 +28,7 @@
28 28
29 29 # = CouchDB, close to the metal
30 30 module CouchRest
31   - VERSION = '0.37.3' unless self.const_defined?("VERSION")
  31 + VERSION = '0.37.4' unless self.const_defined?("VERSION")
32 32
33 33 autoload :Server, 'couchrest/core/server'
34 34 autoload :Database, 'couchrest/core/database'
9 lib/couchrest/mixins/design_doc.rb
@@ -60,7 +60,7 @@ def stored_design_doc(db = database)
60 60 def refresh_design_doc(db = database)
61 61 raise "Database missing for design document refresh" if db.nil?
62 62 unless design_doc_fresh(db)
63   - reset_design_doc
  63 + #reset_design_doc(db)
64 64 save_design_doc(db)
65 65 design_doc_fresh(db, true)
66 66 end
@@ -91,8 +91,9 @@ def design_doc_fresh(db, fresh = nil)
91 91 end
92 92 end
93 93
94   - def reset_design_doc
95   - current = stored_design_doc
  94 + # Depricated (not very useful)
  95 + def reset_design_doc(db = database)
  96 + current = stored_design_doc(db)
96 97 design_doc['_id'] = design_doc_id
97 98 if current.nil?
98 99 design_doc.delete('_rev')
@@ -104,7 +105,7 @@ def reset_design_doc
104 105 # Writes out a design_doc to a given database, returning the
105 106 # updated design doc
106 107 def update_design_doc(design_doc, db, force = false)
107   - saved = stored_design_doc
  108 + saved = stored_design_doc(db)
108 109 if saved
109 110 # Perform Hash comparison on views, only part that interests us
110 111 if force || design_doc['views'] != saved['views']
1  spec/couchrest/more/extended_doc_view_spec.rb
@@ -55,6 +55,7 @@ class Unattached < CouchRest::ExtendedDocument
55 55 Article.view_by :title
56 56 lambda{Article.by_title}.should_not raise_error
57 57 end
  58 +
58 59 end
59 60
60 61 describe "another model with a simple view" do

0 comments on commit 0e282f0

Please sign in to comment.
Something went wrong with that request. Please try again.