Sha256: 9c0afc2f998574bf492ae339101e78faaa6501806d2bf639448137d9c08fbe3c
Contents?: true
Size: 948 Bytes
Versions: 66
Compression:
Stored size: 948 Bytes
Contents
desc 'Generate RDoc' task :doc => ['doc:generate'] namespace :doc do project_root = File.expand_path(File.join(File.dirname(__FILE__), '..', '..')) doc_destination = File.join(project_root, 'rdoc') begin require 'yard' require 'yard/rake/yardoc_task' YARD::Rake::YardocTask.new(:generate) do |yt| yt.files = Dir.glob(File.join(project_root, 'lib', '*.rb')) + Dir.glob(File.join(project_root, 'lib', '**', '*.rb')) + ['-'] + [ File.join(project_root, 'README.md') ] + [ File.join(project_root, 'LICENSE') ] yt.options = ['--output-dir', doc_destination, '--readme', 'README.md'] end rescue LoadError desc 'Generate YARD Documentation' task :generate do abort 'Please install the YARD gem to generate rdoc.' end end desc 'Remove generated documenation' task :clean do rm_r doc_destination if File.exist?(doc_destination) end end
Version data entries
66 entries across 66 versions & 1 rubygems