Sha256: 3de1f49d6cb9c3478388d96e63ca62d8426d3de5f189c76e196bcc889e85cf9b

Contents?: true

Size: 957 Bytes

Versions: 7

Compression:

Stored size: 957 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.rdoc') ] +
                   [ File.join(project_root, 'LICENSE') ]

      yt.options = ['--output-dir', doc_destination, '--readme', 'README.rdoc']
    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.exists?(doc_destination)
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
dor-services-4.25.1 lib/tasks/rdoc.rake
dor-services-4.25.0 lib/tasks/rdoc.rake
dor-services-4.24.0 lib/tasks/rdoc.rake
dor-services-4.23.0 lib/tasks/rdoc.rake
dor-services-4.22.6 lib/tasks/rdoc.rake
dor-services-4.22.5 lib/tasks/rdoc.rake
dor-services-4.22.4 lib/tasks/rdoc.rake