[Bps-public-commit] Test-Chimps-Anna branch, master, updated. f8749ddec1cf9836c2a4ab5f1637e5094a2bc757

jesse jesse at bestpractical.com
Wed Oct 7 17:04:25 EDT 2009


The branch, master has been updated
       via  f8749ddec1cf9836c2a4ab5f1637e5094a2bc757 (commit)
       via  2ec91bc59c3fc9c54527253478df35ec9c54893e (commit)
      from  9ab75dc73209f07579d12c86e2dcc4d6d769c583 (commit)

Summary of changes:
 lib/Test/Chimps/Anna.pm |   32 +++++++++++++++++++-------------
 1 files changed, 19 insertions(+), 13 deletions(-)

- Log -----------------------------------------------------------------
commit 2ec91bc59c3fc9c54527253478df35ec9c54893e
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Oct 7 16:56:07 2009 -0400

    Switch to using committer name rather than email

diff --git a/lib/Test/Chimps/Anna.pm b/lib/Test/Chimps/Anna.pm
index aa8b7a7..a3630d7 100644
--- a/lib/Test/Chimps/Anna.pm
+++ b/lib/Test/Chimps/Anna.pm
@@ -260,7 +260,7 @@ sub preprocess_report_metadata {
     my $report    = shift;
     my $rev       = substr( $report->revision, 0, 6 );
     my $committer = $report->committer;
-    $committer =~ s/^(?:.*)<(.*)>(?:.*)/$1/g;
+    $committer =~ s/^(.*)<(.*)>(?:.*)/$1/g;
     my $date;
     if ( $report->can('committed_date') ) {
         my $dt = $self->string_to_datetime( $report->committed_date );

commit f8749ddec1cf9836c2a4ab5f1637e5094a2bc757
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Oct 7 17:03:47 2009 -0400

    extract a method and shorted report messages, probably introducing a syntax error

diff --git a/lib/Test/Chimps/Anna.pm b/lib/Test/Chimps/Anna.pm
index a3630d7..5ded872 100644
--- a/lib/Test/Chimps/Anna.pm
+++ b/lib/Test/Chimps/Anna.pm
@@ -179,18 +179,8 @@ sub tick {
                 . $committer
                 . " "
                 . $date . ": "
-                . sprintf( "%.2f", $report->total_ratio * 100 ) . "\%, "
-                . $report->total_seen
-                . " total, "
-                . $report->total_passed . " ok, "
-                . $report->total_failed
-                . " fail, "
-                . $report->total_todo
-                . " todo, "
-                . $report->total_skipped
-                . " skipped, "
-                . $report->total_unexpectedly_succeeded
-                . " unexpectedly ok; "
+                . $self->pass_rate_for_report($report)
+
                 . $duration . ".  "
                 . $self->{server_script} . "?id="
                 . $report->id;
@@ -390,6 +380,22 @@ sub age_as_string {
     return "$s $time_unit ago";
 }
 
+
+sub pass_rate_for_report {
+    my $self   = shift;
+    my $report = shift;
+
+    return
+          sprintf( "%.2f", $report->total_ratio * 100 ) . "\%, "
+        . $report->total_passed . " of "
+        . $report->total_seen . " ok, "
+        . $report->total_failed . " fail, "
+        . ( $report->total_todo                   ? ( $report->total_todo . " todo, " )                          : '' )
+        . ( $report->total_skipped                ? ( $report->total_skipped . " skipped, " )                    : '' )
+        . ( $report->total_unexpectedly_succeeded ? $report->total_unexpectedly_succeeded . " unexpectedly ok; " : '' );
+}
+
+
 =head1 AUTHOR
 
 Zev Benjamin, C<< <zev at cpan.org> >>

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list