1 package Gitalist::URIStructure::Repository;
2 use MooseX::MethodAttributes::Role;
3 use Try::Tiny qw/try catch/;
4 use namespace::autoclean;
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
13 my $repos = $c->model()->get_repository($repos_name);
16 HEAD => $repos->head_hash,
20 $c->detach('/error_404');
24 sub summary : Chained('find') PathPart('') Args(0) {}
26 sub heads : Chained('find') Args(0) {}
28 sub tags : Chained('find') Args(0) {}
30 sub log : Chained('find') PathPart('') CaptureArgs(0) {}
32 sub shortlog : Chained('log') Args(0) {}
34 sub longlog : Chained('log') PathPart('log') Args(0) {}