Skip to content

Commit

Permalink
add rake task for generating docs with YARD
Browse files Browse the repository at this point in the history
  • Loading branch information
lamont-granquist committed Jun 20, 2013
1 parent 25dbcb9 commit 06627ab
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -6,6 +6,7 @@ gem "activesupport", :group => :compat_testing, :platform => "ruby"

group(:docgen) do
gem "ronn"
gem "yard"
end

group(:development, :test) do
Expand Down
15 changes: 15 additions & 0 deletions Rakefile
Expand Up @@ -118,5 +118,20 @@ end

task :docs => "docs:all"

begin
require 'yard'
DOC_FILES = [ "README.rdoc", "LICENSE", "spec/tiny_server.rb", "lib/**/*.rb" ]
namespace :yard do
desc "Create YARD documentation"

YARD::Rake::YardocTask.new(:html) do |t|
t.files = DOC_FILES
t.options = ['--format', 'html']
end
end

rescue LoadError
puts "yard is not available. (sudo) gem install yard to generate yard documentation."
end


0 comments on commit 06627ab

Please sign in to comment.