Sha256: 92541acfca2e014a61e1e5cb71bf8d25546de8acd59c548686db17ff8fc0a900

Contents?: true

Size: 844 Bytes

Versions: 2

Compression:

Stored size: 844 Bytes

Contents

require 'rake/testtask'
require 'rubocop/rake_task'
require 'yard'

task default: %i[test rubocop]

Rake::TestTask.new do |t|
  t.libs << 'test'
  t.test_files = Dir['test/unit/**/test_*.rb']
end

namespace :examples do
  desc 'Run all examples'
  task :all do
    require_relative 'examples/helper'
    Dir['examples/*/*.rb'].each { |f| require_relative f }
  end

  Dir['examples/*/*.rb'].each do |f|
    casename = File.basename(File.dirname(f))

    desc "Run example: #{casename}"
    task casename.to_sym => :_init do
      require_relative 'examples/helper'
      require_relative "examples/#{casename}/#{casename}"
    end
  end
end

desc 'Run all examples'
task examples: :'examples:all'

YARD::Rake::YardocTask.new :doc do |yard|
  yard.files = Dir['lib/**/*.rb']
  yard.options = ['--readme', 'README.md']
end

RuboCop::RakeTask.new

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
thinreports-0.10.1 Rakefile
thinreports-0.10.0 Rakefile