summaryrefslogtreecommitdiff
path: root/libpiny/lib/Piny/Config.pm
diff options
context:
space:
mode:
Diffstat (limited to 'libpiny/lib/Piny/Config.pm')
-rw-r--r--libpiny/lib/Piny/Config.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/libpiny/lib/Piny/Config.pm b/libpiny/lib/Piny/Config.pm
index 5cd99da..535df33 100644
--- a/libpiny/lib/Piny/Config.pm
+++ b/libpiny/lib/Piny/Config.pm
@@ -35,8 +35,8 @@ subtype 'PathDir'
subtype 'HttpUrl'
=> as 'Str'
- => where { $_ =~ /^http:\/\//i }
- => message { 'Not a http:// URL.' }
+ => where { $_ =~ /^(http|https):\/\//i }
+ => message { 'Not a http:// or https:// URL.' }
;
subtype 'HttpsUrl'
@@ -107,6 +107,10 @@ sub _build__conf {
};
+ foreach my $key ( keys %$conf ) {
+ $conf->{$key} = "" unless defined $conf->{$key};
+ };
+
return $conf;
};
@@ -204,6 +208,7 @@ sub tweakable {
# The tweakables
+# Repo-specific tweakables, in the repos' .git/config files.
tweakable "piny_ikiwikidestdir" => "/srv/www/piny.be/", 'PathDir';
tweakable "piny_ikiwikisrcdir" => "/srv/ikiwiki/", 'PathDir';
tweakable "piny_ikiwikiurl" => "http://piny.be/", 'HttpUrl';
@@ -211,6 +216,9 @@ tweakable "piny_ikiwikisecureurl" => "https://secure.piny.be/", 'HttpsUrl'
tweakable "piny_ikiwikisecurepath" => "/srv/www/secure.piny.be/", 'PathDir';
tweakable "receive_denynonfastforwards" => "true", 'GitBool';
+# User-specific tweakables, in the users' ~/.gitconfig files.
+tweakable "user_email" => undef, 'Maybe[Str]';
+
# Moose boilerplate
__PACKAGE__->meta->make_immutable;