Commit | Line | Data |
ecb0ebe7 |
1 | package Gitalist::Controller::Fragment::Repository; |
2 | use Moose; |
3 | use namespace::autoclean; |
4 | |
b6ec181b |
5 | BEGIN { extends 'Gitalist::Controller' } |
b9423b8e |
6 | with qw/ |
7 | Gitalist::URIStructure::Repository |
8 | Gitalist::URIStructure::Fragment::WithLog |
9 | /; |
ecb0ebe7 |
10 | |
066e9aa4 |
11 | sub base : Chained('/fragment/base') PathPart('') CaptureArgs(0) {} |
ecb0ebe7 |
12 | |
ecb0ebe7 |
13 | after heads => sub { |
14 | my ($self, $c) = @_; |
15 | $c->stash( |
16 | heads => $c->stash->{Repository}->heads, |
17 | ); |
18 | }; |
19 | |
5cb2f569 |
20 | =head2 tags |
21 | |
22 | The current list of tags in the repo. |
23 | |
24 | =cut |
25 | |
26 | after tags => sub { |
27 | my ( $self, $c ) = @_; |
28 | $c->stash( |
29 | tags => $c->stash->{Repository}->tags, |
30 | ); |
ecb0ebe7 |
31 | }; |
32 | |
33 | __PACKAGE__->meta->make_immutable; |