From 6bf57d234878a4d8ca4f1437ac65d5067087f73a Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Fri, 4 Apr 2014 10:09:45 +0300 Subject: [PATCH] Make non-C++ verifiers work --- lib/Gruntmaster/Daemon.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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; -- 2.39.2