summary refs log tree commit diff
path: root/lib/ballet/Git.pm
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2011-03-13 11:23:25 +0100
committerfranck cuny <franck@lumberjaph.net>2011-03-13 11:23:25 +0100
commite05750bb88aaff0375f1027660cc73e9f5439d0a (patch)
treed15cd96e97da03778666faaae00c64619b0eaa88 /lib/ballet/Git.pm
parentinitial import (diff)
downloadballet-e05750bb88aaff0375f1027660cc73e9f5439d0a.tar.gz
find and render a page for version 'master'
Signed-off-by: franck cuny <franck@lumberjaph.net>
Diffstat (limited to 'lib/ballet/Git.pm')
-rw-r--r--lib/ballet/Git.pm24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/ballet/Git.pm b/lib/ballet/Git.pm
new file mode 100644
index 0000000..6ade622
--- /dev/null
+++ b/lib/ballet/Git.pm
@@ -0,0 +1,24 @@
+package ballet::Git;
+
+use Mouse;
+use Git::Repository;
+
+with 'ballet::Page';
+
+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 => $self->wiki_path ),;
+    },
+);
+
+1;