[Slim-Checkins] r23 - in /trunk/SDI-SVN-Timeline: bin/ lib/Catalyst/ lib/Class/ lib/SDI/SVN/ lib/SDI/SVN/Timeline/ lib/SDI/SVN/Timeline/Controller/ lib/SDI/SVN/Timeline/Model/ lib/SDI/SVN/Timeline/Schema/ script/

dsully at svn.slimdevices.com dsully at svn.slimdevices.com
Fri Apr 6 20:05:06 PDT 2007


Author: dsully
Date: Fri Apr  6 20:05:06 2007
New Revision: 23

URL: http://svn.slimdevices.com?rev=23&root=Open+Source&view=rev
Log:
Snapshot.

Added:
    trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Schema/
      - copied from r12, trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Model/
    trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Schema.pm
      - copied, changed from r12, trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Model/DBI.pm
Removed:
    trunk/SDI-SVN-Timeline/lib/Catalyst/
    trunk/SDI-SVN-Timeline/lib/Class/
    trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Controller/Static.pm
    trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Model/
    trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Schema/DBI.pm
Modified:
    trunk/SDI-SVN-Timeline/bin/sync-svn
    trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline.pm
    trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Controller/Authors.pm
    trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Controller/Timeline.pm
    trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Schema/Author.pm
    trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Schema/Revision.pm
    trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_cgi.pl
    trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_create.pl
    trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_fastcgi.pl
    trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_server.pl
    trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_test.pl

Modified: trunk/SDI-SVN-Timeline/bin/sync-svn
URL: http://svn.slimdevices.com/trunk/SDI-SVN-Timeline/bin/sync-svn?rev=23&root=Open+Source&r1=22&r2=23&view=diff
==============================================================================
--- trunk/SDI-SVN-Timeline/bin/sync-svn (original)
+++ trunk/SDI-SVN-Timeline/bin/sync-svn Fri Apr  6 20:05:06 2007
@@ -8,9 +8,9 @@
 
 sub main {
 
-	my $rev = SDI::SVN::Timeline::Model::Revision->maxRevision || $ARGV[0];
+	my $rev = SDI::SVN::Timeline::Schema::Revision->maxRevision || $ARGV[0];
 
-	SDI::SVN::Timeline::Model::Revision->changeInfoForRevision($rev);
+	SDI::SVN::Timeline::Schema::Revision->changeInfoForRevision($rev);
 }
 
 main();

Modified: trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline.pm
URL: http://svn.slimdevices.com/trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline.pm?rev=23&root=Open+Source&r1=22&r2=23&view=diff
==============================================================================
--- trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline.pm (original)
+++ trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline.pm Fri Apr  6 20:05:06 2007
@@ -1,10 +1,12 @@
 package SDI::SVN::Timeline;
 
 use strict;
-use Catalyst qw/Static FillInForm FormValidator Prototype/;
+use Catalyst qw/Static::Simple FillInForm FormValidator Prototype/;
 
 use File::Spec::Functions;
 use YAML;
+
+use SDI::SVN::Timeline::Schema;
 
 our $VERSION = '0.01';
 

Modified: trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Controller/Authors.pm
URL: http://svn.slimdevices.com/trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Controller/Authors.pm?rev=23&root=Open+Source&r1=22&r2=23&view=diff
==============================================================================
--- trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Controller/Authors.pm (original)
+++ trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Controller/Authors.pm Fri Apr  6 20:05:06 2007
@@ -11,14 +11,16 @@
 	my @counts  = ();
 
 	# Build up a list of author -> total checkins
-	for my $author (SDI::SVN::Timeline::Model::Author->retrieve_all) {
+	for my $author (SDI::SVN::Timeline::Schema->search('Author')->all) {
 
 		push @counts, {
 
 			'author' => $author,
 
-			'total'  => SDI::SVN::Timeline::Model::Author->count({
-				'revisions.author' => $author->id
+			'total'  => SDI::SVN::Timeline::Schema->rs('Author')->count({
+				'revisions.author' => $author->id,
+			}, {
+				'join' => 'revisions',
 			}),
 		};
 	}

Modified: trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Controller/Timeline.pm
URL: http://svn.slimdevices.com/trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Controller/Timeline.pm?rev=23&root=Open+Source&r1=22&r2=23&view=diff
==============================================================================
--- trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Controller/Timeline.pm (original)
+++ trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Controller/Timeline.pm Fri Apr  6 20:05:06 2007
@@ -8,7 +8,7 @@
 sub timeline : Global {
 	my ($self, $c) = @_;
 
-	$c->stash->{'authors'}  = [ SDI::SVN::Timeline::Model::Author->retrieve_all('order_by' => 'username') ];
+	$c->stash->{'authors'}  = [ SDI::SVN::Timeline::Schema->search('Author', {}, { 'order_by' => 'username' })->all ];
 
 	$c->stash->{'template'} = 'timeline.html';
 }
@@ -32,7 +32,7 @@
 
 	# Any revision constraints?
 	$c->stash->{'startRev'} = $c->req->param('startRev') || '';
-	$c->stash->{'endRev'}   = $c->req->param('endRev')   || SDI::SVN::Timeline::Model::Revision->maxRevision;
+	$c->stash->{'endRev'}   = $c->req->param('endRev')   || SDI::SVN::Timeline::Schema::Revision->maxRevision;
 
 	$find->{'rev'} = {
 		'>='   => $c->stash->{'startRev'},
@@ -40,7 +40,7 @@
 	};
 
 	# Set us up the pager.
-	my ($pager, $it) = SDI::SVN::Timeline::Model::Revision->page($find, {
+	my ($pager, $it) = SDI::SVN::Timeline::Schema::Revision->page($find, {
 		rows     => 20,
 		order_by => 'rev desc',
 		page     => $c->req->param('page') || 1,

Copied: trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Schema.pm (from r12, trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Model/DBI.pm)
URL: http://svn.slimdevices.com/trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Schema.pm?p2=trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Schema.pm&p1=trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Model/DBI.pm&r1=12&r2=23&rev=23&root=Open+Source&view=diff
==============================================================================
--- trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Model/DBI.pm (original)
+++ trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Schema.pm Fri Apr  6 20:05:06 2007
@@ -7,6 +7,28 @@
 	my $class = __PACKAGE__;
 
 	$class->connection('dbi:mysql:timeline', 'timeline', 'insecure');
+
+	$class->load_classes(qw/Author Revision/);
+}
+
+sub rs {
+	my $class = shift;
+
+	return $class->resultset(@_);
+}
+
+sub search {
+	my $class   = shift;
+	my $rsClass = shift;
+
+	return $class->resultset($rsClass)->search(@_);
+}
+
+sub find {
+	my $class   = shift;
+	my $rsClass = shift;
+
+	return $class->resultset($rsClass)->find(@_);
 }
 
 1;

Modified: trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Schema/Author.pm
URL: http://svn.slimdevices.com/trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Schema/Author.pm?rev=23&root=Open+Source&r1=12&r2=23&view=diff
==============================================================================
--- trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Schema/Author.pm (original)
+++ trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Schema/Author.pm Fri Apr  6 20:05:06 2007
@@ -1,17 +1,17 @@
-package SDI::SVN::Timeline::Model::Author;
+package SDI::SVN::Timeline::Schema::Author;
 
 use strict;
-use base qw(SDI::SVN::Timeline::Model::DBI);
+use base qw(SDI::SVN::Timeline::Schema::DBI);
 
 {
 	my $class = __PACKAGE__;
 
 	$class->table('authors');
 
-	$class->columns('Primary' => qw/id/);
-	$class->columns('Essential' => qw/username fullname/);
+	$class->add_columns(qw/id username fullname/);
+	$class->set_primary_key('id');
 
-	$class->has_many('revisions' => 'SDI::SVN::Timeline::Model::Revision' => 'author');
+	$class->has_many('revisions' => 'SDI::SVN::Timeline::Schema::Revision' => 'author');
 }
 
 1;

Modified: trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Schema/Revision.pm
URL: http://svn.slimdevices.com/trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Schema/Revision.pm?rev=23&root=Open+Source&r1=12&r2=23&view=diff
==============================================================================
--- trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Schema/Revision.pm (original)
+++ trunk/SDI-SVN-Timeline/lib/SDI/SVN/Timeline/Schema/Revision.pm Fri Apr  6 20:05:06 2007
@@ -1,7 +1,7 @@
-package SDI::SVN::Timeline::Model::Revision;
+package SDI::SVN::Timeline::Schema::Revision;
 
 use strict;
-use base qw(SDI::SVN::Timeline::Model::DBI);
+use base qw(SDI::SVN::Timeline::Schema::DBI);
 
 use DateTime;
 use DateTime::Format::MySQL;
@@ -13,12 +13,12 @@
 
 	$class->table('revisions');
 
-	$class->columns('Primary' => qw/rev/);
-	$class->columns('Essential' => qw/author date message/);
+	$class->add_columns(qw/rev author date message/);
+	$class->set_primary_key('rev');
 
-	$class->has_a('author' => 'SDI::SVN::Timeline::Model::Author');
+	$class->belongs_to('author' => 'SDI::SVN::Timeline::Model::Author');
 
-	$class->has_a('date' => 'DateTime',
+	$class->belongs_to('date' => 'DateTime',
 
 		inflate => sub { DateTime::Format::MySQL->parse_datetime(shift) },
 		deflate => sub { DateTime::Format::MySQL->format_datetime(shift) },
@@ -27,16 +27,30 @@
 	# Use MySQL's fulltext capabilities.
 	$class->add_constructor('messagesMatching' => 'MATCH (message) AGAINST (? IN BOOLEAN MODE)');
 
-	$class->set_sql('maxRevision' => 'SELECT MAX(rev) FROM __TABLE__');
-
 	#
 	$class->mk_classdata('_svnClient');
 }
 
+# XXXX - should be in a resultclass
+sub messagesMatching {
+	my $class = shift;
+
+	return SDI::SVN::Timeline::Schema->rs('Revision')->
+		search_literal('MATCH (message) AGAINST (? IN BOOLEAN MODE)', @_);
+}
+
+# XXXX - should be in a resultclass
 sub maxRevision {
 	my $class = shift;
 
-	return $class->retrieve( $class->sql_maxRevision->select_val );
+	my $rev =  SDI::SVN::Timeline::Schema->search('Revision', undef, {
+
+		'select' => [ \'MAX(rev)' ],
+		'as'     => [ 'max' ],
+
+	})->single->get_column('max');
+
+	return SDI::SVN::Timeline::Schema->find('Revision', $rev);
 }
 
 sub svnClient {
@@ -63,11 +77,11 @@
 		$author = 'dsully';
 	}
 
-	($author) = SDI::SVN::Timeline::Model::Author->find_or_create({
+	$author = SDI::SVN::Timeline::Schema->search('Author', {
 		username => $author,
-	});
+	})->find_or_create->single;
 
-	__PACKAGE__->find_or_create({
+	SDI::SVN::TimeLine::Schema->search('Revision', {
 		rev     => $revision,
 		author  => $author,
 		message => $message,
@@ -78,7 +92,8 @@
 		date    => DateTime::Format::ISO8601->parse_datetime($date)->set_time_zone(
 				(SDI::SVN::Timeline->config->{'timezone'} || $ENV{'TZ'})
 		),
-	});
+
+	})->find_or_create;
 }
 
 sub messageAsHTML {

Modified: trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_cgi.pl
URL: http://svn.slimdevices.com/trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_cgi.pl?rev=23&root=Open+Source&r1=22&r2=23&view=diff
==============================================================================
--- trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_cgi.pl (original)
+++ trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_cgi.pl Fri Apr  6 20:05:06 2007
@@ -1,4 +1,5 @@
 #!/usr/bin/perl -w
+
 BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' }
 
 use strict;
@@ -12,7 +13,7 @@
 
 =head1 NAME
 
-cgi - Catalyst CGI
+sdi_svn_timeline_cgi.pl - Catalyst CGI
 
 =head1 SYNOPSIS
 
@@ -30,7 +31,7 @@
 
 Copyright 2004 Sebastian Riedel. All rights reserved.
 
-This library is free software. You can redistribute it and/or modify 
-it under the same terms as perl itself.
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
 
 =cut

Modified: trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_create.pl
URL: http://svn.slimdevices.com/trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_create.pl?rev=23&root=Open+Source&r1=22&r2=23&view=diff
==============================================================================
--- trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_create.pl (original)
+++ trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_create.pl Fri Apr  6 20:05:06 2007
@@ -5,36 +5,42 @@
 use Pod::Usage;
 use Catalyst::Helper;
 
-my $help = 0;
+my $force = 0;
+my $help  = 0;
 
-GetOptions( 'help|?' => \$help );
+GetOptions(
+    'nonew|force' => \$force,
+    'help|?'      => \$help
+ );
 
 pod2usage(1) if ( $help || !$ARGV[0] );
 
-my $helper = Catalyst::Helper->new;
+my $helper = Catalyst::Helper->new( { '.newfiles' => !$force } );
+
 pod2usage(1) unless $helper->mk_component( 'SDI::SVN::Timeline', @ARGV );
 
 1;
 
 =head1 NAME
 
-create - Create a new Catalyst Component
+sdi_svn_timeline_create.pl - Create a new Catalyst Component
 
 =head1 SYNOPSIS
 
-create.pl [options] model|view|controller name [helper] [options]
+sdi_svn_timeline_create.pl [options] model|view|controller name [helper] [options]
 
  Options:
-   -help    display this help and exits
+   -force    don't create a .new file where a file to be created exists
+   -help     display this help and exits
 
  Examples:
-   create.pl controller My::Controller
-   create.pl view My::View
-   create.pl view MyView TT
-   create.pl view TT TT
-   create.pl model My::Model
-   create.pl model SomeDB CDBI dbi:SQLite:/tmp/my.db
-   create.pl model AnotherDB CDBI dbi:Pg:dbname=foo root 4321
+   sdi_svn_timeline_create.pl controller My::Controller
+   sdi_svn_timeline_create.pl view My::View
+   sdi_svn_timeline_create.pl view MyView TT
+   sdi_svn_timeline_create.pl view TT TT
+   sdi_svn_timeline_create.pl model My::Model
+   sdi_svn_timeline_create.pl model SomeDB CDBI dbi:SQLite:/tmp/my.db
+   sdi_svn_timeline_create.pl model AnotherDB CDBI dbi:Pg:dbname=foo root 4321
 
  See also:
    perldoc Catalyst::Manual
@@ -44,15 +50,19 @@
 
 Create a new Catalyst Component.
 
+Existing component files are not overwritten.  If any of the component files
+to be created already exist the file will be written with a '.new' suffix.
+This behavior can be suppressed with the C<-force> option.
+
 =head1 AUTHOR
 
-Sebastian Riedel, C<sri\@oook.de>
+Sebastian Riedel, C<sri at oook.de>
 
 =head1 COPYRIGHT
 
 Copyright 2004 Sebastian Riedel. All rights reserved.
 
-This library is free software. You can redistribute it and/or modify 
-it under the same terms as perl itself.
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
 
 =cut

Modified: trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_fastcgi.pl
URL: http://svn.slimdevices.com/trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_fastcgi.pl?rev=23&root=Open+Source&r1=22&r2=23&view=diff
==============================================================================
--- trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_fastcgi.pl (original)
+++ trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_fastcgi.pl Fri Apr  6 20:05:06 2007
@@ -3,21 +3,60 @@
 BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' }
 
 use strict;
+use Getopt::Long;
+use Pod::Usage;
 use FindBin;
 use lib "$FindBin::Bin/../lib";
 use SDI::SVN::Timeline;
 
-SDI::SVN::Timeline->run;
+my $help = 0;
+my ( $listen, $nproc, $pidfile, $manager, $detach );
+ 
+GetOptions(
+    'help|?'      => \$help,
+    'listen|l=s'  => \$listen,
+    'nproc|n=i'   => \$nproc,
+    'pidfile|p=s' => \$pidfile,
+    'manager|M=s' => \$manager,
+    'daemon|d'    => \$detach,
+);
+
+pod2usage(1) if $help;
+
+SDI::SVN::Timeline->run( 
+    $listen, 
+    {   nproc   => $nproc,
+        pidfile => $pidfile, 
+        manager => $manager,
+        detach  => $detach,
+    }
+);
 
 1;
 
 =head1 NAME
 
-fastcgi - Catalyst FastCGI
+sdi_svn_timeline_fastcgi.pl - Catalyst FastCGI
 
 =head1 SYNOPSIS
 
-See L<Catalyst::Manual>
+sdi_svn_timeline_fastcgi.pl [options]
+ 
+ Options:
+   -? -help      display this help and exits
+   -l -listen    Socket path to listen on
+                 (defaults to standard input)
+                 can be HOST:PORT, :PORT or a
+                 filesystem path
+   -n -nproc     specify number of processes to keep
+                 to serve requests (defaults to 1,
+                 requires -listen)
+   -p -pidfile   specify filename for pid file
+                 (requires -listen)
+   -d -daemon    daemonize (requires -listen)
+   -M -manager   specify alternate process manager
+                 (FCGI::ProcManager sub-class)
+                 or empty string to disable
 
 =head1 DESCRIPTION
 
@@ -31,7 +70,7 @@
 
 Copyright 2004 Sebastian Riedel. All rights reserved.
 
-This library is free software. You can redistribute it and/or modify 
-it under the same terms as perl itself.
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
 
 =cut

Modified: trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_server.pl
URL: http://svn.slimdevices.com/trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_server.pl?rev=23&root=Open+Source&r1=22&r2=23&view=diff
==============================================================================
--- trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_server.pl (original)
+++ trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_server.pl Fri Apr  6 20:05:06 2007
@@ -2,7 +2,7 @@
 
 BEGIN { 
     $ENV{CATALYST_ENGINE} ||= 'HTTP';
-    $ENV{CATALYST_SCRIPT_GEN} = 4;
+    $ENV{CATALYST_SCRIPT_GEN} = 27;
 }  
 
 use strict;
@@ -10,30 +10,77 @@
 use Pod::Usage;
 use FindBin;
 use lib "$FindBin::Bin/../lib";
-use SDI::SVN::Timeline;
 
-my $help = 0;
-my $port = 3000;
+my $debug         = 0;
+my $fork          = 0;
+my $help          = 0;
+my $host          = undef;
+my $port          = 3000;
+my $keepalive     = 0;
+my $restart       = 0;
+my $restart_delay = 1;
+my $restart_regex = '\.yml$|\.yaml$|\.pm$';
 
-GetOptions( 'help|?' => \$help, 'port=s' => \$port );
+my @argv = @ARGV;
+
+GetOptions(
+    'debug|d'           => \$debug,
+    'fork'              => \$fork,
+    'help|?'            => \$help,
+    'host=s'            => \$host,
+    'port=s'            => \$port,
+    'keepalive|k'       => \$keepalive,
+    'restart|r'         => \$restart,
+    'restartdelay|rd=s' => \$restart_delay,
+    'restartregex|rr=s' => \$restart_regex
+);
 
 pod2usage(1) if $help;
 
-SDI::SVN::Timeline->run($port);
+if ( $restart ) {
+    $ENV{CATALYST_ENGINE} = 'HTTP::Restarter';
+}
+if ( $debug ) {
+    $ENV{CATALYST_DEBUG} = 1;
+}
+
+# This is require instead of use so that the above environment
+# variables can be set at runtime.
+require SDI::SVN::Timeline;
+
+SDI::SVN::Timeline->run( $port, $host, {
+    argv          => \@argv,
+    'fork'        => $fork,
+    keepalive     => $keepalive,
+    restart       => $restart,
+    restart_delay => $restart_delay,
+    restart_regex => qr/$restart_regex/
+} );
 
 1;
 
 =head1 NAME
 
-server - Catalyst Testserver
+sdi_svn_timeline_server.pl - Catalyst Testserver
 
 =head1 SYNOPSIS
 
-server.pl [options]
+sdi_svn_timeline_server.pl [options]
 
  Options:
-   -? -help    display this help and exits
-   -p -port    port (defaults to 3000)
+   -d -debug          force debug mode
+   -f -fork           handle each request in a new process
+                      (defaults to false)
+   -? -help           display this help and exits
+      -host           host (defaults to all)
+   -p -port           port (defaults to 3000)
+   -k -keepalive      enable keep-alive connections
+   -r -restart        restart when files got modified
+                      (defaults to false)
+   -rd -restartdelay  delay between file checks
+   -rr -restartregex  regex match files that trigger
+                      a restart when modified
+                      (defaults to '\.yml$|\.yaml$|\.pm$')
 
  See also:
    perldoc Catalyst::Manual
@@ -51,7 +98,7 @@
 
 Copyright 2004 Sebastian Riedel. All rights reserved.
 
-This library is free software. You can redistribute it and/or modify 
-it under the same terms as perl itself.
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
 
 =cut

Modified: trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_test.pl
URL: http://svn.slimdevices.com/trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_test.pl?rev=23&root=Open+Source&r1=22&r2=23&view=diff
==============================================================================
--- trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_test.pl (original)
+++ trunk/SDI-SVN-Timeline/script/sdi_svn_timeline_test.pl Fri Apr  6 20:05:06 2007
@@ -1,13 +1,11 @@
 #!/usr/bin/perl -w
-
-BEGIN { $ENV{CATALYST_ENGINE} ||= 'Test' }
 
 use strict;
 use Getopt::Long;
 use Pod::Usage;
 use FindBin;
 use lib "$FindBin::Bin/../lib";
-use SDI::SVN::Timeline;
+use Catalyst::Test 'SDI::SVN::Timeline';
 
 my $help = 0;
 
@@ -15,24 +13,24 @@
 
 pod2usage(1) if ( $help || !$ARGV[0] );
 
-print SDI::SVN::Timeline->run($ARGV[0])->content . "\n";
+print request($ARGV[0])->content . "\n";
 
 1;
 
 =head1 NAME
 
-test - Catalyst Test
+sdi_svn_timeline_test.pl - Catalyst Test
 
 =head1 SYNOPSIS
 
-test.pl [options] uri
+sdi_svn_timeline_test.pl [options] uri
 
  Options:
    -help    display this help and exits
 
  Examples:
-   test.pl http://localhost/some_action
-   test.pl /some_action
+   sdi_svn_timeline_test.pl http://localhost/some_action
+   sdi_svn_timeline_test.pl /some_action
 
  See also:
    perldoc Catalyst::Manual
@@ -40,7 +38,7 @@
 
 =head1 DESCRIPTION
 
-Run a Catalyst action from the comand line.
+Run a Catalyst action from the command line.
 
 =head1 AUTHOR
 
@@ -50,7 +48,7 @@
 
 Copyright 2004 Sebastian Riedel. All rights reserved.
 
-This library is free software. You can redistribute it and/or modify 
-it under the same terms as perl itself.
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
 
 =cut



More information about the checkins mailing list