Remove crap we're no longer using
[catagits/Gitalist.git] / lib / Gitalist / URIStructure / Repository.pm
1 package Gitalist::URIStructure::Repository;
2 use MooseX::MethodAttributes::Role;
3 use Try::Tiny qw/try catch/;
4 use namespace::autoclean;
5
6 requires 'base';
7
8 sub find : Chained('base') PathPart('') CaptureArgs(1) {
9     my ($self, $c, $repos_name) = @_;
10     # XXX FIXME - This should be in the repository fragment controller, and the repository
11     #             controller should just check has_repository
12     try {
13         my $repos = $c->model()->get_repository($repos_name);
14         $c->stash(
15             Repository => $repos,
16             HEAD => $repos->head_hash,
17         );
18     }
19     catch {
20         $c->detach('/error_404');
21     };
22 }
23
24 sub summary : Chained('find') PathPart('') Args(0) {}
25
26 sub shortlog : Chained('find') Args(0) {}
27
28 sub heads : Chained('find') Args(0) {}
29
30 sub log : Chained('find') Args(0) {}
31
32 sub tags : Chained('find') Args(0) {}
33
34 1;