Browse Source

Replacing config string in favor of Config

Jose Lorenzo Rodriguez 15 years ago
parent
commit
eea981940e

+ 1 - 1
lib/Cake/Configure/PhpReader.php

@@ -63,7 +63,7 @@ class PhpReader implements ConfigReaderInterface {
 		list($plugin, $key) = pluginSplit($key);
 
 		if ($plugin) {
-			$file = App::pluginPath($plugin) . 'config' . DS . $key;
+			$file = App::pluginPath($plugin) . 'Config' . DS . $key;
 		} else {
 			$file = $this->_path . $key;
 		}

+ 1 - 1
lib/Cake/Console/Command/Task/DbConfigTask.php

@@ -64,7 +64,7 @@ class DbConfigTask extends Shell {
  * @var string
  */
 	public function initialize() {
-		$this->path = APP . 'config' . DS;
+		$this->path = APP . 'Config' . DS;
 	}
 
 /**

+ 1 - 1
lib/Cake/Console/Command/Task/PluginTask.php

@@ -103,7 +103,7 @@ class PluginTask extends Shell {
 		if (strtolower($looksGood) == 'y') {
 			$Folder = new Folder($this->path . $pluginPath);
 			$directories = array(
-				'config' . DS . 'schema',
+				'Config' . DS . 'schema',
 				'Model' . DS . 'Behavior',
 				'Model' . DS . 'Datasource',
 				'Console' . DS . 'Command' . DS . 'Task',

+ 3 - 3
lib/Cake/Console/Command/Task/ProjectTask.php

@@ -60,7 +60,7 @@ class ProjectTask extends Shell {
 
 		if ($project) {
 			$response = false;
-			while ($response == false && is_dir($project) === true && file_exists($project . 'config' . 'core.php')) {
+			while ($response == false && is_dir($project) === true && file_exists($project . 'Config' . 'core.php')) {
 				$prompt = __d('cake_console', '<warning>A project already exists in this location:</warning> %s Overwrite?', $project);
 				$response = $this->in($prompt, array('y','n'), 'n');
 				if (strtolower($response) === 'n') {
@@ -236,7 +236,7 @@ class ProjectTask extends Shell {
  * @return boolean Success
  */
 	public function securitySalt($path) {
-		$File = new File($path . 'config' . DS . 'core.php');
+		$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)) {
 			$string = Security::generateAuthKey();
@@ -256,7 +256,7 @@ class ProjectTask extends Shell {
  * @return boolean Success
 	 */
 	public function securityCipherSeed($path) {
-		$File = new File($path . 'config' . DS . 'core.php');
+		$File = new File($path . 'Config' . DS . 'core.php');
 		$contents = $File->read();
 		if (preg_match('/([\s]*Configure::write\(\'Security.cipherSeed\',[\s\'A-z0-9]*\);)/', $contents, $match)) {
 			if (!class_exists('Security')) {

+ 3 - 3
lib/Cake/Console/ShellDispatcher.php

@@ -129,11 +129,11 @@ class ShellDispatcher {
 		if (!is_dir(ROOT . DS . APP_DIR . DS . 'tmp')) {
 			define('TMP', CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'templates' . DS . 'skel' . DS . 'tmp' . DS);
 		}
-		$boot = file_exists(ROOT . DS . APP_DIR . DS . 'config' . DS . 'bootstrap.php');
+		$boot = file_exists(ROOT . DS . APP_DIR . DS . 'Config' . DS . 'bootstrap.php');
 		require CORE_PATH . 'Cake' . DS . 'bootstrap.php';
 
-		if (!file_exists(APP_PATH . 'config' . DS . 'core.php')) {
-			include_once CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'templates' . DS . 'skel' . DS . 'config' . DS . 'core.php';
+		if (!file_exists(APP_PATH . 'Config' . DS . 'core.php')) {
+			include_once CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'templates' . DS . 'skel' . DS . 'Config' . DS . 'core.php';
 			App::build();
 		}
 		require_once CONSOLE_LIBS . 'ConsoleErrorHandler.php';

+ 3 - 3
lib/Cake/Core/CakePlugin.php

@@ -137,12 +137,12 @@ class CakePlugin {
 
 		$path = self::path($plugin);
 		if ($config['bootstrap'] === true) {
-			return include($path . 'config' . DS . 'bootstrap.php');
+			return include($path . 'Config' . DS . 'bootstrap.php');
 		}
 
 		$bootstrap = (array)$config['bootstrap'];
 		foreach ($bootstrap as $file) {
-			include $path . 'config' . DS . $file . '.php';
+			include $path . 'Config' . DS . $file . '.php';
 		}
 
 		return true;
@@ -159,7 +159,7 @@ class CakePlugin {
 		if ($config['routes'] === false) {
 			return false;
 		}
-		return (bool) include self::path($plugin) . 'config' . DS . 'routes.php';
+		return (bool) include self::path($plugin) . 'Config' . DS . 'routes.php';
 	}
 
 /**

+ 1 - 1
lib/Cake/Core/Configure.php

@@ -318,7 +318,7 @@ class Configure {
  */
 	public static function version() {
 		if (!isset(self::$_values['Cake']['version'])) {
-			require(LIBS . 'config' . DS . 'config.php');
+			require(LIBS . 'Config' . DS . 'config.php');
 			self::write($config);
 		}
 		return self::$_values['Cake']['version'];

+ 1 - 1
lib/Cake/I18n/Multibyte.php

@@ -1073,7 +1073,7 @@ class Multibyte {
 			}
 			if (!Configure::configured('_cake_core_')) {
 				App::uses('PhpReader', 'Configure');
-				Configure::config('_cake_core_', new PhpReader(CAKE . 'config' . DS));
+				Configure::config('_cake_core_', new PhpReader(CAKE . 'Config' . DS));
 			}
 			Configure::load('unicode' . DS . 'casefolding' . DS . $range, '_cake_core_');
 			self::$__caseFold[$range] = Configure::read($range);

+ 1 - 1
lib/Cake/Model/CakeSchema.php

@@ -128,7 +128,7 @@ class CakeSchema extends Object {
 		if (file_exists($this->path . DS . $file) && is_file($this->path . DS . $file)) {
 			$this->file = $file;
 		} elseif (!empty($this->plugin)) {
-			$this->path = App::pluginPath($this->plugin) . 'config' . DS . 'schema';
+			$this->path = App::pluginPath($this->plugin) . 'Config' . DS . 'schema';
 		}
 	}
 

+ 2 - 2
lib/Cake/Test/Case/Console/Command/SchemaShellTest.php

@@ -151,7 +151,7 @@ class SchemaShellTest extends CakeTestCase {
 		$this->assertEqual($this->Shell->Schema->name, 'TestSchema');
 		$this->assertEqual($this->Shell->Schema->file, 'test_schema.php');
 		$this->assertEqual($this->Shell->Schema->connection, 'default');
-		$this->assertEqual($this->Shell->Schema->path, APP . 'config' . DS . 'schema');
+		$this->assertEqual($this->Shell->Schema->path, APP . 'Config' . DS . 'schema');
 
 		$this->Shell->Schema = null;
 		$this->Shell->params = array(
@@ -173,7 +173,7 @@ class SchemaShellTest extends CakeTestCase {
  */
 	public function testView() {
 		$this->Shell->startup();
-		$this->Shell->Schema->path = APP . 'config' . DS . 'schema';
+		$this->Shell->Schema->path = APP . 'Config' . DS . 'schema';
 		$this->Shell->params['file'] = 'i18n.php';
 		$this->Shell->expects($this->once())->method('_stop');
 		$this->Shell->expects($this->once())->method('out');

+ 2 - 2
lib/Cake/Test/Case/Console/Command/Task/DbConfigTaskTest.php

@@ -67,7 +67,7 @@ class DbConfigTaskTest extends CakeTestCase {
 			array($out, $out, $in)
 		);
 
-		$this->Task->path = APP . 'config' . DS;
+		$this->Task->path = APP . 'Config' . DS;
 		$this->Task->databaseClassName = 'TEST_DATABASE_CONFIG';
 	}
 
@@ -100,7 +100,7 @@ class DbConfigTaskTest extends CakeTestCase {
 	public function testInitialize() {
 		$this->Task->initialize();
 		$this->assertFalse(empty($this->Task->path));
-		$this->assertEquals(APP . 'config' . DS, $this->Task->path);
+		$this->assertEquals(APP . 'Config' . DS, $this->Task->path);
 	}
 
 /**

+ 1 - 1
lib/Cake/Test/Case/Console/Command/Task/PluginTaskTest.php

@@ -81,7 +81,7 @@ class PluginTaskTest extends CakeTestCase {
 		$this->assertTrue(is_dir($path), 'No plugin dir %s');
 		
 		$directories = array(
-			'config' . DS . 'schema',
+			'Config' . DS . 'schema',
 			'Model' . DS . 'Behavior',
 			'Model' . DS . 'Datasource',
 			'Console' . DS . 'Command' . DS . 'Task',

+ 6 - 6
lib/Cake/Test/Case/Console/Command/Task/ProjectTaskTest.php

@@ -86,8 +86,8 @@ class ProjectTaskTest extends CakeTestCase {
 
 		$this->assertTrue(is_dir($path), 'No project dir %s');
 		$dirs = array(
-			'config',
-			'config' . DS . 'schema',
+			'Config',
+			'Config' . DS . 'schema',
 			'Console',
 			'Console' . DS . 'Command',
 			'Console' . DS . 'Command' . DS . 'Task',
@@ -150,7 +150,7 @@ class ProjectTaskTest extends CakeTestCase {
 		$result = $this->Task->securitySalt($path);
 		$this->assertTrue($result);
 
-		$file = new File($path . 'config' . DS . 'core.php');
+		$file = new File($path . 'Config' . DS . 'core.php');
 		$contents = $file->read();
 		$this->assertNoPattern('/DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi/', $contents, 'Default Salt left behind. %s');
 	}
@@ -167,7 +167,7 @@ class ProjectTaskTest extends CakeTestCase {
 		$result = $this->Task->securityCipherSeed($path);
 		$this->assertTrue($result);
 
-		$file = new File($path . 'config' . DS . 'core.php');
+		$file = new File($path . 'Config' . DS . 'core.php');
 		$contents = $file->read();
 		$this->assertNoPattern('/76859309657453542496749683645/', $contents, 'Default CipherSeed left behind. %s');
 	}
@@ -204,7 +204,7 @@ class ProjectTaskTest extends CakeTestCase {
 
 		Configure::write('Routing.prefixes', null);
 		$this->_setupTestProject();
-		$this->Task->configPath = $this->Task->path . 'bake_test_app' . DS . 'config' . DS;
+		$this->Task->configPath = $this->Task->path . 'bake_test_app' . DS . 'Config' . DS;
 		$this->Task->expects($this->once())->method('in')->will($this->returnValue('super_duper_admin'));
 
 		$result = $this->Task->getPrefix();
@@ -242,7 +242,7 @@ class ProjectTaskTest extends CakeTestCase {
 	public function testGetPrefixWithMultiplePrefixes() {
 		Configure::write('Routing.prefixes', array('admin', 'ninja', 'shinobi'));
 		$this->_setupTestProject();
-		$this->Task->configPath = $this->Task->path . 'bake_test_app' . DS . 'config' . DS;
+		$this->Task->configPath = $this->Task->path . 'bake_test_app' . DS . 'Config' . DS;
 		$this->Task->expects($this->once())->method('in')->will($this->returnValue(2));
 
 		$result = $this->Task->getPrefix();

+ 8 - 8
lib/Cake/Test/Case/Core/AppTest.php

@@ -551,10 +551,10 @@ class AppImportTest extends CakeTestCase {
  * @return void
  */
 	function testFileLoading () {
-		$file = App::import('File', 'RealFile', false, array(), LIBS  . 'config' . DS . 'config.php');
+		$file = App::import('File', 'RealFile', false, array(), LIBS  . 'Config' . DS . 'config.php');
 		$this->assertTrue($file);
 
-		$file = App::import('File', 'NoFile', false, array(), LIBS  . 'config' . DS . 'cake' . DS . 'config.php');
+		$file = App::import('File', 'NoFile', false, array(), LIBS  . 'Config' . DS . 'cake' . DS . 'config.php');
 		$this->assertFalse($file);
 	}
 
@@ -566,12 +566,12 @@ class AppImportTest extends CakeTestCase {
  */
 	function testFileLoadingWithArray() {
 		$type = array('type' => 'File', 'name' => 'SomeName', 'parent' => false,
-				'file' => LIBS  . DS . 'config' . DS . 'config.php');
+				'file' => LIBS  . DS . 'Config' . DS . 'config.php');
 		$file = App::import($type);
 		$this->assertTrue($file);
 
 		$type = array('type' => 'File', 'name' => 'NoFile', 'parent' => false,
-				'file' => LIBS  . 'config' . DS . 'cake' . DS . 'config.php');
+				'file' => LIBS  . 'Config' . DS . 'cake' . DS . 'config.php');
 		$file = App::import($type);
 		$this->assertFalse($file);
 	}
@@ -583,13 +583,13 @@ class AppImportTest extends CakeTestCase {
  * @return void
  */
 	function testFileLoadingReturnValue () {
-		$file = App::import('File', 'Name', false, array(), LIBS  . 'config' . DS . 'config.php', true);
+		$file = App::import('File', 'Name', false, array(), LIBS  . 'Config' . DS . 'config.php', true);
 		$this->assertTrue(!empty($file));
 
 		$this->assertTrue(isset($file['Cake.version']));
 
 		$type = array('type' => 'File', 'name' => 'OtherName', 'parent' => false,
-				'file' => LIBS  . 'config' . DS . 'config.php', 'return' => true);
+				'file' => LIBS  . 'Config' . DS . 'config.php', 'return' => true);
 		$file = App::import($type);
 		$this->assertTrue(!empty($file));
 
@@ -603,7 +603,7 @@ class AppImportTest extends CakeTestCase {
  * @return void
  */
 	function testLoadingWithSearch () {
-		$file = App::import('File', 'NewName', false, array(LIBS . 'config' . DS), 'config.php');
+		$file = App::import('File', 'NewName', false, array(LIBS . 'Config' . DS), 'config.php');
 		$this->assertTrue($file);
 
 		$file = App::import('File', 'AnotherNewName', false, array(LIBS), 'config.php');
@@ -622,7 +622,7 @@ class AppImportTest extends CakeTestCase {
 			'name' => 'RandomName',
 			'parent' => false,
 			'file' => 'config.php',
-			'search' => array(LIBS . 'config' . DS)
+			'search' => array(LIBS . 'Config' . DS)
 		);
 		$file = App::import($type);
 		$this->assertTrue($file);

+ 30 - 30
lib/Cake/Test/Case/Utility/FolderTest.php

@@ -316,41 +316,41 @@ class FolderTest extends CakeTestCase {
 		$Folder = new Folder();
 		$expected = array(
 			array(
-				LIBS . 'config',
-				LIBS . 'config' . DS . 'unicode',
-				LIBS . 'config' . DS . 'unicode' .  DS . 'casefolding'
+				LIBS . 'Config',
+				LIBS . 'Config' . DS . 'unicode',
+				LIBS . 'Config' . DS . 'unicode' .  DS . 'casefolding'
 			),
 			array(
-				LIBS . 'config' . DS . 'config.php',
-				LIBS . 'config' . DS . 'unicode' .  DS . 'casefolding' . DS . '0080_00ff.php',
-				LIBS . 'config' . DS . 'unicode' .  DS . 'casefolding' . DS . '0100_017f.php',
-				LIBS . 'config' . DS . 'unicode' .  DS . 'casefolding' . DS . '0180_024F.php',
-				LIBS . 'config' . DS . 'unicode' .  DS . 'casefolding' . DS . '0250_02af.php',
-				LIBS . 'config' . DS . 'unicode' .  DS . 'casefolding' . DS . '0370_03ff.php',
-				LIBS . 'config' . DS . 'unicode' .  DS . 'casefolding' . DS . '0400_04ff.php',
-				LIBS . 'config' . DS . 'unicode' .  DS . 'casefolding' . DS . '0500_052f.php',
-				LIBS . 'config' . DS . 'unicode' .  DS . 'casefolding' . DS . '0530_058f.php',
-				LIBS . 'config' . DS . 'unicode' .  DS . 'casefolding' . DS . '1e00_1eff.php',
-				LIBS . 'config' . DS . 'unicode' .  DS . 'casefolding' . DS . '1f00_1fff.php',
-				LIBS . 'config' . DS . 'unicode' .  DS . 'casefolding' . DS . '2100_214f.php',
-				LIBS . 'config' . DS . 'unicode' .  DS . 'casefolding' . DS . '2150_218f.php',
-				LIBS . 'config' . DS . 'unicode' .  DS . 'casefolding' . DS . '2460_24ff.php',
-				LIBS . 'config' . DS . 'unicode' .  DS . 'casefolding' . DS . '2c00_2c5f.php',
-				LIBS . 'config' . DS . 'unicode' .  DS . 'casefolding' . DS . '2c60_2c7f.php',
-				LIBS . 'config' . DS . 'unicode' .  DS . 'casefolding' . DS . '2c80_2cff.php',
-				LIBS . 'config' . DS . 'unicode' .  DS . 'casefolding' . DS . 'ff00_ffef.php'
+				LIBS . 'Config' . DS . 'config.php',
+				LIBS . 'Config' . DS . 'unicode' .  DS . 'casefolding' . DS . '0080_00ff.php',
+				LIBS . 'Config' . DS . 'unicode' .  DS . 'casefolding' . DS . '0100_017f.php',
+				LIBS . 'Config' . DS . 'unicode' .  DS . 'casefolding' . DS . '0180_024F.php',
+				LIBS . 'Config' . DS . 'unicode' .  DS . 'casefolding' . DS . '0250_02af.php',
+				LIBS . 'Config' . DS . 'unicode' .  DS . 'casefolding' . DS . '0370_03ff.php',
+				LIBS . 'Config' . DS . 'unicode' .  DS . 'casefolding' . DS . '0400_04ff.php',
+				LIBS . 'Config' . DS . 'unicode' .  DS . 'casefolding' . DS . '0500_052f.php',
+				LIBS . 'Config' . DS . 'unicode' .  DS . 'casefolding' . DS . '0530_058f.php',
+				LIBS . 'Config' . DS . 'unicode' .  DS . 'casefolding' . DS . '1e00_1eff.php',
+				LIBS . 'Config' . DS . 'unicode' .  DS . 'casefolding' . DS . '1f00_1fff.php',
+				LIBS . 'Config' . DS . 'unicode' .  DS . 'casefolding' . DS . '2100_214f.php',
+				LIBS . 'Config' . DS . 'unicode' .  DS . 'casefolding' . DS . '2150_218f.php',
+				LIBS . 'Config' . DS . 'unicode' .  DS . 'casefolding' . DS . '2460_24ff.php',
+				LIBS . 'Config' . DS . 'unicode' .  DS . 'casefolding' . DS . '2c00_2c5f.php',
+				LIBS . 'Config' . DS . 'unicode' .  DS . 'casefolding' . DS . '2c60_2c7f.php',
+				LIBS . 'Config' . DS . 'unicode' .  DS . 'casefolding' . DS . '2c80_2cff.php',
+				LIBS . 'Config' . DS . 'unicode' .  DS . 'casefolding' . DS . 'ff00_ffef.php'
 			)
 		);
 
-		$result = $Folder->tree(LIBS . 'config', false);
+		$result = $Folder->tree(LIBS . 'Config', false);
 		$this->assertIdentical(array_diff($expected[0], $result[0]), array());
 		$this->assertIdentical(array_diff($result[0], $expected[0]), array());
 
-		$result = $Folder->tree(LIBS . 'config', false, 'dir');
+		$result = $Folder->tree(LIBS . 'Config', false, 'dir');
 		$this->assertIdentical(array_diff($expected[0], $result), array());
 		$this->assertIdentical(array_diff($result, $expected[0]), array());
 
-		$result = $Folder->tree(LIBS . 'config', false, 'files');
+		$result = $Folder->tree(LIBS . 'Config', false, 'files');
 		$this->assertIdentical(array_diff($expected[1], $result), array());
 		$this->assertIdentical(array_diff($result, $expected[1]), array());
 	}
@@ -472,8 +472,8 @@ class FolderTest extends CakeTestCase {
 		$result = $Folder->inCakePath($path);
 		$this->assertFalse($result);
 
-		$path = DS . 'lib' . DS . 'Cake' . DS . 'config';
-		$Folder->cd(ROOT . DS . 'lib' . DS . 'Cake' . DS . 'config');
+		$path = DS . 'lib' . DS . 'Cake' . DS . 'Config';
+		$Folder->cd(ROOT . DS . 'lib' . DS . 'Cake' . DS . 'Config');
 		$result = $Folder->inCakePath($path);
 		$this->assertTrue($result);
 	}
@@ -486,7 +486,7 @@ class FolderTest extends CakeTestCase {
  */
 	function testFind() {
 		$Folder = new Folder();
-		$Folder->cd(LIBS . 'config');
+		$Folder->cd(LIBS . 'Config');
 		$result = $Folder->find();
 		$expected = array('config.php');
 		$this->assertIdentical(array_diff($expected, $result), array());
@@ -542,14 +542,14 @@ class FolderTest extends CakeTestCase {
 		$Folder->cd(LIBS);
 		$result = $Folder->findRecursive('(config|paths)\.php');
 		$expected = array(
-			LIBS . 'config' . DS . 'config.php'
+			LIBS . 'Config' . DS . 'config.php'
 		);
 		$this->assertIdentical(array_diff($expected, $result), array());
 		$this->assertIdentical(array_diff($result, $expected), array());
 
 		$result = $Folder->findRecursive('(config|paths)\.php', true);
 		$expected = array(
-			LIBS . 'config' . DS . 'config.php'
+			LIBS . 'Config' . DS . 'config.php'
 		);
 		$this->assertIdentical($result, $expected);
 
@@ -583,7 +583,7 @@ class FolderTest extends CakeTestCase {
 		);
 		$this->assertIdentical($result, $expected);
 
-		$Folder->cd(LIBS . 'config');
+		$Folder->cd(LIBS . 'Config');
 		$Folder->cd(TMP);
 		$Folder->delete($Folder->pwd() . DS . 'testme');
 		$File->delete();

+ 1 - 1
lib/Cake/View/Errors/missing_connection.ctp

@@ -23,7 +23,7 @@
 </p>
 <p class="error">
 	<strong><?php echo __d('cake_dev', 'Error'); ?>: </strong>
-	<?php echo __d('cake_dev', 'Confirm you have created the file : %s.', APP_DIR . DS . 'config' . DS . 'database.php'); ?>
+	<?php echo __d('cake_dev', 'Confirm you have created the file : %s.', APP_DIR . DS . 'Config' . DS . 'database.php'); ?>
 </p>
 <p class="notice">
 	<strong><?php echo __d('cake_dev', 'Notice'); ?>: </strong>

+ 1 - 1
lib/Cake/View/Errors/missing_database.ctp

@@ -23,7 +23,7 @@
 </p>
 <p class="error">
 	<strong><?php echo __d('cake_dev', 'Error'); ?>: </strong>
-	<?php echo __d('cake_dev', 'Confirm you have created the file: %s', APP_DIR . DS . 'config' . DS . 'database.php'); ?>
+	<?php echo __d('cake_dev', 'Confirm you have created the file: %s', APP_DIR . DS . 'Config' . DS . 'database.php'); ?>
 </p>
 <p class="notice">
 	<strong><?php echo __d('cake_dev', 'Notice'); ?>: </strong>