From f8dd2766d5e35fe1f513441d353a2c400a5e45a5 Mon Sep 17 00:00:00 2001 From: Chris Anderson Date: Thu, 1 Jan 2009 21:07:19 -0800 Subject: [PATCH] removed doc.json special case --- lib/couchrest/helper/file_manager.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/couchrest/helper/file_manager.rb b/lib/couchrest/helper/file_manager.rb index e489493..9af54f2 100644 --- a/lib/couchrest/helper/file_manager.rb +++ b/lib/couchrest/helper/file_manager.rb @@ -227,7 +227,6 @@ module CouchRest design['language'] = lang if lang @db.save(design) push_directory(attachdir, docid) - push_fields(appdir, docid) end @@ -235,7 +234,6 @@ module CouchRest fields = {} (Dir["#{appdir}/**/*.*"] - Dir["#{appdir}/views/**/*.*"] - - Dir["#{appdir}/doc.json"] - Dir["#{appdir}/_attachments/**/*.*"]).each do |file| farray = file.sub(appdir, '').sub(/^\//,'').split('/') myfield = fields @@ -252,12 +250,8 @@ module CouchRest myfield[fname] = fguts end end - if File.exists?("#{appdir}/doc.json") - default_json = JSON.parse(File.open("#{appdir}/doc.json").read) - end design = @db.get(docid) rescue {} design.merge!(fields) - design.merge!(default_json) if default_json @db.save(design) end