-
Notifications
You must be signed in to change notification settings - Fork 11
/
Rakefile
47 lines (40 loc) · 817 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
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env rake
# encoding: utf-8
require 'bundler'
Bundler::GemHelper.install_tasks
desc 'Clean some generated files'
task :clean do
%w(
.bundle
.cache
coverage
doc
*.gem
Gemfile.lock
.inch
vendor
.yardoc
).each { |f| FileUtils.rm_rf(Dir.glob(f)) }
end
desc 'Generate Ruby documentation'
task :yard do
require 'yard'
YARD::Rake::YardocTask.new do |t|
t.stats_options = %w(--list-undoc)
end
end
task doc: %w(yard)
desc 'Run RuboCop style checks'
task :rubocop do
require 'rubocop/rake_task'
RuboCop::RakeTask.new
end
desc 'Run all style checks'
task style: %w(rubocop)
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end
task default: %w(style test)