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 $c->stash(_do_not_mangle_uri_for => 1);
15 sub find : Chained('base') PathPart('') CaptureArgs(1) {
16 my ($self, $c, $repository) = @_;
18 $c->stash(Repository => $c->model()->get_repository($repository));
21 $c->detach('/error_404');
25 sub summary : Chained('find') PathPart('') Args(0) {}
27 sub shortlog : Chained('find') Args(0) {
29 $c->stash(no_wrapper => 1);
30 $c->forward('/shortlog');
33 sub log : Chained('find') Args(0) {
35 $c->stash(template => 'log.tt2');
39 __PACKAGE__->meta->make_immutable;