Sha256: bd6ce1caeac1c4f0640983657ad9fe86f3883f429e700cf647b6982a4d46a7f2

Contents?: true

Size: 721 Bytes

Versions: 1

Compression:

Stored size: 721 Bytes

Contents

# frozen_string_literal: true

require 'rspec/core/rake_task'
require 'pp'

desc 'Report code statistics (KLOCs, etc)'
task :stats do
  puts Countless::Statistics.new.to_s
end

desc 'Enumerate all annotations'
task :notes do
  puts Countless::Annotations.new.to_s
end

namespace :notes do
  Countless.configuration.annotation_tags.each do |annotation|
    task annotation.downcase.to_sym do
      puts Countless::Annotations.new("@?#{annotation}").to_s
    end
  end

  task :custom do
    annotation = ENV.fetch('ANNOTATION')
    puts Countless::Annotations.new("@?#{annotation}").to_s
  rescue KeyError
    puts 'No annotation was specified.'
    puts "Usage: ANNOTATION='FIXME' rake notes:custom"
    exit 1
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
countless-1.0.0 lib/countless/rake_tasks.rake