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

Version Path
dor-services-6.0.0 lib/tasks/rdoc.rake
dor-services-5.32.1 lib/tasks/rdoc.rake
dor-services-5.32.0 lib/tasks/rdoc.rake
dor-services-5.31.1 lib/tasks/rdoc.rake
dor-services-5.31.0 lib/tasks/rdoc.rake
dor-services-5.30.0 lib/tasks/rdoc.rake
dor-services-5.29.0 lib/tasks/rdoc.rake
dor-services-5.28.0 lib/tasks/rdoc.rake
dor-services-5.27.0 lib/tasks/rdoc.rake
dor-services-5.26.3 lib/tasks/rdoc.rake
dor-services-5.26.2 lib/tasks/rdoc.rake
dor-services-5.26.1 lib/tasks/rdoc.rake
dor-services-5.26.0 lib/tasks/rdoc.rake
dor-services-5.25.0 lib/tasks/rdoc.rake
dor-services-5.24.1 lib/tasks/rdoc.rake
dor-services-5.24.0 lib/tasks/rdoc.rake
dor-services-5.23.1 lib/tasks/rdoc.rake
dor-services-5.23.0 lib/tasks/rdoc.rake
dor-services-5.22.3 lib/tasks/rdoc.rake
dor-services-5.22.2 lib/tasks/rdoc.rake