aboutsummaryrefslogtreecommitdiffstats
path: root/Rakefile
diff options
context:
space:
mode:
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile28
1 files changed, 8 insertions, 20 deletions
diff --git a/Rakefile b/Rakefile
index c49942c0bb..4e56da5ab3 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,8 +1,8 @@
-gem 'rdoc', '= 2.2'
+gem 'rdoc', '>= 2.5.9'
require 'rdoc'
require 'rake'
-require 'rake/rdoctask'
+require 'rdoc/task'
require 'rake/gempackagetask'
PROJECTS = %w(activesupport activemodel actionpack actionmailer activeresource activerecord railties)
@@ -10,7 +10,7 @@ PROJECTS = %w(activesupport activemodel actionpack actionmailer activeresource a
desc 'Run all tests by default'
task :default => %w(test test:isolated)
-%w(test test:isolated rdoc package gem).each do |task_name|
+%w(test test:isolated package gem).each do |task_name|
desc "Run #{task_name} task for all projects"
task task_name do
errors = []
@@ -62,24 +62,15 @@ task :install => :gem do
end
desc "Generate documentation for the Rails framework"
-Rake::RDocTask.new do |rdoc|
+RDoc::Task.new do |rdoc|
rdoc.rdoc_dir = 'doc/rdoc'
rdoc.title = "Ruby on Rails Documentation"
- rdoc.options << '--line-numbers' << '--inline-source'
- rdoc.options << '-A cattr_accessor=object'
- rdoc.options << '--charset' << 'utf-8'
- rdoc.options << '--main' << 'README.rdoc'
+ rdoc.options << '-f' << 'horo'
+ rdoc.options << '-c' << 'utf-8'
+ rdoc.options << '-m' << 'README.rdoc'
- # 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('README.rdoc')
rdoc.rdoc_files.include('railties/CHANGELOG')
rdoc.rdoc_files.include('railties/MIT-LICENSE')
@@ -129,9 +120,6 @@ desc "Publish API docs for Rails as a whole and for each component"
task :pdoc => :rdoc do
require 'rake/contrib/sshpublisher'
Rake::SshDirPublisher.new("rails@api.rubyonrails.org", "public_html/api", "doc/rdoc").upload
- PROJECTS.each do |project|
- system %(cd #{project} && #{$0} pdoc)
- end
end
task :update_versions do