Browse Source

Rename SymlinkAssetsTask to AssetsTask.

ADmad 11 years ago
parent
commit
b3b31f78f2

+ 9 - 9
src/Shell/PluginShell.php

@@ -27,7 +27,7 @@ class PluginShell extends Shell {
  *
  * @var array
  */
-	public $tasks = ['SymlinkAssets'];
+	public $tasks = ['Assets'];
 
 /**
  * Override main() for help message hook
@@ -37,14 +37,14 @@ 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());
@@ -52,7 +52,7 @@ class PluginShell extends Shell {
 			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();
@@ -68,9 +68,9 @@ class PluginShell extends Shell {
 
 		$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;

+ 2 - 2
src/Shell/Task/SymlinkAssetsTask.php

@@ -21,10 +21,10 @@ use Cake\Filesystem\Folder;
 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

+ 2 - 2
tests/TestCase/Shell/Task/SymlinkAssetsTaskTest.php

@@ -18,7 +18,7 @@ use Cake\Core\App;
 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;
 
 /**
@@ -37,7 +37,7 @@ class SymlinkAssetsTaskTest extends TestCase {
 		$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)
 		);