diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-06-10 00:13:33 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-06-10 00:13:33 +0100 |
commit | 7513161747fb9bd48eb67cc7a43e711e2a1b45a1 (patch) | |
tree | 392e384547b6ac5e80808022e9bc4f48ff893a7a | |
parent | 7e844f25b99b1b2b76526a0490b5b9dea00b71df (diff) |
Simple cron wrapper to run in correct environment.
-rwxr-xr-x | bin/cron-wrapper | 9 | ||||
-rwxr-xr-x | setenv.pl | 6 | ||||
-rw-r--r-- | t/app/controller/about.t | 2 |
3 files changed, 10 insertions, 7 deletions
diff --git a/bin/cron-wrapper b/bin/cron-wrapper new file mode 100755 index 000000000..b93695cb0 --- /dev/null +++ b/bin/cron-wrapper @@ -0,0 +1,9 @@ +#!/usr/bin/env perl + +BEGIN { # set all the paths to the perl code + use FindBin; + require "$FindBin::Bin/../setenv.pl"; +} + +exec { $ARGV[0] } @ARGV; + @@ -32,12 +32,6 @@ for ( "$root/commonlib/perllib", "$root/perllib" ) { # also set the path to our scripts etc $ENV{PATH} = join ':', uniq "$root/bin", split( m/:/, $ENV{PATH} ); -# now decide what to do - if no arguments print out shell arguments to set the -# environment. If there are arguments then run those so that they run correctly -#if (@ARGV) { -# system @ARGV; -#} - # we might want to require this file to configure something like a CGI script if ( $0 eq __FILE__ ) { diff --git a/t/app/controller/about.t b/t/app/controller/about.t index 84eab005a..a5fb215d3 100644 --- a/t/app/controller/about.t +++ b/t/app/controller/about.t @@ -8,7 +8,7 @@ ok( my $mech = Test::WWW::Mechanize::Catalyst->new, 'Created mech object' ); # check that we can get the page $mech->get_ok('/about'); -$mech->content_like(qr{About us ::\s+FixMyStreet.com}); +$mech->content_like(qr{About us ::\s+FixMyStreet}); $mech->content_contains('html lang="en-gb"'); SKIP: { |