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
|
# File 'lib/bones/plugins/rcov.rb', line 6
def initialize_rcov
require 'rcov'
require 'rcov/rcovtask'
have?(:rcov) { true }
::Bones.config {
desc 'Configuration settings for the Rcov code coverage tool.'
rcov {
path 'rcov', :desc => <<-__
Path to the rcov executable.
__
dir 'coverage', :desc => <<-__
Code coverage metrics will be written to this directory.
__
opts %w[--sort coverage -T], :desc => <<-__
An array of command line options that will be passed to the rcov
command when running your tests. See the Rcov help documentation
either online or from the command line by running 'rcov --help'.
__
threshold 90.0, :desc => <<-__
The threshold value (in percent) for coverage. If the actual
coverage is not greater than or equal to this value, the verify task
will raise an exception.
__
threshold_exact false, :desc => <<-__
Require the threshold to be met exactly. By default this option is
set to false.
__
}
}
rescue LoadError
have?(:rcov) { false }
end
|