Skip to content

Commit

Permalink
Fixing ProjectTask tests and renaming folders in skel directory
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Apr 12, 2011
1 parent 85a7f74 commit 241a3bf
Show file tree
Hide file tree
Showing 29 changed files with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/Cake/Console/Command/Task/ProjectTask.php
Expand Up @@ -102,9 +102,9 @@ public function execute() {
$success = false;
}
if ($this->consolePath($path) === true) {
$this->out(__d('cake_console', ' * app/console/cake.php path set.'));
$this->out(__d('cake_console', ' * app/Console/cake.php path set.'));
} else {
$this->err(__d('cake_console', 'Unable to set console path for app/console.'));
$this->err(__d('cake_console', 'Unable to set console path for app/Console.'));
$success = false;
}

Expand Down Expand Up @@ -194,7 +194,7 @@ function bake($path, $skel = null, $skip = array('empty')) {
public function createHome($dir) {
$app = basename($dir);
$path = $dir . 'views' . DS . 'pages' . DS;
$source = CAKE . 'console' . DS . 'templates' . DS .'default' . DS . 'views' . DS . 'home.ctp';
$source = LIBS . 'Console' . DS . 'templates' . DS .'default' . DS . 'views' . DS . 'home.ctp';
include($source);
return $this->createFile($path.'home.ctp', $output);
}
Expand All @@ -207,10 +207,10 @@ public function createHome($dir) {
* @return boolean success
*/
public function consolePath($path) {
$File = new File($path . 'console' . DS . 'cake.php');
$File = new File($path . 'Console' . DS . 'cake.php');
$contents = $File->read();
if (preg_match('/(__CAKE_PATH__)/', $contents, $match)) {
$path = CAKE_CORE_INCLUDE_PATH . DS . 'cake' . DS . 'console' . DS;
$path = LIBS . 'Console' . DS;
$replacement = "'" . str_replace(DS, "' . DIRECTORY_SEPARATOR . '", $path) . "'";
$result = str_replace($match[0], $replacement, $contents);
if ($File->write($result)) {
Expand Down Expand Up @@ -252,7 +252,7 @@ public function securityCipherSeed($path) {
$contents = $File->read();
if (preg_match('/([\s]*Configure::write\(\'Security.cipherSeed\',[\s\'A-z0-9]*\);)/', $contents, $match)) {
if (!class_exists('Security')) {
require LIBS . 'security.php';
require LIBS . 'Utility' . DS . 'security.php';
}
$string = substr(bin2hex(Security::generateAuthKey()), 0, 30);
$result = str_replace($match[0], "\t" . 'Configure::write(\'Security.cipherSeed\', \''.$string.'\');', $contents);
Expand Down
File renamed without changes.

0 comments on commit 241a3bf

Please sign in to comment.