]> iEval git - gruntmaster-page.git/blobdiff - lib/Plack/App/Gruntmaster.pm
Add ruby
[gruntmaster-page.git] / lib / Plack / App / Gruntmaster.pm
index 00f9b0f52c39d133f0e0903544e3283c634067fe..0666fad804a3329bf41ddade92c129b954c6a7ab 100644 (file)
@@ -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(%_)
                },
 
This page took 0.025092 seconds and 4 git commands to generate.