forked from slim-template/slim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
57 lines (48 loc) · 1.17 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
53
54
55
56
57
begin
require 'bundler'
Bundler::GemHelper.install_tasks
rescue Exception
end
require 'rake/testtask'
desc 'Run Slim benchmarks! (default parameters slow=false iterations=1000)'
task :bench, :iterations, :slow do
ruby('benchmarks/run-benchmarks.rb')
end
Rake::TestTask.new('test') do |t|
t.libs << 'lib' << 'test/slim'
t.test_files = FileList['test/slim/test_*.rb']
t.verbose = true
end
Rake::TestTask.new('test:rails') do |t|
t.libs << 'lib'
t.test_files = FileList['test/rails/test/test_*.rb']
t.verbose = true
end
task 'test:ci' do |t|
Rake::Task[ENV['TASK']].execute
end
begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |t|
t.libs << 'lib' << 'test/slim'
t.test_files = FileList['test/slim/test_*.rb']
t.verbose = true
end
rescue LoadError
task :rcov do
abort 'RCov is not available. In order to run rcov, you must: gem install rcov'
end
end
begin
require 'yard'
YARD::Rake::YardocTask.new do |t|
t.files = %w(lib/**/*.rb)
end
rescue LoadError
task :yard do
abort 'YARD is not available. In order to run yard, you must: gem install yard'
end
end
desc "Generate Documentation"
task :doc => :yard
task :default => 'test'