-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
58 lines (42 loc) · 1.2 KB
/
Rakefile
File metadata and controls
58 lines (42 loc) · 1.2 KB
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
58
require 'yard'
require 'yard/rake/yardoc_task'
require 'fileutils'
DOC_FILES = [
"example.rb",
"lib/test/verbose_unit/test_case.rb",
"lib/test/verbose_unit/assertions.rb",
"lib/test/verbose_unit/assertion_failed_error.rb",
"test/test_assertions.rb"
]
task :default => [:all]
task :all => [:readme, :doc]
task :clean => [:clean_readme, :clean_doc]
# - README ------------------------------------------------------------------- #
task :readme do
File.open("README", "w") do |o|
o.puts "= VerboseAssertions"
DOC_FILES.each do |path|
o.puts
o.puts "== #{path}"
o.puts
File.open(path, "r") do |i|
while !i.eof?
o.print " #{i.readline}"
end
end
end
end
end
task :clean_readme do
File.delete("README") if File.file?("README")
end
# - end of README ------------------------------------------------------------ #
# - Documentation ------------------------------------------------------------ #
task :doc => [:yard]
YARD::Rake::YardocTask.new do |t|
t.files = ['**/*.rb']
end
task :clean_doc do
FileUtils.rm_rf("doc") if File.directory?("doc")
end
# - end of Documentation ----------------------------------------------------- #