forked from test-kitchen/kitchen-vagrant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
37 lines (29 loc) · 787 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# -*- encoding: utf-8 -*-
require "bundler/gem_tasks"
require "rspec/core/rake_task"
desc "Run all specs in spec directory"
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = "spec/**/*_spec.rb"
end
desc "Run all test suites"
task :test => [:spec]
require "cane/rake_task"
desc "Run cane to check quality metrics"
Cane::RakeTask.new do |cane|
cane.canefile = "./.cane"
end
require "finstyle"
require "rubocop/rake_task"
RuboCop::RakeTask.new(:style) do |task|
task.options << "--display-cop-names"
end
desc "Display LOC stats"
task :stats do
puts "\n## Production Code Stats"
sh "countloc -r lib/kitchen"
puts "\n## Test Code Stats"
sh "countloc -r spec"
end
desc "Run all quality tasks"
task :quality => [:cane, :style, :stats]
task :default => [:test, :quality]