Permalink
Browse files

Adding in solrizer:doc task and invoking that in the hudson task.

  • Loading branch information...
1 parent d548f25 commit be9533e2cedd89d92b60f2e5f632adf35210495f @jkeck jkeck committed Apr 28, 2011
Showing with 21 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +19 −0 lib/tasks/solrizer.rake
View
@@ -19,3 +19,5 @@ rerun.txt
.buildpath
/.bundle
+/.yardoc
+/doc
View
@@ -1,5 +1,6 @@
desc "Task to execute builds on a Hudson Continuous Integration Server."
task :hudson do
+ Rake::Task["solrizer:doc"].invoke
Rake::Task["solrizer:rspec"].invoke
end
@@ -23,4 +24,22 @@ namespace :solrizer do
end
end
+ # Use yard to build docs
+ begin
+ require 'yard'
+ require 'yard/rake/yardoc_task'
+ project_root = File.expand_path("#{File.dirname(__FILE__)}/../../")
+ doc_destination = File.join(project_root, 'doc')
+
+ YARD::Rake::YardocTask.new(:doc) do |yt|
+ yt.files = Dir.glob(File.join(project_root, 'lib', '**', '*.rb')) +
+ [ File.join(project_root, 'README.textile') ]
+ yt.options = ['--output-dir', doc_destination, '--readme', 'README.textile']
+ end
+ rescue LoadError
+ desc "Generate YARD Documentation"
+ task :doc do
+ abort "Please install the YARD gem to generate rdoc."
+ end
+ end
end

0 comments on commit be9533e

Please sign in to comment.