-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
executable file
·50 lines (40 loc) · 1.11 KB
/
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
45
46
47
48
49
50
#!/usr/bin/env rake
require "bundler/gem_tasks"
require "rdoc/task"
require "rspec/core/rake_task"
require "rubocop/rake_task"
RuboCop::RakeTask.new
RSpec::Core::RakeTask.new(:spec)
namespace :script do
desc "Run the Tapestry simple script"
task :simple do
system("ruby ./examples/tapestry-simple.rb")
end
desc "Run the Tapestry factory script"
task :factory do
system("ruby ./examples/tapestry-factory.rb")
end
desc "Run the Tapestry data setter script"
task :data_set do
system("ruby ./examples/tapestry-data-set.rb")
end
end
namespace :spec do
desc 'Clean all generated reports'
task :clean do
system('rm -rf spec/reports')
end
RSpec::Core::RakeTask.new(all: :clean) do |config|
options = %w[--color]
options += %w[--format documentation]
options += %w[--format html --out spec/reports/unit-test-report.html]
config.rspec_opts = options
end
end
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'doc'
rdoc.main = 'README.md'
rdoc.title = "Tapestry #{Tapestry::VERSION}"
rdoc.rdoc_files.include('README*', 'lib/**/*.rb')
end
task default: ['spec:all', :rubocop]