Module: Buildr::Cobertura
- Defined in:
- lib/buildr/java/cobertura.rb
Overview
Provides the cobertura:html
, cobertura:xml
and cobertura:check
tasks. Require explicitly using require "buildr/cobertura"
.
You can generate cobertura reports for a single project using the project name as prefix:
project_name:cobertura:html
You can also specify which classes to include/exclude from instrumentation by passing a class name regexp to the cobertura.include
or cobertura.exclude
methods.
define 'someModule' do
cobertura.include 'some.package.*'
cobertura.include /some.(foo|bar).*/
cobertura.exclude 'some.foo.util.SimpleUtil'
cobertura.exclude /*.Const(ants)?/i
end
Defined Under Namespace
Modules: CoberturaExtension Classes: CoberturaCheck, CoberturaConfig
Constant Summary collapse
- VERSION =
'1.9'
Class Method Summary collapse
Class Method Details
.data_file ⇒ Object
60 61 62 |
# File 'lib/buildr/java/cobertura.rb', line 60 def data_file() File.("reports/cobertura.ser") end |
.dependencies ⇒ Object
51 52 53 54 |
# File 'lib/buildr/java/cobertura.rb', line 51 def dependencies @dependencies ||= [ "net.sourceforge.cobertura:cobertura:jar:#{version}", "log4j:log4j:jar:1.2.9", "asm:asm:jar:2.2.1", "asm:asm-tree:jar:2.2.1", "oro:oro:jar:2.0.8"] end |
.report_to(file = nil) ⇒ Object
56 57 58 |
# File 'lib/buildr/java/cobertura.rb', line 56 def report_to(file = nil) File.(File.join(*["reports/cobertura", file.to_s].compact)) end |