Permalink
Browse files

added ability to use darkfish-rdoc if installed.

  • Loading branch information...
1 parent 7ed9580 commit 9c4d0053f1a6a99ff7320dc297aebc8e50a30c2f @jimweirich committed Apr 22, 2009
Showing with 11 additions and 2 deletions.
  1. +11 −2 Rakefile
View
@@ -128,17 +128,26 @@ end
# Create a task to build the RDOC documentation tree.
-rd = Rake::RDocTask.new("rdoc") { |rdoc|
+begin
+ require 'darkfish-rdoc'
+ DARKFISH_ENABLED = true
+rescue LoadError => ex
+ DARKFISH_ENABLED = false
+end
+
+rd = Rake::RDocTask.new("rdoc") do |rdoc|
rdoc.rdoc_dir = 'html'
rdoc.template = 'doc/jamis.rb'
rdoc.title = "Rake -- Ruby Make"
rdoc.options << '--line-numbers' << '--inline-source' <<
'--main' << 'README' <<
'--title' << 'Rake -- Ruby Make'
+ rdoc.options << '-SHN' << '-f' << 'darkfish' if DARKFISH_ENABLED
+
rdoc.rdoc_files.include('README', 'MIT-LICENSE', 'TODO', 'CHANGES')
rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc')
rdoc.rdoc_files.exclude(/\bcontrib\b/)
-}
+end
# ====================================================================
# Create a task that will package the Rake software into distributable

0 comments on commit 9c4d005

Please sign in to comment.