aboutsummaryrefslogtreecommitdiffstats
path: root/Rakefile
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-06-16 03:45:18 +0200
committerXavier Noria <fxn@hashref.com>2010-06-16 04:06:20 +0200
commit07c6b7a6ad70fd021516d413caa5c3ac914933ac (patch)
treec82a99e949d35b51a4b4fb6533d90a4cd5785fc4 /Rakefile
parent5cd3c2a8556c8b1391508508c0f2ddfe89214028 (diff)
downloadrails-07c6b7a6ad70fd021516d413caa5c3ac914933ac.tar.gz
rails-07c6b7a6ad70fd021516d413caa5c3ac914933ac.tar.bz2
rails-07c6b7a6ad70fd021516d413caa5c3ac914933ac.zip
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
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile13
1 files changed, 12 insertions, 1 deletions
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')