[libdevel-cover-perl] 16/32: Add cpancover log links.
Axel Beckert
abe at deuxchevaux.org
Sun Apr 26 22:26:37 UTC 2015
This is an automated email from the git hooks/post-receive script.
abe pushed a commit to annotated tag v1.18
in repository libdevel-cover-perl.
commit f672c98664fde208428121faacab86497008dd6d
Author: Paul Johnson <paul at pjcj.net>
Date: Tue Oct 14 23:52:49 2014 +0200
Add cpancover log links.
---
lib/Devel/Cover/Collection.pm | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/lib/Devel/Cover/Collection.pm b/lib/Devel/Cover/Collection.pm
index f048e3d..604b48c 100644
--- a/lib/Devel/Cover/Collection.pm
+++ b/lib/Devel/Cover/Collection.pm
@@ -258,7 +258,7 @@ sub write_json {
$results->{$name}{$version}{coverage}{total} = {
map { $_ => $m->{$_}{pc} }
grep $m->{$_}{pc} ne 'n/a',
- grep !/link|module/,
+ grep !/link|log|module/,
keys %$m
};
} else {
@@ -344,6 +344,17 @@ sub generate_html {
($summary->{covered} || 0) . " / " . ($summary->{total} || 0);
}
}
+
+ for my $file (@modules) {
+ # say "looking at [$file]";
+ my ($module) = $file =~ /^ \w - \w\w - \w+ - (.*)
+ \. (?: zip | tgz | (?: tar \. (?: gz | bz2 )))
+ -- \d{10,11} \. \d{6} \. out \. gz $/x
+ or next;
+ # say "found at [$module]";
+ $vars->{vals}{$module}{log} = $file;
+ }
+
# print "vars ", Dumper $vars;
$self->write_stylesheet;
@@ -698,7 +709,8 @@ $Templates{module_by_start} = <<'EOT';
[% IF modules.$module_start %]
<tr align="right" valign="middle">
<th class="header" align="left" style='white-space: nowrap;'> Module </th>
- <th class="header"> Version </th>
+ <th class="header"> Version </th>
+ <th class="header"> Log </th>
[% FOREACH header = headers %]
<th class="header"> [% header %] </th>
[% END %]
@@ -718,6 +730,7 @@ $Templates{module_by_start} = <<'EOT';
[% END %]
</td>
<td> [% module.version %] </td>
+ <td> <a href="/[% subdir %][% vals.$m.log %]"> ¶ </a> </td>
[% FOREACH criterion = criteria %]
<td class="[%- vals.$m.$criterion.class -%]"
title="[%- vals.$m.$criterion.details -%]">
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdevel-cover-perl.git
More information about the Pkg-perl-cvs-commits
mailing list