push forms/ into _design/$this/forms

This commit is contained in:
Jan Lehnardt 2008-12-25 21:48:02 +01:00
parent 6b4913e9e8
commit 5a35359f51

View file

@ -174,22 +174,9 @@ module CouchRest
Dir["#{forms_dir}/lib.#{design_lang}"].collect do |global_lib|
libs << open(global_lib).read
libs << "\n"
end
Dir["#{forms_dir}/#{folder}/lib.#{design_lang}"].collect do |global_lib|
libs << open(global_lib).read
libs << "\n"
end
designs[folder]["forms"]["#{form_name}"] = read(design_doc, libs)
end
end
# # cleanup empty maps and reduces
# designs.each do |name, props|
# props["forms"].each do |view, funcs|
# next unless view.include?("reduce")
# props["forms"].delete(view) unless funcs.keys.include?("reduce")
# end
# end
designs.each do |k,v|
create_or_update("_design/#{k}", v)