Class: BuildLogParser::Parser

Inherits:
Object
  • Object
show all
Includes:
CoverageMatcher, DurationMatcher, PHPUnitMatcher, RspecMatcher, TestUnitMatcher
Defined in:
lib/build_log_parser/parser.rb

Constant Summary

Constants included from PHPUnitMatcher

BuildLogParser::PHPUnitMatcher::PHPUNIT_PATTERN, BuildLogParser::PHPUnitMatcher::PHPUNIT_PATTERN_ERROR

Constants included from TestUnitMatcher

TestUnitMatcher::TEST_UNIT_PATTERN

Constants included from RspecMatcher

RspecMatcher::RSPEC_PATTERN

Constants included from CoverageMatcher

CoverageMatcher::PATTERNS

Constants included from DurationMatcher

DurationMatcher::DURATION_PATTERNS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from PHPUnitMatcher

#fetch_phpunit_stats

Methods included from TestUnitMatcher

#fetch_test_unit_stats

Methods included from RspecMatcher

#fetch_rspec_stats

Methods included from CoverageMatcher

#fetch_coverage

Methods included from DurationMatcher

#fetch_duration

Constructor Details

#initialize(body) ⇒ Parser

Returns a new instance of Parser.



17
18
19
# File 'lib/build_log_parser/parser.rb', line 17

def initialize(body)
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



15
16
17
# File 'lib/build_log_parser/parser.rb', line 15

def body
  @body
end

Instance Method Details

#coverageObject



31
32
33
# File 'lib/build_log_parser/parser.rb', line 31

def coverage
  fetch_coverage(body)
end

#durationObject



21
22
23
# File 'lib/build_log_parser/parser.rb', line 21

def duration
  fetch_duration(body)
end

#testsObject



25
26
27
28
29
# File 'lib/build_log_parser/parser.rb', line 25

def tests
  fetch_rspec_stats(body) ||
  fetch_test_unit_stats(body) ||
  fetch_phpunit_stats(body)
end