2010-08-10 04:44:14 +00:00
|
|
|
require "rake"
|
|
|
|
|
|
|
|
begin
|
2010-08-10 05:01:21 +00:00
|
|
|
require "yard"
|
2010-08-10 04:44:14 +00:00
|
|
|
require "yard/rake/yardoc_task"
|
|
|
|
|
|
|
|
namespace :doc do
|
|
|
|
desc "Generate Yardoc documentation"
|
|
|
|
YARD::Rake::YardocTask.new do |yardoc|
|
|
|
|
yardoc.name = "yard"
|
2010-08-10 05:01:21 +00:00
|
|
|
yardoc.options = ["--verbose"]
|
|
|
|
yardoc.files = [
|
|
|
|
"lib/**/*.rb", "ext/**/*.c", "README", "CHANGELOG", "LICENSE"
|
|
|
|
]
|
2010-08-10 04:44:14 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
task "clobber" => ["doc:clobber_yard"]
|
|
|
|
|
|
|
|
desc "Alias to doc:yard"
|
|
|
|
task "doc" => "doc:yard"
|
|
|
|
rescue LoadError
|
|
|
|
# If yard isn't available, it's not the end of the world
|
|
|
|
desc "Alias to doc:rdoc"
|
|
|
|
task "doc" => "doc:rdoc"
|
|
|
|
end
|