Fully implemented all the runners
https://git.n64.cc/nosial/ncc/-/issues/32
This commit is contained in:
parent
ef43b1ccbc
commit
87e67564fa
3 changed files with 20 additions and 3 deletions
|
@ -8,8 +8,6 @@
|
|||
|
||||
const bash = 'bash';
|
||||
|
||||
const sh = 'sh';
|
||||
|
||||
const python = 'python';
|
||||
|
||||
const python3 = 'python3';
|
||||
|
@ -24,7 +22,6 @@
|
|||
const All = [
|
||||
self::php,
|
||||
self::bash,
|
||||
self::sh,
|
||||
self::python,
|
||||
self::python3,
|
||||
self::python2,
|
||||
|
|
|
@ -8,8 +8,12 @@
|
|||
use ncc\Abstracts\Runners;
|
||||
use ncc\Abstracts\Scopes;
|
||||
use ncc\Classes\BashExtension\BashRunner;
|
||||
use ncc\Classes\LuaExtension\LuaRunner;
|
||||
use ncc\Classes\PerlExtension\PerlRunner;
|
||||
use ncc\Classes\PhpExtension\PhpRunner;
|
||||
use ncc\Classes\PythonExtension\Python2Runner;
|
||||
use ncc\Classes\PythonExtension\Python3Runner;
|
||||
use ncc\Classes\PythonExtension\PythonRunner;
|
||||
use ncc\Exceptions\AccessDeniedException;
|
||||
use ncc\Exceptions\ExecutionUnitNotFoundException;
|
||||
use ncc\Exceptions\FileNotFoundException;
|
||||
|
@ -145,6 +149,10 @@
|
|||
Runners::bash => BashRunner::getFileExtension(),
|
||||
Runners::php => PhpRunner::getFileExtension(),
|
||||
Runners::perl => PerlRunner::getFileExtension(),
|
||||
Runners::python => PythonRunner::getFileExtension(),
|
||||
Runners::python2 => Python2Runner::getFileExtension(),
|
||||
Runners::python3 => Python3Runner::getFileExtension(),
|
||||
Runners::lua => LuaRunner::getFileExtension(),
|
||||
default => throw new UnsupportedRunnerException('The runner \'' . $unit->ExecutionPolicy->Runner . '\' is not supported'),
|
||||
};
|
||||
|
||||
|
@ -279,6 +287,10 @@
|
|||
Runners::bash => BashRunner::prepareProcess($unit),
|
||||
Runners::php => PhpRunner::prepareProcess($unit),
|
||||
Runners::perl => PerlRunner::prepareProcess($unit),
|
||||
Runners::python => PythonRunner::prepareProcess($unit),
|
||||
Runners::python2 => Python2Runner::prepareProcess($unit),
|
||||
Runners::python3 => Python3Runner::prepareProcess($unt),
|
||||
Runners::lua => LuaRunner::prepareProcess($unit),
|
||||
default => throw new UnsupportedRunnerException('The runner \'' . $unit->ExecutionPolicy->Runner . '\' is not supported'),
|
||||
};
|
||||
|
||||
|
|
|
@ -6,8 +6,12 @@
|
|||
use ncc\Abstracts\Runners;
|
||||
use ncc\Abstracts\Scopes;
|
||||
use ncc\Classes\BashExtension\BashRunner;
|
||||
use ncc\Classes\LuaExtension\LuaRunner;
|
||||
use ncc\Classes\PerlExtension\PerlRunner;
|
||||
use ncc\Classes\PhpExtension\PhpRunner;
|
||||
use ncc\Classes\PythonExtension\Python2Runner;
|
||||
use ncc\Classes\PythonExtension\Python3Runner;
|
||||
use ncc\Classes\PythonExtension\PythonRunner;
|
||||
use ncc\Exceptions\AccessDeniedException;
|
||||
use ncc\Exceptions\FileNotFoundException;
|
||||
use ncc\Exceptions\InvalidScopeException;
|
||||
|
@ -262,6 +266,10 @@
|
|||
Runners::bash => BashRunner::processUnit($path, $policy),
|
||||
Runners::php => PhpRunner::processUnit($path, $policy),
|
||||
Runners::perl => PerlRunner::processUnit($path, $policy),
|
||||
Runners::python => PythonRunner::processUnit($path, $policy),
|
||||
Runners::python2 => Python2Runner::processUnit($path, $policy),
|
||||
Runners::python3 => Python3Runner::processUnit($path, $policy),
|
||||
Runners::lua => LuaRunner::processUnit($path, $policy),
|
||||
default => throw new UnsupportedRunnerException('The runner \'' . $policy->Runner . '\' is not supported'),
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue