forked from the-rocci-project/rOCCI-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
42 lines (32 loc) · 966 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
42
require 'rubygems/tasks'
require 'rubocop/rake_task'
require 'yard'
task default: 'test'
desc 'Run acceptance tests (RSpec + Rubocop)'
task test: 'acceptance'
desc 'Run all RSpec test with coverage reporting'
task spec: 'rcov:all'
Gem::Tasks.new(build: { tar: true, zip: true }, sign: { checksum: true, pgp: false })
desc 'Execute rubocop -D'
RuboCop::RakeTask.new(:rubocop) do |t|
t.options = ['-D'] # display cop name
end
YARD::Rake::YardocTask.new do |t|
t.stats_options = ['--list-undoc']
end
desc 'Run acceptance tests (RSpec + Rubocop)'
task :acceptance do |_t|
Rake::Task['spec'].invoke
Rake::Task['rubocop'].invoke
end
namespace :rcov do
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:rspec) do |_t|
ENV['COVERAGE'] = 'true'
end
desc 'Run RSpec to generate aggregated coverage'
task :all do |_t|
rm 'coverage/coverage.data' if File.exist?('coverage/coverage.data')
Rake::Task['rcov:rspec'].invoke
end
end