processi

about processes and engines

allison, rdoc template

Switched my rufus projects rdoc to the Allison template by Evan Weaver.

The manoeuver simply amounted to

    sudo gem install -y allison

and then setting the “rd.template” in my Rakefiles :

#
# DOCUMENTATION

#ALLISON = `allison –path`
ALLISON = “/Library/Ruby/Gems/1.8/gems/”+
“allison-2.0.3/lib/allison.rb”

Rake::RDocTask.new do |rd|

rd.main = “README.txt”

rd.rdoc_dir = “html/rufus-verbs”

rd.rdoc_files.include(
“README.txt”,
“CHANGELOG.txt”,
“LICENSE.txt”,
“CREDITS.txt”,
“lib/**/*.rb”)

rd.title = “rufus-verbs rdoc”

rd.options << '-N' # line numbers rd.options << '-S' # inline source rd.template = ALLISON if File.exist?(ALLISON) end [/sourcecode] (the full Rakefile here)

I tried to derive the path to allison.rb via the `allison --path` but the “.rb” suffix was missing, so I simply put the full path.

Not much work, a nicer view on my doc, got rid of the frames, life in the Ruby ecosystem is good.

Written by John Mettraux

February 16, 2008 at 12:01 pm

Posted in ruby, rufus

3 Responses

Subscribe to comments with RSS.

  1. You can use this to get the template dynamically: Works for me!

    ALLISON = `allison –path`.to_s.strip + ‘.rb’

    Best,
    Bernd

    Bernd Jünger

    June 23, 2008 at 6:43 pm

  2. Or you can also write this if you want to get the path for the Ruby interpreter that is running:

    ALLISON = Gem.required_location(“allison”, “allison.rb”)

    This is useful if you often use different ones.

    Philippe Vosges

    August 21, 2010 at 2:19 pm

  3. Thanks guys.

    By now I use rdoc 2.5.x and its default theme.

    John Mettraux

    August 21, 2010 at 2:25 pm


Comments are closed.

%d bloggers like this: