summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr/src/libpiny/lib/Piny/Config.pm12
-rw-r--r--usr/src/libpiny/lib/Piny/Repo.pm14
2 files changed, 14 insertions, 12 deletions
diff --git a/usr/src/libpiny/lib/Piny/Config.pm b/usr/src/libpiny/lib/Piny/Config.pm
index cfbe2c6..8894bad 100644
--- a/usr/src/libpiny/lib/Piny/Config.pm
+++ b/usr/src/libpiny/lib/Piny/Config.pm
@@ -127,6 +127,8 @@ sub tweakable {
my $attrname = $attr;
$attrname =~ s/_/./;
+ if ( $attrname =~ /_/ ) { croak "Illegal attribute name $attrname! (use only one underbar)"; };
+
has $attr =>
( is => 'rw'
, isa => 'Str'
@@ -167,11 +169,11 @@ sub tweakable {
# The tweakables
-tweakable "piny_ikiwiki_destdir" => "/srv/www/piny.be/";
-tweakable "piny_ikiwiki_srcdir" => "/srv/ikiwiki/";
-tweakable "piny_ikiwiki_url" => "http://piny.be/";
-tweakable "piny_ikiwiki_secure_url" => "https://secure.piny.be/";
-tweakable "piny_ikiwiki_secure_path" => "/srv/www/secure.piny.be/";
+tweakable "piny_ikiwikidestdir" => "/srv/www/piny.be/";
+tweakable "piny_ikiwikisrcdir" => "/srv/ikiwiki/";
+tweakable "piny_ikiwikiurl" => "http://piny.be/";
+tweakable "piny_ikiwikisecureurl" => "https://secure.piny.be/";
+tweakable "piny_ikiwikisecurepath" => "/srv/www/secure.piny.be/";
tweakable "receive_denyNonFastforwards" => "true";
# Moose boilerplate
diff --git a/usr/src/libpiny/lib/Piny/Repo.pm b/usr/src/libpiny/lib/Piny/Repo.pm
index 31b7a70..5dd965a 100644
--- a/usr/src/libpiny/lib/Piny/Repo.pm
+++ b/usr/src/libpiny/lib/Piny/Repo.pm
@@ -514,31 +514,31 @@ sub _build_ikiwiki_setup {
sub _build_ikiwiki_destdir {
my ( $s ) = @_;
- return $s->config->piny_ikiwiki_destdir . $s->name;
+ return $s->config->piny_ikiwikidestdir . $s->name;
};
sub _build_ikiwiki_srcdir {
my ( $s ) = @_;
- return $s->config->piny_ikiwiki_srcdir . $s->name;
+ return $s->config->piny_ikiwikisrcdir . $s->name;
};
sub _build_ikiwiki_url {
my ( $s ) = @_;
- return $s->config->piny_ikiwiki_url . $s->name;
+ return $s->config->piny_ikiwikiurl . $s->name;
};
sub _build_ikiwiki_cgiurl {
my ( $s ) = @_;
- return $s->config->piny_ikiwiki_secure_url . "repos/" . $s->name . "/ikiwiki.cgi";
+ return $s->config->piny_ikiwikisecureurl . "repos/" . $s->name . "/ikiwiki.cgi";
};
sub _build_secure_path {
my ( $s ) = @_;
- return $s->config->piny_ikiwiki_secure_path . "repos/" . $s->name;
+ return $s->config->piny_ikiwikisecurepath . "repos/" . $s->name;
};
sub _build_ikiwiki_cgipath {
@@ -553,7 +553,7 @@ sub _build_ikiwiki_historyurl {
if ( defined $s->config->{"https_url"} ) {
return $s->config->{"https_url"} . "cgit/" . $s->name . "/log/[[file]]";
} else {
- return $s->config->piny_ikiwiki_secure_url . "cgit/" . $s->name . "/log/[[file]]";
+ return $s->config->piny_ikiwikisecureurl . "cgit/" . $s->name . "/log/[[file]]";
};
};
@@ -563,7 +563,7 @@ sub _build_ikiwiki_diffurl {
if ( defined $s->config->{"https_url"} ) {
return $s->config->{"https_url"} . "cgit/" . $s->name . "/diff/?id=[[sha1_commit]]";
} else {
- return $s->config->piny_ikiwiki_secure_url . "cgit/" . $s->name . "/diff/?id=[[sha1_commit]]";
+ return $s->config->piny_ikiwikisecureurl . "cgit/" . $s->name . "/diff/?id=[[sha1_commit]]";
};
};