-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathRakefile
44 lines (36 loc) · 846 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
39
40
41
42
43
44
require "rake/testtask"
rdoc_sources = %w(hanna/rdoctask rdoc/task rake/rdoctask)
begin
require rdoc_sources.shift
rescue LoadError
retry
end
begin
require "metric_fu" if RUBY_VERSION < "1.9"
rescue LoadError
end
begin
require "mg"
MG.new("bob.gemspec")
rescue LoadError
end
desc "Default: run all tests"
task :default => :test
SCMs = %w[git svn]
desc "Run unit tests"
task :test => SCMs.map { |scm| "test:#{scm}" } do
ruby "test/bob_test.rb"
ruby "test/test_test.rb"
end
SCMs.each { |scm|
desc "Run unit tests with #{scm}"
task "test:#{scm}" do
ruby "test/scm/#{scm}_test.rb"
end
}
(defined?(RDoc::Task) ? RDoc::Task : Rake::RDocTask).new do |rd|
rd.main = "README.rdoc"
rd.title = "Documentation for Bob the Builder"
rd.rdoc_files.include("README.rdoc", "LICENSE", "lib/**/*.rb")
rd.rdoc_dir = "doc"
end