forked from kmuto/review
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
52 lines (46 loc) · 1 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
51
52
begin
require 'bundler'
Bundler::GemHelper.install_tasks
rescue LoadError
# ignore if bundler does not exist
end
require 'rubygems'
require 'rake/testtask'
require 'rake/clean'
task :default => [:test, :rubocop]
task :rubocop do
begin
require 'rubocop/rake_task'
RuboCop::RakeTask.new
rescue LoadError
warn "rubocop not found"
end
end
Rake::TestTask.new("test") do |t|
t.libs << "test"
t.test_files = Dir.glob("test/**/test_*.rb")
t.verbose = true
t.warning = false
end
begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |t|
t.rcov_opts << '-x /gems/'
t.rcov_opts << '-x /tmp/'
t.libs << 'test'
t.pattern = 'test/test_*.rb'
t.verbose = true
end
rescue LoadError
end
begin
require 'rdoc/task'
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "review #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
rescue LoadError
end