-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
38 lines (29 loc) · 854 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
require 'rubygems'
require 'yard'
require 'rake/testtask'
require 'rcov'
task :default => :test
Rake::TestTask.new do |t|
t.test_files = FileList['test/**/*test.rb']
t.verbose = true
end
YARD::Tags::Library.define_tag :action, :action
class MyYardFactory < YARD::Tags::DefaultFactory
def parse_tag_action
# dummy
end
end
YARD::Tags::Library.default_factory = MyYardFactory
YARD::Rake::YardocTask.new do |t|
t.options = ['--protected', '--private', '--title', 'Puerto Rico Documentation', '--markup', 'markdown']
end
desc 'Measures test coverage'
task :coverage do
rm_f "coverage"
rm_f "coverage.data"
rcov = "rcov --aggregate coverage.data -Ilib"
system("#{rcov} --html test/**/*test.rb test/*test.rb")
system("open coverage/index.html") if PLATFORM['darwin']
end
desc "Everything"
task :all => [:test, :yard, :coverage]