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