1 package Gitalist::Controller::Repository;
5 use Try::Tiny qw/try catch/;
6 use namespace::autoclean;
8 BEGIN { extends 'Catalyst::Controller' }
10 sub base : Chained('/root') PathPart('') CaptureArgs(0) {}
12 sub find : Chained('base') PathPart('') CaptureArgs(1) {
13 my ($self, $c, $repository) = @_;
15 $c->stash(Repository => $c->model()->get_repository($repository));
18 $c->detach('/error_404');
22 sub summary : Chained('find') PathPart('') Args(0) {
24 $c->stash(template => 'summary.tt2');
25 $c->forward('/summary');
28 sub shortlog : Chained('find') Args(0) {
30 $c->stash(template => 'shortlog.tt2');
31 $c->forward('/shortlog');
34 sub log : Chained('find') Args(0) {
36 $c->stash(template => 'log.tt2');
40 __PACKAGE__->meta->make_immutable;