-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathRakefile
50 lines (38 loc) · 1.2 KB
/
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
48
49
50
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'yaml'
################################
# Tests #
################################
RSpec::Core::RakeTask.new(:test_yoti) do |t|
t.pattern = ['spec/yoti']
end
RSpec::Core::RakeTask.new(:test_generators) do |t|
t.pattern = ['spec/generators']
end
RSpec::Core::RakeTask.new(:spec)
################################
# Rubocop #
################################
require 'rubocop/rake_task'
RuboCop::RakeTask.new(:rubocop) do |t|
t.options = ['--config', 'rubocop.yml']
end
################################
# Documentation #
################################
require 'yard'
YARD::Rake::YardocTask.new do |t|
t.options = ['--output-dir', './yardoc']
t.stats_options = ['--list-undoc']
end
yardstick_options = YAML.load_file('yardstick.yml')
require 'yardstick/rake/measurement'
Yardstick::Rake::Measurement.new(:measurement, yardstick_options) do |measurement|
measurement.output = 'measurement/report.txt'
end
################################
# Defaults #
################################
task default: %i[spec rubocop]
task test: %i[test_yoti test_generators rubocop]