diff --git a/CHANGELOG.md b/CHANGELOG.md index 29fe9211..bbc33ec3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,10 @@ The contents of the `develop` branch will become Storyplayer v3.0 (a.k.a. SPv3). * New `legacy-features` section, for testing SPv2 functionality that is no longer the recommended approach. +## Removed + +* `list-targets` switch removed + ## 2.3.8 - Monday 1st February 2016 ### Fixes diff --git a/src/bin/storyplayer b/src/bin/storyplayer index 2432ea7e..0385bf36 100755 --- a/src/bin/storyplayer +++ b/src/bin/storyplayer @@ -32,7 +32,6 @@ use DataSift\Storyplayer\Cli\KillProcesses_Switch; use DataSift\Storyplayer\Cli\ListHostsTable_Command; use DataSift\Storyplayer\Cli\ListProcesses_Switch; use DataSift\Storyplayer\Cli\ListSystems_Switch; -use DataSift\Storyplayer\Cli\ListTargets_Switch; use DataSift\Storyplayer\Cli\PlayStory_Command; use DataSift\Storyplayer\Cli\RuntimeConfigManager; use DataSift\Storyplayer\Cli\Script_Command; @@ -322,7 +321,6 @@ function main($argv) $engine->addEngineSwitch(new KillProcesses_Switch); $engine->addEngineSwitch(new ListProcesses_Switch); $engine->addEngineSwitch(new ListSystems_Switch($injectables->knownSystemsUnderTestList)); - $engine->addEngineSwitch(new ListTargets_Switch($injectables->knownTestEnvironmentsList)); $engine->addEngineSwitch(new LongHelpSwitch); $engine->addEngineSwitch(new ShortHelpSwitch); diff --git a/src/php/DataSift/Storyplayer/Cli/ListTargets/Switch.php b/src/php/DataSift/Storyplayer/Cli/ListTargets/Switch.php deleted file mode 100644 index bbb41129..00000000 --- a/src/php/DataSift/Storyplayer/Cli/ListTargets/Switch.php +++ /dev/null @@ -1,105 +0,0 @@ - - * @copyright 2011-present Mediasift Ltd www.datasift.com - * @license http://www.opensource.org/licenses/bsd-license.php BSD License - * @link http://datasift.github.io/storyplayer - */ - -namespace DataSift\Storyplayer\Cli; - -use Phix_Project\CliEngine; -use Phix_Project\CliEngine\CliSwitch; -use Phix_Project\CliEngine\CliResult; - -/** - * A switch to list the supported test environments - * - * @category Libraries - * @package Storyplayer/Cli - * @author Stuart Herbert - * @copyright 2011-present Mediasift Ltd www.datasift.com - * @license http://www.opensource.org/licenses/bsd-license.php BSD License - * @link http://datasift.github.io/storyplayer - */ -class ListTargets_Switch extends CliSwitch -{ - protected $envList; - - public function __construct($envList) - { - // define the command - $this->setName('list-targets'); - $this->setShortDescription('list the available test environments'); - $this->setLongDesc( - "Use this switch to get a list of all of the test environments" - . " that are defined in the config files." - ); - - // what are the short switches? - $this->addShortSwitch('T'); - - // what are the long switches? - $this->addLongSwitch('list-targets'); - - // we are actually a command, pretending to be a switch - $this->setSwitchActsAsCommand(); - - // remember the environments list - $this->envList = $envList; - } - - /** - * - * @param CliEngine $engine - * @param int $invokes - * @param array $params - * @param bool $isDefaultParam - * @return CliResult - */ - public function process(CliEngine $engine, $invokes = 1, $params = array(), $isDefaultParam = false) - { - // list the environments (if any) in a machine-friendly way - foreach ($this->envList as $envName) { - echo "{$envName}\n"; - } - - // all done - return new CliResult(CliResult::PROCESS_COMPLETE); - } -} \ No newline at end of file