30 lines
613 B
Ruby
30 lines
613 B
Ruby
|
#!/usr/bin/env rake
|
||
|
require 'bundler/gem_tasks'
|
||
|
|
||
|
require 'rspec/core/rake_task'
|
||
|
RSpec::Core::RakeTask.new
|
||
|
|
||
|
task :test => :spec
|
||
|
|
||
|
begin
|
||
|
require 'rubocop/rake_task'
|
||
|
RuboCop::RakeTask.new
|
||
|
rescue LoadError
|
||
|
task :rubocop do
|
||
|
$stderr.puts 'RuboCop is disabled'
|
||
|
end
|
||
|
end
|
||
|
|
||
|
require 'yardstick/rake/measurement'
|
||
|
Yardstick::Rake::Measurement.new do |measurement|
|
||
|
measurement.output = 'measurement/report.txt'
|
||
|
end
|
||
|
|
||
|
require 'yardstick/rake/verify'
|
||
|
Yardstick::Rake::Verify.new do |verify|
|
||
|
verify.require_exact_threshold = false
|
||
|
verify.threshold = 58
|
||
|
end
|
||
|
|
||
|
task :default => [:spec, :rubocop, :verify_measurements]
|