X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=lib%2FPlack%2FApp%2FGruntmaster.pm;h=0666fad804a3329bf41ddade92c129b954c6a7ab;hb=c83dca87863f8e36ad2279f4c8c78cbbdc6704ea;hp=490fb44e726794c1d6212283650cf5ae81b2b311;hpb=23e3263818fa44f50dd5e9522d0787195435bfb5;p=plack-app-gruntmaster.git diff --git a/lib/Plack/App/Gruntmaster.pm b/lib/Plack/App/Gruntmaster.pm index 490fb44..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,6 +155,7 @@ sub dispatch_request{ }, sub (/pb/ + ?:owner~&:contest~&:private~) { forbid $_{private}; + forbid contest && contest->is_pending; response pb => 'Problems', db->problem_list(%_) },