forked from robbyrussell/shorturl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
41 lines (35 loc) · 1020 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
require "rake"
require "rake/rdoctask"
require "rake/testtask"
task :default => [ :test, :doc ]
desc "Run the tests"
Rake::TestTask.new("test") { |t|
t.pattern = "test/**/ts_*.rb"
t.verbose = true
}
desc "Write the documentation"
Rake::RDocTask.new("doc") { |rdoc|
rdoc.rdoc_dir = "doc"
rdoc.title = "ShortURL Documentation"
# rdoc.options << "--line-numbers --inline-source"
rdoc.rdoc_files.include("README")
rdoc.rdoc_files.include("TODO")
rdoc.rdoc_files.include("MIT-LICENSE")
rdoc.rdoc_files.include("ChangeLog")
rdoc.rdoc_files.include("lib/*.rb")
rdoc.rdoc_files.exclude("test/*")
}
desc "Upload documentation to RubyForge"
task :upload_doc do
sh "scp -r doc/* [email protected]:/var/www/gforge-projects/shorturl"
end
desc "Statistics for the code"
task :stats do
begin
require "code_statistics"
CodeStatistics.new(["Code", "lib"],
["Units", "test"]).to_s
rescue LoadError
puts "Couldn't load code_statistics (install rails)"
end
end