Sha256: 701a8be2d01bcc6b4109f46aae71bdf29decf22ef354e15c3ca8695f8a9708a0

Contents?: true

Size: 892 Bytes

Versions: 6

Compression:

Stored size: 892 Bytes

Contents

require "bundler/gem_tasks"

require 'rake/testtask'

Rake::TestTask.new(:test) do |test|
  test.libs << 'lib' << 'test'
  test.test_files = FileList['test/**/test_*.rb']
  test.verbose = true
end

task :default => :test

namespace :doc do
  project_root = File.dirname(__FILE__)
  doc_destination = File.join(project_root, 'rdoc')

  begin
    require 'rdoc'
    require 'yard'
    require 'yard/rake/yardoc_task'

    YARD::Rake::YardocTask.new(:generate) do |yt|
    yt.files   = Dir.glob(File.join(project_root, 'lib', '**', '*.rb'))
    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_dir if File.exists?(doc_destination)
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ratelimit-1.1.0 Rakefile
ratelimit-1.0.4 Rakefile
ratelimit-1.0.3 Rakefile
ratelimit-1.0.2 Rakefile
ratelimit-1.0.1 Rakefile
ratelimit-1.0.0 Rakefile