aaronmallen/activeinteractor

View on GitHub
Rakefile

Summary

Maintainability
Test Coverage
# frozen_string_literal: true

require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'active_interactor/version'

RSpec::Core::RakeTask.new(:rspec)

begin
  require 'mdl'
  require 'rubocop/rake_task'
  require 'yard'

  RuboCop::RakeTask.new do |task|
    task.options << '-D'
  end

  task :mdl do
    puts 'Linting markdown documents...'
    MarkdownLint.run(Dir['*.md'])
  # MarkdownLint#run calls system exit regardless of status.
  rescue SystemExit # rubocop:disable Lint/SuppressedException
  end

  YARD::Rake::YardocTask.new(:doc)

  Rake::Task[:spec].clear.enhance %i[mdl rubocop rspec]
  task default: %i[spec doc build]
rescue LoadError
  Rake::Task[:spec].clear.enhance %i[rspec]
  task default: %i[spec build]
end