-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathRakefile
42 lines (31 loc) · 1.05 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
require "rake/clean"
CLEAN.include ["minitest-parallel_fork-*.gem", "rdoc", "coverage"]
desc "Build minitest-parallel_fork gem"
task :package=>[:clean] do |p|
sh %{#{FileUtils::RUBY} -S gem build minitest-parallel_fork.gemspec}
end
### Specs
desc "Run specs"
task :spec do
ENV['RUBY'] = FileUtils::RUBY
sh %{#{FileUtils::RUBY} #{"-w" if RUBY_VERSION >= '3'} #{'-W:strict_unused_block' if RUBY_VERSION >= '3.4'} spec/minitest_parallel_fork_spec.rb}
end
task :default=>:spec
desc "Run specs with coverage"
task :spec_cov do
ENV['COVERAGE'] = '1'
ENV['RUBY'] = FileUtils::RUBY
sh %{#{FileUtils::RUBY} spec/minitest_parallel_fork_spec.rb}
end
### RDoc
require "rdoc/task"
RDoc::Task.new do |rdoc|
rdoc.rdoc_dir = "rdoc"
rdoc.options += ["--quiet", "--line-numbers", "--inline-source", '--title', 'minitest-parallel_fork: fork-based parallelization for minitest', '--main', 'README.rdoc']
begin
gem 'hanna'
rdoc.options += ['-f', 'hanna']
rescue Gem::LoadError
end
rdoc.rdoc_files.add %w"README.rdoc CHANGELOG MIT-LICENSE lib/**/*.rb"
end