Skip to content

Commit

Permalink
try to use Hanna for rake rdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed May 4, 2008
1 parent 1ef16f1 commit 43abd3b
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions Rakefile
@@ -1,28 +1,30 @@
require 'rake'
require 'rake/rdoctask'
require 'rubygems'
begin
hanna_dir = '/home/mislav/projects/hanna/lib'
$:.unshift hanna_dir if File.exists? hanna_dir
require 'hanna/rdoctask'
rescue LoadError
require 'rake'
require 'rake/rdoctask'
end
load 'test/tasks.rake'

desc 'Default: run unit tests.'
task :default => :test

desc 'Generate RDoc documentation for the will_paginate plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
files = ['README.rdoc', 'LICENSE', 'CHANGELOG']
files << FileList.new('lib/**/*.rb').
rdoc.rdoc_files.include('README.rdoc', 'LICENSE', 'CHANGELOG').
include('lib/**/*.rb').
exclude('lib/will_paginate/named_scope*').
exclude('lib/will_paginate/array.rb').
exclude('lib/will_paginate/version.rb')

rdoc.rdoc_files.add(files)

rdoc.main = "README.rdoc" # page to start on
rdoc.title = "will_paginate documentation"

templates = %w[/Users/chris/ruby/projects/err/rock/template.rb /var/www/rock/template.rb]
rdoc.template = templates.find { |t| File.exists? t }

rdoc.rdoc_dir = 'doc' # rdoc output folder
rdoc.options << '--inline-source'
rdoc.options << '--charset=UTF-8'
rdoc.options << '--inline-source' << '--charset=UTF-8'
rdoc.options << '--webcvs=http://github.com/mislav/will_paginate/tree/master/'
end

Expand Down

0 comments on commit 43abd3b

Please sign in to comment.