-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrakefile
30 lines (26 loc) · 853 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
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
desc 'Default: clear the debug log and run unit tests.'
task :default => [:clean_log, :test]
desc 'Remove the old log file'
task :clean_log do
"rm -f #{File.dirname(__FILE__)}/test/debug.log" if File.exists?(File.dirname(__FILE__) + '/test/debug.log')
end
desc 'Test the acts_as_slugable plugin.'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.pattern = 'test/**/*_test.rb'
t.verbose = true
end
desc 'Generate documentation for the acts_as_slugable plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'acts_as_slugable plugin'
rdoc.options << '--all'
rdoc.options << '--inline-source'
rdoc.options << '--line-numbers'
rdoc.rdoc_files.include('README')
rdoc.rdoc_files.include('TODO')
rdoc.rdoc_files.include('lib/**/*.rb')
end