From c4d90e6f4a1d14b1b898c28d6787a06c8dfa2a90 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Mon, 9 Mar 2015 10:55:54 +0200 Subject: [PATCH] Add ruby --- gruntmaster-compile | 3 ++- lib/Gruntmaster/Daemon.pm | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gruntmaster-compile b/gruntmaster-compile index 6ff8dd7..ee80c40 100755 --- a/gruntmaster-compile +++ b/gruntmaster-compile @@ -29,11 +29,12 @@ given ($format){ exec 'go', qw/build -compiler gccgo/, $name, when 'GCCGO'; exec 'ghc', qw/-DONLINE_JUDGE -Wall -O2 -o/, $basename, $name when 'HASKELL'; - when ([qw/PERL PYTHON SBCL/]){ + when ([qw/PERL PYTHON RUBY SBCL/]){ open IN, '<', $name; open OUT, '>', $basename; print OUT "#!/usr/bin/perl\n" if $_ eq 'PERL'; print OUT "#!/usr/bin/python\n" if $_ eq 'PYTHON'; + print OUT "#!/usr/bin/ruby\n" if $_ eq 'RUBY'; print OUT "#!/usr/bin/sbcl --script\n" if $_ eq 'SBCL'; print OUT while ; close OUT; diff --git a/lib/Gruntmaster/Daemon.pm b/lib/Gruntmaster/Daemon.pm index 67fc548..ce8510d 100644 --- a/lib/Gruntmaster/Daemon.pm +++ b/lib/Gruntmaster/Daemon.pm @@ -27,6 +27,7 @@ use constant FORMAT_EXTENSION => { PASCAL => 'pas', PERL => 'pl', PYTHON => 'py', + RUBY => 'rb', SBCL => 'l', }; -- 2.39.2