From 07c6b7a6ad70fd021516d413caa5c3ac914933ac Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Wed, 16 Jun 2010 03:45:18 +0200 Subject: migrates the Jamis template to RDoc 2.x, the root Rakefile requires RDoc 2.2 To understand the changes in horo.rb check rdoc/template.rb in a RDoc 2.x --- Rakefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 0ee7647a12..204f3381dc 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,6 @@ +gem 'rdoc', '= 2.2' +require 'rdoc' + require 'rake' require 'rake/rdoctask' require 'rake/gempackagetask' @@ -68,7 +71,15 @@ Rake::RDocTask.new do |rdoc| rdoc.options << '--charset' << 'utf-8' rdoc.options << '--main' << 'railties/README' - rdoc.template = ENV['template'] ? "#{ENV['template']}.rb" : './doc/template/horo' + # Workaround: RDoc assumes that rdoc.template can be required, and that + # rdoc.template.upcase is a constant living in RDoc::Generator::HTML + # which holds the actual template class. + # + # We put 'doc/template' in the load path to be able to set the template + # to the string 'horo' and thus meet those RDoc's assumptions. + $:.unshift('doc/template') + + rdoc.template = ENV['template'] ? "#{ENV['template']}.rb" : 'horo' rdoc.rdoc_files.include('railties/CHANGELOG') rdoc.rdoc_files.include('railties/MIT-LICENSE') -- cgit v1.2.3