summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorJulian Blake Kongslie <jblake@omgwallhack.org>2010-10-16 21:42:15 -0700
committerJulian Blake Kongslie <jblake@omgwallhack.org>2010-10-16 21:42:15 -0700
commitf6e7039bf894c8241125622776720037aef620a2 (patch)
treea014504d13dc2757309be0b740be2853cc0898ab /usr
parent4ca0d5b3c7ed6328f0a120e44bff1daa1722c620 (diff)
downloadpiny-code-f6e7039bf894c8241125622776720037aef620a2.tar.gz
piny-code-f6e7039bf894c8241125622776720037aef620a2.zip
Case insensitive pinyconfig.
Diffstat (limited to 'usr')
-rw-r--r--usr/src/libpiny/lib/Piny/Config.pm6
-rwxr-xr-xusr/src/pinyadmin/bin/pinyconfig1
2 files changed, 5 insertions, 2 deletions
diff --git a/usr/src/libpiny/lib/Piny/Config.pm b/usr/src/libpiny/lib/Piny/Config.pm
index 5f2cbd7..8b6e192 100644
--- a/usr/src/libpiny/lib/Piny/Config.pm
+++ b/usr/src/libpiny/lib/Piny/Config.pm
@@ -11,7 +11,7 @@ use Moose::Util::TypeConstraints;
use MooseX::StrictConstructor;
use Carp;
-use Config::Simple qw( );
+use Config::Simple qw( -lc );
# Types
@@ -157,6 +157,8 @@ sub save {
sub tweakable {
my ( $attr, $default, $isa ) = @_;
+ $attr = lc $attr;
+
my $attrname = $attr;
$attrname =~ s/_/./;
@@ -207,7 +209,7 @@ tweakable "piny_ikiwikisrcdir" => "/srv/ikiwiki/", 'PathDir';
tweakable "piny_ikiwikiurl" => "http://piny.be/", 'HttpUrl';
tweakable "piny_ikiwikisecureurl" => "https://secure.piny.be/", 'HttpsUrl';
tweakable "piny_ikiwikisecurepath" => "/srv/www/secure.piny.be/", 'PathDir';
-tweakable "receive_denyNonFastForwards" => "true", 'GitBool';
+tweakable "receive_denynonfastforwards" => "true", 'GitBool';
# Moose boilerplate
diff --git a/usr/src/pinyadmin/bin/pinyconfig b/usr/src/pinyadmin/bin/pinyconfig
index ac91c09..525726d 100755
--- a/usr/src/pinyadmin/bin/pinyconfig
+++ b/usr/src/pinyadmin/bin/pinyconfig
@@ -11,6 +11,7 @@ if ( not defined $reponame or not defined $attr ) {
die "Usage: $0 reponame tweakable [value]\n";
};
+$attr = lc $attr;
$attr =~ s/\./_/g;
my $repo = Piny::Repo->new( $reponame );