Browse Source

Camelized templates folder.

Juan Basso 15 years ago
parent
commit
21348169fa
77 changed files with 14 additions and 15 deletions
  1. 5 5
      lib/Cake/Console/Command/Task/ProjectTask.php
  2. 6 7
      lib/Cake/Console/Command/Task/TemplateTask.php
  3. 1 1
      lib/Cake/Console/Command/UpgradeShell.php
  4. 2 2
      lib/Cake/Console/ShellDispatcher.php
  5. 0 0
      lib/Cake/Console/Templates/default/actions/controller_actions.ctp
  6. 0 0
      lib/Cake/Console/Templates/default/classes/controller.ctp
  7. 0 0
      lib/Cake/Console/Templates/default/classes/fixture.ctp
  8. 0 0
      lib/Cake/Console/Templates/default/classes/model.ctp
  9. 0 0
      lib/Cake/Console/Templates/default/classes/test.ctp
  10. 0 0
      lib/Cake/Console/Templates/default/views/form.ctp
  11. 0 0
      lib/Cake/Console/Templates/default/views/home.ctp
  12. 0 0
      lib/Cake/Console/Templates/default/views/index.ctp
  13. 0 0
      lib/Cake/Console/Templates/default/views/view.ctp
  14. 0 0
      lib/Cake/Console/Templates/skel/.htaccess
  15. 0 0
      lib/Cake/Console/Templates/skel/Config/Schema/db_acl.php
  16. 0 0
      lib/Cake/Console/Templates/skel/Config/Schema/db_acl.sql
  17. 0 0
      lib/Cake/Console/Templates/skel/Config/Schema/i18n.php
  18. 0 0
      lib/Cake/Console/Templates/skel/Config/Schema/i18n.sql
  19. 0 0
      lib/Cake/Console/Templates/skel/Config/Schema/sessions.php
  20. 0 0
      lib/Cake/Console/Templates/skel/Config/Schema/sessions.sql
  21. 0 0
      lib/Cake/Console/Templates/skel/Config/acl.ini.php
  22. 0 0
      lib/Cake/Console/Templates/skel/Config/bootstrap.php
  23. 0 0
      lib/Cake/Console/Templates/skel/Config/core.php
  24. 0 0
      lib/Cake/Console/Templates/skel/Config/database.php.default
  25. 0 0
      lib/Cake/Console/Templates/skel/Config/email.php.default
  26. 0 0
      lib/Cake/Console/Templates/skel/Config/routes.php
  27. 0 0
      lib/Cake/Console/Templates/skel/Console/Command/Task/empty
  28. 0 0
      lib/Cake/Console/Templates/skel/Console/cake
  29. 0 0
      lib/Cake/Console/Templates/skel/Console/cake.bat
  30. 0 0
      lib/Cake/Console/Templates/skel/Console/cake.php
  31. 0 0
      lib/Cake/Console/Templates/skel/Controller/AppController.php
  32. 0 0
      lib/Cake/Console/Templates/skel/Controller/Component/empty
  33. 0 0
      lib/Cake/Console/Templates/skel/Controller/PagesController.php
  34. 0 0
      lib/Cake/Console/Templates/skel/Lib/empty
  35. 0 0
      lib/Cake/Console/Templates/skel/Locale/eng/LC_MESSAGES/empty
  36. 0 0
      lib/Cake/Console/Templates/skel/Model/AppModel.php
  37. 0 0
      lib/Cake/Console/Templates/skel/Model/Behavior/empty
  38. 0 0
      lib/Cake/Console/Templates/skel/Model/Datasource/empty
  39. 0 0
      lib/Cake/Console/Templates/skel/Plugin/empty
  40. 0 0
      lib/Cake/Console/Templates/skel/Test/Case/Controller/Component/empty
  41. 0 0
      lib/Cake/Console/Templates/skel/Test/Case/Controller/empty
  42. 0 0
      lib/Cake/Console/Templates/skel/Test/Case/Model/Behavior/empty
  43. 0 0
      lib/Cake/Console/Templates/skel/Test/Case/Model/empty
  44. 0 0
      lib/Cake/Console/Templates/skel/Test/Case/View/Helper/empty
  45. 0 0
      lib/Cake/Console/Templates/skel/Test/Fixture/empty
  46. 0 0
      lib/Cake/Console/Templates/skel/Vendor/empty
  47. 0 0
      lib/Cake/Console/Templates/skel/View/Elements/empty
  48. 0 0
      lib/Cake/Console/Templates/skel/View/Emails/html/default.ctp
  49. 0 0
      lib/Cake/Console/Templates/skel/View/Emails/text/default.ctp
  50. 0 0
      lib/Cake/Console/Templates/skel/View/Errors/empty
  51. 0 0
      lib/Cake/Console/Templates/skel/View/Helper/AppHelper.php
  52. 0 0
      lib/Cake/Console/Templates/skel/View/Helper/empty
  53. 0 0
      lib/Cake/Console/Templates/skel/View/Layouts/Emails/html/default.ctp
  54. 0 0
      lib/Cake/Console/Templates/skel/View/Layouts/Emails/text/default.ctp
  55. 0 0
      lib/Cake/Console/Templates/skel/View/Layouts/ajax.ctp
  56. 0 0
      lib/Cake/Console/Templates/skel/View/Layouts/default.ctp
  57. 0 0
      lib/Cake/Console/Templates/skel/View/Layouts/flash.ctp
  58. 0 0
      lib/Cake/Console/Templates/skel/View/Layouts/js/default.ctp
  59. 0 0
      lib/Cake/Console/Templates/skel/View/Layouts/rss/default.ctp
  60. 0 0
      lib/Cake/Console/Templates/skel/View/Layouts/xml/default.ctp
  61. 0 0
      lib/Cake/Console/Templates/skel/View/Pages/empty
  62. 0 0
      lib/Cake/Console/Templates/skel/View/Scaffolds/empty
  63. 0 0
      lib/Cake/Console/Templates/skel/index.php
  64. 0 0
      lib/Cake/Console/Templates/skel/tmp/cache/models/empty
  65. 0 0
      lib/Cake/Console/Templates/skel/tmp/cache/persistent/empty
  66. 0 0
      lib/Cake/Console/Templates/skel/tmp/cache/views/empty
  67. 0 0
      lib/Cake/Console/Templates/skel/tmp/logs/empty
  68. 0 0
      lib/Cake/Console/Templates/skel/tmp/sessions/empty
  69. 0 0
      lib/Cake/Console/Templates/skel/tmp/tests/empty
  70. 0 0
      lib/Cake/Console/Templates/skel/webroot/.htaccess
  71. 0 0
      lib/Cake/Console/Templates/skel/webroot/css/cake.generic.css
  72. 0 0
      lib/Cake/Console/Templates/skel/webroot/favicon.ico
  73. 0 0
      lib/Cake/Console/Templates/skel/webroot/img/cake.icon.png
  74. 0 0
      lib/Cake/Console/Templates/skel/webroot/img/cake.power.gif
  75. 0 0
      lib/Cake/Console/Templates/skel/webroot/index.php
  76. 0 0
      lib/Cake/Console/Templates/skel/webroot/js/empty
  77. 0 0
      lib/Cake/Console/Templates/skel/webroot/test.php

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

@@ -140,7 +140,7 @@ class ProjectTask extends Shell {
 			$skel = $this->in(
 				__d('cake_console', "What is the path to the directory layout you wish to copy?"),
 				null,
-				CAKE . 'Console' . DS . 'templates' . DS . 'skel'
+				CAKE . 'Console' . DS . 'Templates' . DS . 'skel'
 			);
 			if (!$skel) {
 				$this->err(__d('cake_console', 'The directory path you supplied was empty. Please try again.'));
@@ -149,7 +149,7 @@ class ProjectTask extends Shell {
 					$skel = $this->in(
 						__d('cake_console', 'Directory path does not exist please choose another:'),
 						null,
-						CAKE . 'Console' . DS . 'templates' . DS . 'skel'
+						CAKE . 'Console' . DS . 'Templates' . DS . 'skel'
 					);
 				}
 			}
@@ -203,7 +203,7 @@ class ProjectTask extends Shell {
 	public function createHome($dir) {
 		$app = basename($dir);
 		$path = $dir . 'View' . DS . 'Pages' . DS;
-		$source = CAKE . 'Console' . DS . 'templates' . DS .'default' . DS . 'views' . DS . 'home.ctp';
+		$source = CAKE . 'Console' . DS . 'Templates' . DS .'default' . DS . 'views' . DS . 'home.ctp';
 		include($source);
 		return $this->createFile($path.'home.ctp', $output);
 	}
@@ -388,8 +388,8 @@ class ProjectTask extends Shell {
 			))->addOption('empty', array(
 				'help' => __d('cake_console', 'Create empty files in each of the directories. Good if you are using git')
 			))->addOption('skel', array(
-				'default' => current(App::core('Console')) . 'templates' . DS . 'skel',
-				'help' => __d('cake_console', 'The directory layout to use for the new application skeleton. Defaults to cake/console/templates/skel of CakePHP used to create the project.')
+				'default' => current(App::core('Console')) . 'Templates' . DS . 'skel',
+				'help' => __d('cake_console', 'The directory layout to use for the new application skeleton. Defaults to cake/Console/Templates/skel of CakePHP used to create the project.')
 			));
 	}
 

+ 6 - 7
lib/Cake/Console/Command/Task/TemplateTask.php

@@ -49,7 +49,7 @@ class TemplateTask extends Shell {
 /**
  * Find the paths to all the installed shell themes in the app.
  *
- * Bake themes are directories not named `skel` inside a `vendors/shells/templates` path.
+ * Bake themes are directories not named `skel` inside a `Console/Templates` path.
  *
  * @return array Array of bake themes that are installed.
  */
@@ -59,15 +59,14 @@ class TemplateTask extends Shell {
 		$separator = DS === '/' ? '/' : '\\\\';
 		$core = preg_replace('#shells' . $separator . '$#', '', $core);
 
-		$Folder = new Folder($core . 'templates' . DS . 'default');
+		$Folder = new Folder($core . 'Templates' . DS . 'default');
 
 		$contents = $Folder->read();
 		$themeFolders = $contents[0];
 
 		$plugins = App::objects('plugin');
 		foreach ($plugins as $plugin) {
-			$paths[] = $this->_pluginPath($plugin) . 'console' . DS . 'shells' . DS;
-			$paths[] = $this->_pluginPath($plugin) . 'vendors' . DS . 'shells' . DS;
+			$paths[] = $this->_pluginPath($plugin) . 'Console' . DS;
 		}
 		$paths[] = $core;
 
@@ -78,18 +77,18 @@ class TemplateTask extends Shell {
 
 		$themes = array();
 		foreach ($paths as $path) {
-			$Folder = new Folder($path . 'templates', false);
+			$Folder = new Folder($path . 'Templates', false);
 			$contents = $Folder->read();
 			$subDirs = $contents[0];
 			foreach ($subDirs as $dir) {
 				if (empty($dir) || preg_match('@^skel$|_skel$@', $dir)) {
 					continue;
 				}
-				$Folder = new Folder($path . 'templates' . DS . $dir);
+				$Folder = new Folder($path . 'Templates' . DS . $dir);
 				$contents = $Folder->read();
 				$subDirs = $contents[0];
 				if (array_intersect($contents[0], $themeFolders)) {
-					$templateDir = $path . 'templates' . DS . $dir . DS;
+					$templateDir = $path . 'Templates' . DS . $dir . DS;
 					$themes[$dir] = $templateDir;
 				}
 			}

+ 1 - 1
lib/Cake/Console/Command/UpgradeShell.php

@@ -88,7 +88,7 @@ class UpgradeShell extends Shell {
 
 		$moves = array(
 			'libs' => 'Lib',
-			'vendors' . DS . 'shells' . DS . 'templates' => 'Console' . DS . 'templates',
+			'vendors' . DS . 'shells' . DS . 'templates' => 'Console' . DS . 'Templates',
 		);
 		foreach($moves as $old => $new) {
 			if (is_dir($old)) {

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

@@ -127,13 +127,13 @@ class ShellDispatcher {
 		define('APP_PATH', $this->params['working'] . DS);
 		define('WWW_ROOT', APP_PATH . $this->params['webroot'] . DS);
 		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);
+			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');
 		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';
+			include_once CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'Templates' . DS . 'skel' . DS . 'Config' . DS . 'core.php';
 			App::build();
 		}
 		require_once CAKE . 'Console' . DS . 'ConsoleErrorHandler.php';

lib/Cake/Console/templates/default/actions/controller_actions.ctp → lib/Cake/Console/Templates/default/actions/controller_actions.ctp


lib/Cake/Console/templates/default/classes/controller.ctp → lib/Cake/Console/Templates/default/classes/controller.ctp


lib/Cake/Console/templates/default/classes/fixture.ctp → lib/Cake/Console/Templates/default/classes/fixture.ctp


lib/Cake/Console/templates/default/classes/model.ctp → lib/Cake/Console/Templates/default/classes/model.ctp


lib/Cake/Console/templates/default/classes/test.ctp → lib/Cake/Console/Templates/default/classes/test.ctp


lib/Cake/Console/templates/default/views/form.ctp → lib/Cake/Console/Templates/default/views/form.ctp


lib/Cake/Console/templates/default/views/home.ctp → lib/Cake/Console/Templates/default/views/home.ctp


lib/Cake/Console/templates/default/views/index.ctp → lib/Cake/Console/Templates/default/views/index.ctp


lib/Cake/Console/templates/default/views/view.ctp → lib/Cake/Console/Templates/default/views/view.ctp


lib/Cake/Console/templates/skel/.htaccess → lib/Cake/Console/Templates/skel/.htaccess


lib/Cake/Console/templates/skel/Config/Schema/db_acl.php → lib/Cake/Console/Templates/skel/Config/Schema/db_acl.php


lib/Cake/Console/templates/skel/Config/Schema/db_acl.sql → lib/Cake/Console/Templates/skel/Config/Schema/db_acl.sql


lib/Cake/Console/templates/skel/Config/Schema/i18n.php → lib/Cake/Console/Templates/skel/Config/Schema/i18n.php


lib/Cake/Console/templates/skel/Config/Schema/i18n.sql → lib/Cake/Console/Templates/skel/Config/Schema/i18n.sql


lib/Cake/Console/templates/skel/Config/Schema/sessions.php → lib/Cake/Console/Templates/skel/Config/Schema/sessions.php


lib/Cake/Console/templates/skel/Config/Schema/sessions.sql → lib/Cake/Console/Templates/skel/Config/Schema/sessions.sql


lib/Cake/Console/templates/skel/Config/acl.ini.php → lib/Cake/Console/Templates/skel/Config/acl.ini.php


lib/Cake/Console/templates/skel/Config/bootstrap.php → lib/Cake/Console/Templates/skel/Config/bootstrap.php


lib/Cake/Console/templates/skel/Config/core.php → lib/Cake/Console/Templates/skel/Config/core.php


lib/Cake/Console/templates/skel/Config/database.php.default → lib/Cake/Console/Templates/skel/Config/database.php.default


lib/Cake/Console/templates/skel/Config/email.php.default → lib/Cake/Console/Templates/skel/Config/email.php.default


lib/Cake/Console/templates/skel/Config/routes.php → lib/Cake/Console/Templates/skel/Config/routes.php


lib/Cake/Console/templates/skel/Console/Command/Task/empty → lib/Cake/Console/Templates/skel/Console/Command/Task/empty


lib/Cake/Console/templates/skel/Console/cake → lib/Cake/Console/Templates/skel/Console/cake


lib/Cake/Console/templates/skel/Console/cake.bat → lib/Cake/Console/Templates/skel/Console/cake.bat


lib/Cake/Console/templates/skel/Console/cake.php → lib/Cake/Console/Templates/skel/Console/cake.php


lib/Cake/Console/templates/skel/Controller/AppController.php → lib/Cake/Console/Templates/skel/Controller/AppController.php


lib/Cake/Console/templates/skel/Controller/Component/empty → lib/Cake/Console/Templates/skel/Controller/Component/empty


lib/Cake/Console/templates/skel/Controller/PagesController.php → lib/Cake/Console/Templates/skel/Controller/PagesController.php


lib/Cake/Console/templates/skel/Lib/empty → lib/Cake/Console/Templates/skel/Lib/empty


lib/Cake/Console/templates/skel/Locale/eng/LC_MESSAGES/empty → lib/Cake/Console/Templates/skel/Locale/eng/LC_MESSAGES/empty


lib/Cake/Console/templates/skel/Model/AppModel.php → lib/Cake/Console/Templates/skel/Model/AppModel.php


lib/Cake/Console/templates/skel/Model/Behavior/empty → lib/Cake/Console/Templates/skel/Model/Behavior/empty


lib/Cake/Console/templates/skel/Model/Datasource/empty → lib/Cake/Console/Templates/skel/Model/Datasource/empty


lib/Cake/Console/templates/skel/Plugin/empty → lib/Cake/Console/Templates/skel/Plugin/empty


lib/Cake/Console/templates/skel/Test/Case/Controller/Component/empty → lib/Cake/Console/Templates/skel/Test/Case/Controller/Component/empty


lib/Cake/Console/templates/skel/Test/Case/Controller/empty → lib/Cake/Console/Templates/skel/Test/Case/Controller/empty


lib/Cake/Console/templates/skel/Test/Case/Model/Behavior/empty → lib/Cake/Console/Templates/skel/Test/Case/Model/Behavior/empty


lib/Cake/Console/templates/skel/Test/Case/Model/empty → lib/Cake/Console/Templates/skel/Test/Case/Model/empty


lib/Cake/Console/templates/skel/Test/Case/View/Helper/empty → lib/Cake/Console/Templates/skel/Test/Case/View/Helper/empty


lib/Cake/Console/templates/skel/Test/Fixture/empty → lib/Cake/Console/Templates/skel/Test/Fixture/empty


lib/Cake/Console/templates/skel/Vendor/empty → lib/Cake/Console/Templates/skel/Vendor/empty


lib/Cake/Console/templates/skel/View/Elements/empty → lib/Cake/Console/Templates/skel/View/Elements/empty


lib/Cake/Console/templates/skel/View/Emails/html/default.ctp → lib/Cake/Console/Templates/skel/View/Emails/html/default.ctp


lib/Cake/Console/templates/skel/View/Emails/text/default.ctp → lib/Cake/Console/Templates/skel/View/Emails/text/default.ctp


lib/Cake/Console/templates/skel/View/Errors/empty → lib/Cake/Console/Templates/skel/View/Errors/empty


lib/Cake/Console/templates/skel/View/Helper/AppHelper.php → lib/Cake/Console/Templates/skel/View/Helper/AppHelper.php


lib/Cake/Console/templates/skel/View/Helper/empty → lib/Cake/Console/Templates/skel/View/Helper/empty


lib/Cake/Console/templates/skel/View/Layouts/Emails/html/default.ctp → lib/Cake/Console/Templates/skel/View/Layouts/Emails/html/default.ctp


lib/Cake/Console/templates/skel/View/Layouts/Emails/text/default.ctp → lib/Cake/Console/Templates/skel/View/Layouts/Emails/text/default.ctp


lib/Cake/Console/templates/skel/View/Layouts/ajax.ctp → lib/Cake/Console/Templates/skel/View/Layouts/ajax.ctp


lib/Cake/Console/templates/skel/View/Layouts/default.ctp → lib/Cake/Console/Templates/skel/View/Layouts/default.ctp


lib/Cake/Console/templates/skel/View/Layouts/flash.ctp → lib/Cake/Console/Templates/skel/View/Layouts/flash.ctp


lib/Cake/Console/templates/skel/View/Layouts/js/default.ctp → lib/Cake/Console/Templates/skel/View/Layouts/js/default.ctp


lib/Cake/Console/templates/skel/View/Layouts/rss/default.ctp → lib/Cake/Console/Templates/skel/View/Layouts/rss/default.ctp


lib/Cake/Console/templates/skel/View/Layouts/xml/default.ctp → lib/Cake/Console/Templates/skel/View/Layouts/xml/default.ctp


lib/Cake/Console/templates/skel/View/Pages/empty → lib/Cake/Console/Templates/skel/View/Pages/empty


lib/Cake/Console/templates/skel/View/Scaffolds/empty → lib/Cake/Console/Templates/skel/View/Scaffolds/empty


lib/Cake/Console/templates/skel/index.php → lib/Cake/Console/Templates/skel/index.php


lib/Cake/Console/templates/skel/tmp/cache/models/empty → lib/Cake/Console/Templates/skel/tmp/cache/models/empty


lib/Cake/Console/templates/skel/tmp/cache/persistent/empty → lib/Cake/Console/Templates/skel/tmp/cache/persistent/empty


lib/Cake/Console/templates/skel/tmp/cache/views/empty → lib/Cake/Console/Templates/skel/tmp/cache/views/empty


lib/Cake/Console/templates/skel/tmp/logs/empty → lib/Cake/Console/Templates/skel/tmp/logs/empty


lib/Cake/Console/templates/skel/tmp/sessions/empty → lib/Cake/Console/Templates/skel/tmp/sessions/empty


lib/Cake/Console/templates/skel/tmp/tests/empty → lib/Cake/Console/Templates/skel/tmp/tests/empty


lib/Cake/Console/templates/skel/webroot/.htaccess → lib/Cake/Console/Templates/skel/webroot/.htaccess


lib/Cake/Console/templates/skel/webroot/css/cake.generic.css → lib/Cake/Console/Templates/skel/webroot/css/cake.generic.css


lib/Cake/Console/templates/skel/webroot/favicon.ico → lib/Cake/Console/Templates/skel/webroot/favicon.ico


lib/Cake/Console/templates/skel/webroot/img/cake.icon.png → lib/Cake/Console/Templates/skel/webroot/img/cake.icon.png


lib/Cake/Console/templates/skel/webroot/img/cake.power.gif → lib/Cake/Console/Templates/skel/webroot/img/cake.power.gif


lib/Cake/Console/templates/skel/webroot/index.php → lib/Cake/Console/Templates/skel/webroot/index.php


lib/Cake/Console/templates/skel/webroot/js/empty → lib/Cake/Console/Templates/skel/webroot/js/empty


lib/Cake/Console/templates/skel/webroot/test.php → lib/Cake/Console/Templates/skel/webroot/test.php