Fixed links on the /index action and broken times in the shortlog.
[catagits/Gitalist.git] / lib / Gitalist.pm
CommitLineData
89de6a33 1package Gitalist;
42fe5d11 2use Moose;
3use namespace::autoclean;
89de6a33 4
5use Catalyst::Runtime 5.80;
6
42fe5d11 7extends 'Catalyst';
89de6a33 8
43d4a724 9use Catalyst qw/
89de6a33 10 ConfigLoader
d5cc37a4 11 Static::Simple
61b56ed6 12 StackTrace/;
13
89de6a33 14our $VERSION = '0.01';
15
4666d5c7 16# Bring in the libified gitweb.cgi.
17use gitweb;
18
d3feefcf 19__PACKAGE__->config(
61b56ed6 20 name => 'Gitalist',
21 default_view => 'Default',
887260eb 22 default_model => 'Git', # Yes, we are going to be changing this.
d3feefcf 23);
89de6a33 24
25# Start the application
26__PACKAGE__->setup();
27
4df2f62f 28around uri_for => sub {
29 my ($orig, $c) = (shift, shift);
c1f608c8 30 my $hash = ref($_[-1]) eq 'HASH' ? pop @_ : {};
4df2f62f 31 my $params = Catalyst::Utils::merge_hashes(
c1f608c8 32 { p => $hash->{p} || $c->model()->project },
33 $hash,
4df2f62f 34 );
35 (my $uri = $c->$orig(@_, $params))
36 =~ tr[&][;];
37 return $uri;
38};
61b56ed6 39
89de6a33 40=head1 NAME
41
42Gitalist - Catalyst based application
43
44=head1 SYNOPSIS
45
46 script/gitalist_server.pl
47
48=head1 DESCRIPTION
49
50[enter your description here]
51
52=head1 SEE ALSO
53
54L<Gitalist::Controller::Root>, L<Catalyst>
55
42fe5d11 56=head1 AUTHORS AND COPYRIGHT
89de6a33 57
42fe5d11 58 Catalyst application:
59 (C) 2009 Venda Ltd and Dan Brook <dbrook@venda.com>
60
61 Original gitweb.cgi from which this was derived:
62 (C) 2005-2006, Kay Sievers <kay.sievers@vrfy.org>
63 (C) 2005, Christian Gierke
89de6a33 64
65=head1 LICENSE
66
42fe5d11 67FIXME - Is this going to be GPLv2 as per gitweb? If so this is broken..
68
89de6a33 69This library is free software. You can redistribute it and/or modify
70it under the same terms as Perl itself.
71
72=cut
73
741;