X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FPlack%2FApp%2FGruntmaster.pm;h=0666fad804a3329bf41ddade92c129b954c6a7ab;hb=c83dca87863f8e36ad2279f4c8c78cbbdc6704ea;hp=00f9b0f52c39d133f0e0903544e3283c634067fe;hpb=2d074df734e562b0ca4992ea988d7725be58890d;p=plack-app-gruntmaster.git diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index 00f9b0f..0666fad 100644 --- a/lib/Plack/App/Gruntmaster.pm +++ b/lib/Plack/App/Gruntmaster.pm @@ -34,6 +34,7 @@ use constant CONTENT_TYPES => +{ pas => 'text/x-pascal', pl => 'text/x-perl', py => 'text/x-python', + rb => 'application/x-ruby', l => 'text/plain', }; @@ -48,6 +49,7 @@ use constant FORMAT_EXTENSION => { PASCAL => 'pas', PERL => 'pl', PYTHON => 'py', + RUBY => 'rb', SBCL => 'l', }; @@ -153,7 +155,7 @@ sub dispatch_request{ }, sub (/pb/ + ?:owner~&:contest~&:private~) { forbid $_{private}; - forbid contest->is_pending; + forbid contest && contest->is_pending; response pb => 'Problems', db->problem_list(%_) },