summaryrefslogtreecommitdiff
path: root/libpiny
diff options
context:
space:
mode:
authorjrayhawk+piny.be@omgwallhack.org <jrayhawk@dev.piny.svcs.cs.pdx.edu>2011-02-01 21:56:25 -0800
committerjrayhawk+piny.be@omgwallhack.org <jrayhawk@dev.piny.svcs.cs.pdx.edu>2011-02-01 21:56:25 -0800
commita39e05b9278bf014dc23df39e93b7bb8466ddf84 (patch)
treec401d5e7754e3ee409a1c27503da2907df6c25da /libpiny
parenteb1d8e453e75fdf9783bfe46299f313a37fabd00 (diff)
downloadpiny-code-a39e05b9278bf014dc23df39e93b7bb8466ddf84.tar.gz
piny-code-a39e05b9278bf014dc23df39e93b7bb8466ddf84.zip
Adding base cgit url to Piny::Repo
Diffstat (limited to 'libpiny')
-rw-r--r--libpiny/lib/Piny/Repo.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm
index da39631..17142ed 100644
--- a/libpiny/lib/Piny/Repo.pm
+++ b/libpiny/lib/Piny/Repo.pm
@@ -96,6 +96,13 @@ has 'globally_writable' =>
, init_arg => undef
);
+has 'cgit_url' =>
+ ( is => 'ro'
+ , isa => 'Str'
+ , lazy_build => 1
+ , init_arg => undef
+ );
+
has 'ikiwiki_setup' =>
( is => 'ro'
, isa => 'Str'
@@ -515,6 +522,12 @@ sub _build_globally_writable {
return ( $s->repostat->[2] & 0111 ) == 0111;
};
+sub _build_cgit_url {
+ my ( $s ) = @_;
+
+ return $s->config->piny_ikiwikisecureurl . "cgit/" . $s->name;
+}
+
sub _build_ikiwiki_setup {
my ( $s ) = @_;