-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
47 lines (38 loc) · 1.12 KB
/
Copy pathRakefile
File metadata and controls
47 lines (38 loc) · 1.12 KB
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
38
39
40
41
42
43
44
45
46
47
require "bundler/gem_tasks"
require "rake/testtask"
require "rdoc/task"
require "standard/rake"
Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/*_test.rb"]
end
RDoc::Task.new(:rdoc) do |t|
t.rdoc_dir = "doc"
t.rdoc_files.include("lib/**/*.rb")
t.options << "--all"
end
desc "Check RDoc coverage"
task :rdoc_coverage do
output = `rdoc -C lib 2>&1`
puts output
abort "RDoc coverage is not 100%" unless output.include?("100.00% documented")
end
desc "Run mutation tests"
task :mutant do
system("bundle exec mutant run") || abort("Mutation testing failed!")
end
desc "Lint with RuboCop"
task :rubocop do
system("bundle exec rubocop") || abort("RuboCop failed!")
end
desc "Lint with RuboCop and Standard Ruby"
task lint: %i[rubocop standard]
desc "Type check with Steep"
task :steep do
system("bundle exec steep check") || abort("Type checking failed!")
end
Rake::Task["release"].clear
desc "Build gem and create tag (gem push handled by CI)"
task release: %w[build release:guard_clean release:source_control_push]
task default: %i[test lint rdoc_coverage mutant steep]