Browse files

The Jamis rdoc template is only used if it is present.

git-svn-id: svn+ssh://rubyforge.org/var/svn/rake/trunk@330 5af023f1-ac1a-0410-98d6-829a145c37ef
  • Loading branch information...
1 parent 1f2d2ba commit 0482ac8b14a9f0063303414a72ff77592734c050 jimweirich committed Mar 6, 2005
Showing with 16 additions and 1 deletion.
  1. +16 −1 rake/Rakefile
View
17 rake/Rakefile
@@ -16,9 +16,18 @@ require 'rake/clean'
require 'rake/testtask'
require 'rake/rdoctask'
+require 'rbconfig'
+if File.exists? File.join(Config::CONFIG['rubylibdir'], "rdoc/generators/template/html/jamis.rb")
+ RDOC_TEMPLATE = 'jamis'
+else
+ RDOC_TEMPLATE = 'kilmer'
+end
+
CLEAN.include('**/*.o')
CLOBBER.include('doc/example/main', 'testdata')
+
+
# Determine the current version of the software
if `ruby -Ilib ./bin/rake --version` =~ /\S+$/
@@ -42,19 +51,25 @@ Rake::TestTask.new(:testall) do |t|
'test/contrib/test*.rb',
'test/fun*.rb'
]
+ t.warning = true
+ t.verbose = true
end
Rake::TestTask.new(:test) do |t|
t.test_files = FileList['test/test*.rb']
+ t.warning = true
+ t.verbose = true
end
Rake::TestTask.new(:testfun) do |t|
t.pattern = 'test/fun*.rb'
+ t.warning = true
end
Rake::TestTask.new(:testcontrib) do |t|
t.pattern = 'test/contrib/test*.rb'
t.verbose = true
+ t.warning = true
end
directory 'testdata'
@@ -91,7 +106,7 @@ rd = Rake::RDocTask.new("rdoc") { |rdoc|
rdoc.rdoc_dir = 'html'
# rdoc.template = 'kilmer'
# rdoc.template = 'css2'
- rdoc.template = 'jamis'
+ rdoc.template = RDOC_TEMPLATE
rdoc.title = "Rake -- Ruby Make"
rdoc.options << '--line-numbers' << '--inline-source' << '--main' << 'README'
rdoc.rdoc_files.include('README', 'MIT-LICENSE', 'TODO', 'CHANGES')

0 comments on commit 0482ac8

Please sign in to comment.