forked from mileszs/wicked_pdf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
40 lines (33 loc) · 935 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
require 'rake'
require 'rake/testtask'
require 'rdoc/task'
require 'rails/version'
require 'bundler/gem_tasks'
desc 'Default: run unit tests.'
task :default => :test
desc 'Test the wicked_pdf plugin.'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
t.verbose = true
end
desc "Generate dummy application for test cases"
task :dummy_generate do
# recursively remove test/dummy directory entity
FileUtils.rm_r Dir.glob('test/dummy/*')
prefix = ''
if Rails::VERSION::MAJOR != 2
prefix = 'new '
end
system("rails #{prefix}test/dummy")
FileUtils.rm_r Dir.glob('test/dummy/test/*')
end
desc 'Generate documentation for the wicked_pdf plugin.'
RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'WickedPdf'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README')
rdoc.rdoc_files.include('lib/**/*.rb')
end