Permalink
Browse files

Provide .psgi for Plack goodness.

The .psgi was written by franky (Francoise Dehinbo) and gist-ed by
Ranguard (Leo Lapworth). I've tweaked it to play nice with checkouts
and "make install".
  • Loading branch information...
1 parent f41fc74 commit cc02cf5a840f9f104af48f466ce29e9cffe9be87 @broquaint committed May 22, 2011
Showing with 28 additions and 1 deletion.
  1. +1 −1 Makefile.PL
  2. +8 −0 lib/Gitalist.pm
  3. +19 −0 script/gitalist_app.psgi
View
@@ -131,7 +131,7 @@ if ($ENV{GITALIST_RELEASE_TESTING}) {
author_requires('WWW::Mechanize::TreeBuilder');
}
-install_script glob('script/*.pl');
+install_script glob('script/*.p{l,sgi}');
auto_install;
{ # Make sure you REALLY REALLY have to have the env variable set to run
View
@@ -204,6 +204,14 @@ This example can be seen live here:
http://example.gitalist.com
+=head2 Plack
+
+If you would like to run Gitalist under L<Plack> then one need only
+make use of L<plackup|search.cpan.org/perldoc?plackup> and the
+C<.psgi> found under C<scripts/>:
+
+ plackup script/gitalist_app.psgi
+
=head1 CONFIGURATION
The Gitalist config is loaded with L<Catalyst::Plugin::ConfigLoader>
@@ -0,0 +1,19 @@
+#!/usr/bin/perl
+
+use strict;
+
+use FindBin;
+BEGIN {
+ my $env = "$FindBin::Bin/env";
+ if (-r $env) {
+ do $env or die $@;
+ }
+}
+
+use Gitalist;
+use Plack::Builder;
+
+Gitalist->setup_engine('PSGI');
+my $app = sub { Gitalist->run(@_) };
+
+builder { $app };

0 comments on commit cc02cf5

Please sign in to comment.