Sha256: 444840b94a8658ff2b682daacb1ae513a883fc3f89890ca369cdb1eb2f947a94

Contents?: true

Size: 1.44 KB

Versions: 4

Compression:

Stored size: 1.44 KB

Contents

# -*- encoding : utf-8 -*-
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'yard/rake/yardoc_task'
require 'inch/rake'
require 'reek/rake/task'

desc 'Run all specs'
task spec: ['spec:unit', 'spec:acceptance']

namespace :spec do
  desc 'Run unit specs'
  RSpec::Core::RakeTask.new(:unit) do |task|
    task.pattern = 'spec/unit/**/*_spec.rb'
  end

  desc 'Run acceptance specs – requires running instance of ArangoDB'
  RSpec::Core::RakeTask.new(:acceptance) do |task|
    task.pattern = 'spec/acceptance/**/*_spec.rb'
  end
end

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

namespace :metrics do
  Inch::Rake::Suggest.new do |t|
    t.args << '--pedantic'
  end

  Reek::Rake::Task.new do |t|
    t.fail_on_error = true
    t.config_files = 'config/reek.yml'
  end

  desc 'Run mutant to check for mutation coverage'
  task :mutant do
    raise 'mutant-rspec is not compatible with RSpec 3.0.0 right now'
    require 'mutant'
    require 'mutant-rspec'

    namespaces = YAML.load_file('config/mutant.yml').map { |n| "::#{n}*" }
    arguments  = %w(--include lib --require ashikawa-core --use rspec).concat(namespaces)
    status = Mutant::CLI.run(arguments)
    exit 'Mutant task is not successful' if status.nonzero?
  end
end

desc 'Start a REPL with guacamole loaded (not the Rails part)'
task :console do
  require 'bundler/setup'

  require 'pry'
  require 'ashikawa-core'
  ARGV.clear
  Pry.start
end

task default: :spec
task ci: ['spec', 'metrics:reek']

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ashikawa-core-0.14.0 Rakefile
ashikawa-core-0.13.1 Rakefile
ashikawa-core-0.13.0 Rakefile
ashikawa-core-0.12.0 Rakefile