From: Ash Berlin Date: Wed, 4 Mar 2009 10:21:09 +0000 (+0000) Subject: Prepare for release of 0.03 X-Git-Tag: 0.04~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FTest-WWW-Selenium-Catalyst.git;a=commitdiff_plain;h=8f552b3b1a93a93723b1fe30461bed018536d9b9 Prepare for release of 0.03 --- diff --git a/.gitignore b/.gitignore index 11c648c..04eed5f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ META.yml Makefile Test-WWW-Selenium-Catalyst-* -blib -inc +blib/ +inc/ pm_to_blib cover_db MANIFEST +MANIFEST.bak +.*.swp diff --git a/Makefile.PL b/Makefile.PL index bf9b477..5801f3a 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -15,5 +15,11 @@ requires( 'Test::More' => 0, 'Catalyst::Utils' => 0, ); -auto_install(); + +# Old vers of CPAN dont set the env var. safer to assume we are running than +# ask about deps twice +my $under_cpan = $ENV{PERL5_CPANPLUS_IS_RUNNING} || + $ENV{PERL5_CPAN_IS_RUNNING} || + do { require CPAN; $CPAN::VERSION < 1.92 }; +$under_cpan or auto_install(); WriteAll(); diff --git a/lib/Test/WWW/Selenium/Catalyst.pm b/lib/Test/WWW/Selenium/Catalyst.pm index 9f333ea..96807ff 100644 --- a/lib/Test/WWW/Selenium/Catalyst.pm +++ b/lib/Test/WWW/Selenium/Catalyst.pm @@ -73,6 +73,8 @@ application server will be started. =item port +B: 3000 + Port on which to run the catalyst application server. The C environment variable is also respected. @@ -89,25 +91,25 @@ selenium to add custom logic. =item selenium_port Location of externally running selenium server if you do not wish this module -to control one. See also below for details. +to control one. See also for details. =back All other options passed verbatim to the selenium constructor. -B: By default a selenium server is started when you C this module, and -it's killed when your test exits. If wish to manage a selenium server yourself, -(for instance you wish to start up a server once and run a number of tests -against it) pass C<-no_selenium_server> to import: +B: By default a selenium server is started when you C this module, +and it's killed when your test exits. If wish to manage a selenium server +yourself, (for instance you wish to start up a server once and run a number of +tests against it) pass C<-no_selenium_server> to import: use Test::WWW::Selenium 'MyApp' - -no_selenium_server = 1 + -no_selenium_server => 1 Along a similar vein you can also pass command line arguments to the selenium server via C<-selenium_args>: use Test::WWW::Selenium 'MyApp' - -selenium_args = "-singleWindow -port 4445" + -selenium_args => "-singleWindow -port 4445" =head2 sel_pid @@ -250,7 +252,13 @@ END { diag("Killing Selenium Server $sel_pid") if $DEBUG; kill 15, $sel_pid or diag "Killing Selenium: $!"; undef $sel_pid; + + } elsif ($www_selenium) { + diag("Stopping Selenium Session $sel_pid") if $DEBUG; + $www_selenium->stop(); + undef $www_selenium; } + if($app_pid){ diag("Killing catalyst server $app_pid") if $DEBUG; kill 15, $app_pid or diag "Killing MyApp: $!"; @@ -291,11 +299,12 @@ C is the name of your Catalyst app. =item * -Selenium website: L +Selenium website: L =item * Description of what you can do with the C<$sel> object: L +and L =item * @@ -305,6 +314,8 @@ If you don't need a real web browser: L =head1 AUTHOR +Ash Berlin C<< >> + Jonathan Rockway, C<< >> =head1 BUGS @@ -319,11 +330,11 @@ your bug as I make changes. Send me unified diffs against the git HEAD at: - git://git.jrock.us/Test-WWW-Selenium-Catalyst + git://github.com/jrockway/test-www-selenium-catalyst.git You can view the repository online at - http://git.jrock.us/?p=Test-WWW-Selenium-Catalyst.git;a=summary + http://github.com/jrockway/test-www-selenium-catalyst/tree/master Thanks in advance for your contributions! @@ -333,6 +344,8 @@ Thanks for mst for getting on my case to actually write this thing :) =head1 COPYRIGHT & LICENSE +Copyright 2009 Ash Berlin, all rights reserved. + Copyright 2006 Jonathan Rockway, all rights reserved. This program is free software; you can redistribute it and/or modify it