diff options
-rw-r--r-- | Gemfile | 1 | ||||
-rw-r--r-- | Rakefile | 15 |
2 files changed, 16 insertions, 0 deletions
@@ -6,6 +6,7 @@ gem "activesupport", :group => :compat_testing, :platform => "ruby" group(:docgen) do gem "ronn" + gem "yard" end group(:development, :test) do @@ -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 |