[Rt-commit] r5564 - in Test-Chimps-Anna/trunk: . t

zev at bestpractical.com zev at bestpractical.com
Wed Jul 12 17:46:15 EDT 2006


Author: zev
Date: Wed Jul 12 17:46:12 2006
New Revision: 5564

Added:
   Test-Chimps-Anna/trunk/t/00-dependencies.t
Modified:
   Test-Chimps-Anna/trunk/   (props changed)
   Test-Chimps-Anna/trunk/Changes
   Test-Chimps-Anna/trunk/MANIFEST
   Test-Chimps-Anna/trunk/Makefile.PL
   Test-Chimps-Anna/trunk/README
   Test-Chimps-Anna/trunk/lib/Test/Chimps/Anna.pm
   Test-Chimps-Anna/trunk/t/00-load.t

Log:
 r11450 at galvatron:  zev | 2006-07-12 17:36:31 -0400
 added documentation


Modified: Test-Chimps-Anna/trunk/Changes
==============================================================================
--- Test-Chimps-Anna/trunk/Changes	(original)
+++ Test-Chimps-Anna/trunk/Changes	Wed Jul 12 17:46:12 2006
@@ -1,5 +1,7 @@
 Revision history for Test-Chimps-Anna
 
-0.01    Date/time
-        First version, released on an unsuspecting world.
+0.01    Thu Jun 22 15:37:00 EDT 2006
+        Initial release 
 
+0.02    Wed Jul 12 17:07:57 EDT 2006
+        Initial CPAN release, now with documentation.
\ No newline at end of file

Modified: Test-Chimps-Anna/trunk/MANIFEST
==============================================================================
--- Test-Chimps-Anna/trunk/MANIFEST	(original)
+++ Test-Chimps-Anna/trunk/MANIFEST	Wed Jul 12 17:46:12 2006
@@ -1,10 +1,24 @@
+bin/anna.pl
 Changes
-MANIFEST
-META.yml # Will be created by "make dist"
+inc/Module/AutoInstall.pm
+inc/Module/Install.pm
+inc/Module/Install/AutoInstall.pm
+inc/Module/Install/Base.pm
+inc/Module/Install/Can.pm
+inc/Module/Install/Fetch.pm
+inc/Module/Install/Include.pm
+inc/Module/Install/Makefile.pm
+inc/Module/Install/Metadata.pm
+inc/Module/Install/Win32.pm
+inc/Module/Install/WriteAll.pm
+lib/Test/Chimps/Anna.pm
 Makefile.PL
+MANIFEST
+META.yml			# Will be created by "make dist"
 README
-lib/Test/Chimps/Anna.pm
+t/00-dependencies.t
 t/00-load.t
 t/boilerplate.t
 t/pod-coverage.t
 t/pod.t
+Test-Chimps-Anna/.cvsignore

Modified: Test-Chimps-Anna/trunk/Makefile.PL
==============================================================================
--- Test-Chimps-Anna/trunk/Makefile.PL	(original)
+++ Test-Chimps-Anna/trunk/Makefile.PL	Wed Jul 12 17:46:12 2006
@@ -1,16 +1,17 @@
-use strict;
-use warnings;
-use ExtUtils::MakeMaker;
+use inc::Module::Install;
 
-WriteMakefile(
-    NAME                => 'Test::Chimps::Anna',
-    AUTHOR              => 'Zev Benjamin <zev at cpan.org>',
-    VERSION_FROM        => 'lib/Test/Chimps/Anna.pm',
-    ABSTRACT_FROM       => 'lib/Test/Chimps/Anna.pm',
-    PL_FILES            => {},
-    PREREQ_PM => {
-        'Test::More' => 0,
-    },
-    dist                => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
-    clean               => { FILES => 'Test-Chimps-Anna-*' },
-);
+# Define metadata
+name            'Test-Chimps-Anna';
+all_from        'lib/Test/Chimps/Anna.pm';
+
+# Specific dependencies
+requires('Bot::BasicBot');
+requires('Jifty::DBI::Handle');
+requires('Test::Chimps::Report');
+requires('Test::Chimps::ReportCollection');
+requires('YAML::Syck');
+
+build_requires('Test::Dependencies');
+
+auto_install;
+WriteAll;

Modified: Test-Chimps-Anna/trunk/README
==============================================================================
--- Test-Chimps-Anna/trunk/README	(original)
+++ Test-Chimps-Anna/trunk/README	Wed Jul 12 17:46:12 2006
@@ -1,15 +1,11 @@
 Test-Chimps-Anna
 
-The README is used to introduce the module and provide instructions on
-how to install the module, any machine dependencies it may have (for
-example C compilers and installed libraries) and any other information
-that should be provided before the module is installed.
-
-A README file is required for CPAN modules since CPAN extracts the README
-file from a module distribution so that people browsing the archive
-can use it get an idea of the modules uses. It is usually a good idea
-to provide version information here so that people can decide whether
-fixes for the module are worth downloading.
+Chimps is the Collaborative Heterogeneous Infinite Monkey
+Perfectionification Service.  It is a framework for storing,
+viewing, generating, and uploading smoke reports.  This
+distribution provides modules and binaries for running an IRC bot
+to monitor smoke report uploads and report test failures and
+unexpected passes to a channel.
 
 INSTALLATION
 
@@ -43,7 +39,7 @@
 
 COPYRIGHT AND LICENCE
 
-Copyright (C) 2006 Zev Benjamin
+Copyright 2006 Best Practical Solutions, all rights reserved.
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.

Modified: Test-Chimps-Anna/trunk/lib/Test/Chimps/Anna.pm
==============================================================================
--- Test-Chimps-Anna/trunk/lib/Test/Chimps/Anna.pm	(original)
+++ Test-Chimps-Anna/trunk/lib/Test/Chimps/Anna.pm	Wed Jul 12 17:46:12 2006
@@ -13,27 +13,67 @@
 
 =head1 NAME
 
-Test::Chimps::Anna - The great new Test::Chimps::Anna!
+Test::Chimps::Anna - An IRQ bot that announces test failures (and unexpected passes)
 
 =head1 VERSION
 
-Version 0.01
+Version 0.02
 
 =cut
 
-our $VERSION = '0.01';
+our $VERSION = '0.02';
 
 =head1 SYNOPSIS
 
-Anna is a bot.
-
-Anna is an IRC bot, specifically, which watches for new Test::Chimps smoke 
-reports and talks to a specified channel when she sees one.
+Anna is a bot.  Specifically, she is an implementation of
+L<Bot::BasicBot>.  She will query your smoke report database and
+print smoke report summaries when tests fail or unexpectedly
+succeed.
 
     use Test::Chimps::Anna;
 
-    my $foo = Test::Chimps::Anna->new();
-    ...
+    my $anna = Test::Chimps::Anna->new(
+      server   => "irc.perl.org",
+      port     => "6667",
+      channels => ["#example"],
+    
+      nick      => "anna",
+      username  => "nice_girl",
+      name      => "Anna",
+      database_file => '/path/to/chimps/chimpsdb/database',
+      config_file => '/path/to/chimps/anna-config.yml',
+      server_script => 'http://example.com/cgi-bin/chimps-server.pl'
+      );
+    
+    $anna->run;
+
+=head1 METHODS
+
+=head2 new ARGS
+
+ARGS is a hash who's keys are mostly passed through to
+L<Bot::BasicBot>.  Keys which are recognized beyond the ones from
+C<Bot::BasicBot> are as follows:
+
+=over 4
+
+=item * database_file
+
+Mandatory.  The SQLite database Anna should connect to get smoke
+report data.
+
+=item * server_script
+
+Mandatory.  The URL of the server script.  This is used to display
+URLs to the full smoke report.
+
+=item * config_file
+
+If your server accepts report variables, you must specify a config
+file.  The config file is a YAML dump of an array containing the
+names of those variables.  Yes, this is a hack.
+
+=back
 
 =cut
 
@@ -86,6 +126,14 @@
   return $self->{oid};
 }
 
+=head2 tick
+
+Overrided method.  Checks for new smoke reports every 2 minutes and
+prints summaries if there were failed tests or if tests
+unexpectedly succeeded.
+
+=cut
+
 sub tick {
   my $self = shift;
 
@@ -174,13 +222,13 @@
 
 =head1 ACKNOWLEDGEMENTS
 
-=head1 COPYRIGHT & LICENSE
+=head2 COPYRIGHT & LICENSE
 
-Copyright 2006 Zev Benjamin, all rights reserved.
+Copyright 2006 Best Practical Solutions, all rights reserved.
 
 This program is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.
 
 =cut
 
-1; # End of Test::Chimps::Anna
+1;

Added: Test-Chimps-Anna/trunk/t/00-dependencies.t
==============================================================================
--- (empty file)
+++ Test-Chimps-Anna/trunk/t/00-dependencies.t	Wed Jul 12 17:46:12 2006
@@ -0,0 +1,6 @@
+#!perl
+
+use Test::Dependencies exclude => [qw/Test::Chimps::Anna/];
+
+ok_dependencies();
+

Modified: Test-Chimps-Anna/trunk/t/00-load.t
==============================================================================
--- Test-Chimps-Anna/trunk/t/00-load.t	(original)
+++ Test-Chimps-Anna/trunk/t/00-load.t	Wed Jul 12 17:46:12 2006
@@ -5,5 +5,3 @@
 BEGIN {
 	use_ok( 'Test::Chimps::Anna' );
 }
-
-diag( "Testing Test::Chimps::Anna $Test::Chimps::Anna::VERSION, Perl $], $^X" );


More information about the Rt-commit mailing list