[#211] Override the Rails doc:app task to include our doc layout

This commit is contained in:
Eric Davis 2011-02-26 13:29:37 -08:00
parent 03a1d926be
commit 376260e968
2 changed files with 20 additions and 5 deletions

View File

@ -1,5 +0,0 @@
= Redmine
Redmine is a flexible project management web application written using Ruby on Rails framework.
More details can be found at http://www.redmine.org

View File

@ -0,0 +1,20 @@
#clear the doc:app task et al
Rake::Task["doc:app"].clear
Rake::Task["doc/app"].clear
Rake::Task["doc/app/index.html"].clear
namespace :doc do
desc "Generate documentation for the application. Set custom template with TEMPLATE=/path/to/rdoc/template.rb or title with TITLE=\"Custom Title\""
Rake::RDocTask.new("app") { |rdoc|
rdoc.rdoc_dir = 'doc/app'
rdoc.template = ENV['template'] if ENV['template']
rdoc.title = ENV['title'] || "ChiliProject"
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.options << '--charset' << 'utf-8'
rdoc.rdoc_files.include('app/**/*.rb')
rdoc.rdoc_files.include('lib/**/*.rb')
rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('doc/*.rdoc')
rdoc.main = 'README.rdoc'
}
end