diff --git a/lib/Cake/Console/Command/Task/ProjectTask.php b/lib/Cake/Console/Command/Task/ProjectTask.php index 46dd01bfe..4503f276f 100644 --- a/lib/Cake/Console/Command/Task/ProjectTask.php +++ b/lib/Cake/Console/Command/Task/ProjectTask.php @@ -19,6 +19,8 @@ */ App::uses('File', 'Utility'); +App::uses('String', 'Utility'); +App::uses('Security', 'Utility'); /** * Task class for creating new project apps and plugins @@ -237,9 +239,6 @@ class ProjectTask extends Shell { $File = new File($path . 'config' . DS . 'core.php'); $contents = $File->read(); if (preg_match('/([\s]*Configure::write\(\'Security.salt\',[\s\'A-z0-9]*\);)/', $contents, $match)) { - if (!class_exists('Security')) { - require LIBS . 'security.php'; - } $string = Security::generateAuthKey(); $result = str_replace($match[0], "\t" . 'Configure::write(\'Security.salt\', \''.$string.'\');', $contents); if ($File->write($result)) { diff --git a/lib/Cake/Console/templates/skel/console/cake.php b/lib/Cake/Console/templates/skel/console/cake.php index 9616b97b8..d4f4ef1c0 100644 --- a/lib/Cake/Console/templates/skel/console/cake.php +++ b/lib/Cake/Console/templates/skel/console/cake.php @@ -19,7 +19,6 @@ * @since CakePHP(tm) v 1.2.0.5012 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR. 'ShellDispatcher.php'); +require_once(__CAKE_PATH__ . 'shell_dispatcher.php'); return ShellDispatcher::run($argv); - diff --git a/lib/Cake/Console/templates/skel/webroot/test.php b/lib/Cake/Console/templates/skel/webroot/test.php index 5b667a0ff..cb9180331 100644 --- a/lib/Cake/Console/templates/skel/webroot/test.php +++ b/lib/Cake/Console/templates/skel/webroot/test.php @@ -49,7 +49,7 @@ ini_set('display_errors', 1); * */ if (!defined('CAKE_CORE_INCLUDE_PATH')) { - define('CAKE_CORE_INCLUDE_PATH', ROOT . DS .'lib'); + define('CAKE_CORE_INCLUDE_PATH', ROOT); } /** diff --git a/lib/Cake/tests/cases/console/shells/tasks/project.test.php b/lib/Cake/tests/cases/console/shells/tasks/project.test.php index c3f349524..9816b145a 100644 --- a/lib/Cake/tests/cases/console/shells/tasks/project.test.php +++ b/lib/Cake/tests/cases/console/shells/tasks/project.test.php @@ -20,8 +20,11 @@ */ App::uses('ShellDispatcher', 'Console'); +App::uses('ConsoleOutput', 'Console'); +App::uses('ConsoleInput', 'Console'); App::uses('Shell', 'Console'); -App::uses('ProjecTask', 'Console/Command/Task'); +App::uses('ProjectTask', 'Console/Command/Task'); +App::uses('Folder', 'Utility'); App::uses('File', 'Utility'); /** @@ -67,7 +70,7 @@ class ProjectTaskTest extends CakeTestCase { * @return void */ protected function _setupTestProject() { - $skel = CAKE . 'console' . DS . 'templates' . DS . 'skel'; + $skel = LIBS . 'Console' . DS . 'templates' . DS . 'skel'; $this->Task->expects($this->at(0))->method('in')->will($this->returnValue('y')); $this->Task->bake($this->Task->path . 'bake_test_app', $skel); }