Fix build coverage regex matching to allow captures.

Fixes #2644
This commit is contained in:
Jared Szechy 2015-12-17 09:59:14 -05:00
parent 61a1bdd7cc
commit 05e0b6d014
1 changed files with 1 additions and 1 deletions

View File

@ -170,7 +170,7 @@ module Ci
def extract_coverage(text, regex)
begin
matches = text.gsub(Regexp.new(regex)).to_a.last
matches = regex.match(text).to_a.last
coverage = matches.gsub(/\d+(\.\d+)?/).first
if coverage.present?