Skip to content

Commit

Permalink
Rename SymlinkAssetsTask to AssetsTask.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Dec 20, 2014
1 parent 37f542d commit b3b31f7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions src/Shell/PluginShell.php
Expand Up @@ -27,7 +27,7 @@ class PluginShell extends Shell {
*
* @var array
*/
public $tasks = ['SymlinkAssets'];
public $tasks = ['Assets'];

/**
* Override main() for help message hook
Expand All @@ -37,22 +37,22 @@ class PluginShell extends Shell {
public function main() {
$this->out('<info>Plugin Shell</info>');
$this->hr();
$this->out('[S]ymlink / copy assets to app\'s webroot');
$this->out('[A]ssets symlink / copy to app\'s webroot');
$this->out('[H]elp');
$this->out('[Q]uit');

$choice = strtolower($this->in('What would you like to do?', ['S', 'H', 'Q']));
$choice = strtolower($this->in('What would you like to do?', ['A', 'H', 'Q']));
switch ($choice) {
case 's':
$this->SymlinkAssets->main();
case 'a':
$this->Assets->main();
break;
case 'h':
$this->out($this->OptionParser->help());
break;
case 'q':
return $this->_stop();
default:
$this->out('You have made an invalid selection. Please choose a command to execute by entering S, H, or Q.');
$this->out('You have made an invalid selection. Please choose a command to execute by entering A, H, or Q.');
}
$this->hr();
$this->main();
Expand All @@ -68,9 +68,9 @@ public function getOptionParser() {

$parser->description(
'Plugin Shell symlinks your plugin assets to app\'s webroot.'
)->addSubcommand('symlink_assets', [
'help' => 'Symlink assets to app\'s webroot',
'parser' => $this->SymlinkAssets->getOptionParser()
)->addSubcommand('assets', [
'help' => 'Symlink / copy assets to app\'s webroot',
'parser' => $this->Assets->getOptionParser()
]);

return $parser;
Expand Down
Expand Up @@ -21,10 +21,10 @@
use Cake\Utility\Inflector;

/**
* Language string extractor
* Task for symlinking / copying plugin assets to app's webroot.
*
*/
class SymlinkAssetsTask extends Shell {
class AssetsTask extends Shell {

/**
* Execution method always used for tasks
Expand Down
Expand Up @@ -18,7 +18,7 @@
use Cake\Core\Configure;
use Cake\Core\Plugin;
use Cake\Filesystem\Folder;
use Cake\Shell\Task\SymlinkAssetsTask;
use Cake\Shell\Task\AssetsTask;
use Cake\TestSuite\TestCase;

/**
Expand All @@ -37,7 +37,7 @@ public function setUp() {
$this->io = $this->getMock('Cake\Console\ConsoleIo', [], [], '', false);

$this->Task = $this->getMock(
'Cake\Shell\Task\SymlinkAssetsTask',
'Cake\Shell\Task\AssetsTask',
array('in', 'out', 'err', '_stop'),
array($this->io)
);
Expand Down

0 comments on commit b3b31f7

Please sign in to comment.