Class: GemOf::YardStickTasks

Inherits:
Object
  • Object
show all
Includes:
Rake::DSL
Defined in:
lib/gem_of/rake_tasks.rb

Overview

a class to hold the yardstick provided yarddoc tasks

Instance Method Summary collapse

Constructor Details

#initializeYardStickTasks

rubocop:disable Metrics/MethodLength instance yardstick tasks in namespace :docs

Examples:

YardStackTasks.new




52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/gem_of/rake_tasks.rb', line 52

def initialize
  namespace :docs do
    desc "Measure YARD coverage. see yardstick/report.txt for output"
    require "yardstick/rake/measurement"
    Yardstick::Rake::Measurement.new(:measure) do |measurement|
      measurement.output = "yardstick/report.txt"
    end

    desc "Verify YARD coverage"
    require "yardstick/rake/verify"
    config = { "require_exact_threshold" => false }
    Yardstick::Rake::Verify.new(:verify, config) do |verify|
      verify.threshold = 80
    end
  end
end