From: Marius Gavrilescu Date: Fri, 4 Apr 2014 07:09:45 +0000 (+0300) Subject: Make non-C++ verifiers work X-Git-Tag: 5999.000_003~19 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=6bf57d234878a4d8ca4f1437ac65d5067087f73a;p=gruntmaster-daemon.git Make non-C++ verifiers work --- diff --git a/lib/Gruntmaster/Daemon.pm b/lib/Gruntmaster/Daemon.pm index 35103a5..a8b7b20 100644 --- a/lib/Gruntmaster/Daemon.pm +++ b/lib/Gruntmaster/Daemon.pm @@ -20,6 +20,15 @@ use Log::Log4perl qw/get_logger/; use LWP::UserAgent; use constant PAGE_SIZE => 10; +use constant FORMAT_EXTENSION => { + C => 'c', + CPP => 'cpp', + MONO => 'cs', + JAVA => 'java', + PASCAL => 'pas', + PERL => 'pl', + PYTHON => 'py', +}; ################################################## @@ -73,7 +82,7 @@ sub process{ $meta->{tests} = decode_json $jobr->problem->tests if $meta->{runner} eq 'File'; $meta->{files}{ver} = { - name => 'ver.cpp', + name => 'ver.' . FORMAT_EXTENSION->{$jobr->problem->verformat}, format => $jobr->problem->verformat, content => $jobr->problem->versource, } if $jobr->problem->verformat;