Skip to content

Commit

Permalink
Disable scoreboard when running test suite.
Browse files Browse the repository at this point in the history
  • Loading branch information
oalders committed Jul 26, 2013
1 parent 08a450f commit b60ac64
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions app.psgi
Expand Up @@ -30,18 +30,22 @@ $app->map( '/static/' => Plack::App::File->new( root => 'root/static' )->to_app
$app->map( '/favicon.ico' =>
Plack::App::File->new( file => 'root/static/icons/favicon.ico' )->to_app );
$app->map( '/' => MetaCPAN::Web->psgi_app );
my $scoreboard = "$FindBin::RealBin/var/tmp/scoreboard";
unless (-d $scoreboard) {
File::Path::make_path($scoreboard) or die "Can't make_path $scoreboard: $!";
$app = $app->to_app;

unless ( $ENV{HARNESS_ACTIVE} ) {
my $scoreboard = "$FindBin::RealBin/var/tmp/scoreboard";
unless ( -d $scoreboard ) {
File::Path::make_path($scoreboard)
or die "Can't make_path $scoreboard: $!";
}
$app = Plack::Middleware::ServerStatus::Lite->wrap(
$app,
path => '/server-status',
allow => ['127.0.0.1'],
scoreboard => $scoreboard,
) unless $0 =~ /\.t$/;
}

$app = $app->to_app;
$app = Plack::Middleware::ServerStatus::Lite->wrap(
$app,
path => '/server-status',
allow => ['127.0.0.1'],
scoreboard => $scoreboard,
) unless $0 =~ /\.t$/;
$app = Plack::Middleware::Runtime->wrap($app);
$app = Plack::Middleware::Assets->wrap( $app,
files => [<root/static/css/*.css>] );
Expand Down

0 comments on commit b60ac64

Please sign in to comment.