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 ===============================================================