From a220329002d511d3289b9669231f11ad515c8be0 Mon Sep 17 00:00:00 2001 From: Konstantin Haase Date: Thu, 23 Dec 2010 14:05:00 +0100 Subject: [PATCH] Switch from Hanna to YARD. * hanna has broken dependencies all the time * we have a .yardopts file already for rubydoc.info * just compare the rake tasks * README has a TOC This would also allow using YARD's doc tagging system at some point in the future. Rakefile is still usable even if YARD is not installed. --- .yardopts | 1 + Rakefile | 20 +------------------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/.yardopts b/.yardopts index 0c21cd45..1726764b 100644 --- a/.yardopts +++ b/.yardopts @@ -1,2 +1,3 @@ --readme README.rdoc --title 'Sinatra API Documentation' +'lib/**/*.rb' - '*.rdoc' diff --git a/Rakefile b/Rakefile index fe474d5b..4052f180 100644 --- a/Rakefile +++ b/Rakefile @@ -48,25 +48,7 @@ end desc 'Generate RDoc under doc/api' task 'doc' => ['doc:api'] - -task 'doc:api' => ['doc/api/index.html'] - -file 'doc/api/index.html' => FileList['lib/**/*.rb', 'README.*'] do |f| - require 'rbconfig' - hanna = RbConfig::CONFIG['ruby_install_name'].sub('ruby', 'hanna') - rb_files = f.prerequisites - sh(<<-end.gsub(/\s+/, ' ')) - #{hanna} - --charset utf8 - --fmt html - --inline-source - --line-numbers - --main README.rdoc - --op doc/api - --title 'Sinatra API Documentation' - #{rb_files.join(' ')} - end -end +task('doc:api') { sh "yardoc -o doc/api" } CLEAN.include 'doc/api' # README ===============================================================