From 862bc9aa6b002f6b29cf74f93ca66e63cf370819 Mon Sep 17 00:00:00 2001 From: murphy Date: Wed, 31 Mar 2010 22:17:06 +0000 Subject: Upporting changes from 0.9.2 (vs. 0.9.1). --- rake_tasks/documentation.rake | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) (limited to 'rake_tasks/documentation.rake') diff --git a/rake_tasks/documentation.rake b/rake_tasks/documentation.rake index 9a96a02..162699d 100644 --- a/rake_tasks/documentation.rake +++ b/rake_tasks/documentation.rake @@ -1,24 +1,16 @@ -require 'rake/rdoctask' -require 'pathname' - -CODERAY_TEMPLATE = Pathname.new(File.dirname(__FILE__)).join('..', 'rake_helpers', 'coderay_rdoc_template.rb').expand_path.to_s - -def set_rdoc_info rd +desc 'Generate documentation for CodeRay' +Rake::RDocTask.new :doc do |rd| rd.main = 'lib/README' - rd.title = "CodeRay Documentation" + rd.title = 'CodeRay Documentation' + rd.options << '--line-numbers' << '--inline-source' << '--tab-width' << '2' rd.options << '--fmt' << ENV.fetch('format', 'html_coderay') - # rd.options << '--all' + require 'pathname' + template = File.join ROOT, 'rake_helpers', 'coderay_rdoc_template.rb' + rd.template = Pathname.new(template).expand_path.to_s - rd.template = ENV.fetch('template', CODERAY_TEMPLATE) - rd.rdoc_files.add(*EXTRA_FILES.in(ROOT)) - rd.rdoc_files.add(*Dir[File.join(LIB_ROOT, 'coderay', '**', '*.rb')]) - rd.rdoc_files.add(*Dir[File.join(LIB_ROOT, '*.rb')]) -end - -desc 'Generate documentation for CodeRay' -Rake::RDocTask.new :doc do |rd| - set_rdoc_info rd + rd.rdoc_files.add EXTRA_RDOC_FILES + rd.rdoc_files.add Dir['lib'] rd.rdoc_dir = 'doc' end -- cgit v1.2.1