summary refs log tree commit diff
path: root/lib/ballet/Git.pm
blob: 546cdaa962dd2d4a819bf3f1f413672abe74b07b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package ballet::Git;

use Mouse;
use File::Spec;
use Git::Repository;

with 'ballet::Page';
with 'ballet::Markup';

has wiki_path => (
    is       => 'ro',
    isa      => 'Str',
    required => 1,
);

has git_repo => (
    is      => 'rw',
    isa     => 'Git::Repository',
    lazy    => 1,
    default => sub {
        my $self = shift;
        Git::Repository->new(
            git_dir => File::Spec->catdir( $self->wiki_path, '.git' ) ),;
    },
);


1;