Sha256: b0af7ea606303d1a82a4d287d15326ce3862c2d1c53531c587f740103104959e

Contents?: true

Size: 976 Bytes

Versions: 106

Compression:

Stored size: 976 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

106 entries across 106 versions & 7 rubygems

Version Path
dor-services-4.13.2 lib/tasks/rdoc.rake
dor-services-4.13.1 lib/tasks/rdoc.rake
dor-services-4.13.0 lib/tasks/rdoc.rake
dor-services-4.6.6.3 lib/tasks/rdoc.rake
dor-services-4.12.3 lib/tasks/rdoc.rake
lyber-core-3.2.4 lib/tasks/rdoc.rake
dor-services-4.12.2 lib/tasks/rdoc.rake
dor-services-4.12.1 lib/tasks/rdoc.rake
dor-services-4.12.0 lib/tasks/rdoc.rake
dor-services-4.11.1 lib/tasks/rdoc.rake
dor-services-4.11.0 lib/tasks/rdoc.rake
dor-services-4.9.0 lib/tasks/rdoc.rake
dor-services-4.8.3 lib/tasks/rdoc.rake
lyber-utils-0.1.2 lib/tasks/rdoc.rake
lyber-core-3.2.2 lib/tasks/rdoc.rake
dor-services-4.8.2 lib/tasks/rdoc.rake
dor-services-4.8.1 lib/tasks/rdoc.rake
dor-services-4.8.0 lib/tasks/rdoc.rake
dor-services-4.6.6.2 lib/tasks/rdoc.rake
dor-services-4.6.6.1 lib/tasks/rdoc.rake