Skip to content

Commit

Permalink
migrates the Jamis template to RDoc 2.x, the root Rakefile requires R…
Browse files Browse the repository at this point in the history
…Doc 2.2

To understand the changes in horo.rb check rdoc/template.rb in a RDoc 2.x
  • Loading branch information
fxn committed Jun 16, 2010
1 parent 5cd3c2a commit 07c6b7a
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 129 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ elsif RUBY_ENGINE == "jruby"
end

group :documentation do
gem 'rdoc', '2.1'
gem 'rdoc', '2.2'
end

if ENV['CI']
Expand Down
13 changes: 12 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
gem 'rdoc', '= 2.2'
require 'rdoc'

require 'rake'
require 'rake/rdoctask'
require 'rake/gempackagetask'
Expand Down Expand Up @@ -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')
Expand Down
Loading

0 comments on commit 07c6b7a

Please sign in to comment.