lib/grape-dsl/doc.rb in grape-dsl-1.1.0 vs lib/grape-dsl/doc.rb in grape-dsl-1.1.1

- old
+ new

@@ -289,10 +289,12 @@ container_markup_begin= "<pre><code class=\"" container_markup_end= "\">" container_markup_close= "</code></pre>" + toc_mark= "\n{{>toc}}\n" + end when "github","wiki","md" begin @@ -310,10 +312,11 @@ sheader= hheader[0]*3 +" " container_markup_begin= "```" container_markup_end= "" container_markup_close= "```" + toc_mark= "" end else raise ArgumentError, "invalid :type has been set, try github or redmine" @@ -323,35 +326,23 @@ end # site name begin write_out_array = Array.new - write_out_array.push "#{hheader}Database Rest Control Layer Documentation\n" - write_out_array.push "#{mheader}REST application routes:\n" + write_out_array.push "#{hheader}#{$0} REST Interface Documentation\n\n" end - # description begin - write_out_array.push "#{sheader}this is the documentation for #{$0} rest calls\n\n"+ - " the main function is to create a control layer to the database,\n"+ - "with interactive commands, that can handle multiple way from ask requests,\n"+ - "like regexp search by string, or different parameters for an array ask,\n"+ - "relation connection handle.\n\n"+ - " The calls input are the parameters, the description tells what does it do,\n"+ - "like read from db, create in the db or update in the db by xy params, and how.\n" - args[:desc_files].each do |extra_desc_file_path| write_out_array.push "#{sheader}#{extra_desc_file_path.split(File::Separator).last.split('.')[0].downcase.capitalize}\n" - write_out_array.push "<pre>" - write_out_array.push File.open(extra_desc_file_path,"r").read - write_out_array.push "</pre>\n" + write_out_array.push " "+File.open(extra_desc_file_path,"r").read end end # table of contents begin - write_out_array.push "\n{{>toc}}\n" + write_out_array.push toc_mark end # classes array begin rest_models= Array.new