Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Moving shell templates dirs.

Updating TemplateTask to reflect changes in directories.
Updating test cases to use App::build()/App::path()
  • Loading branch information...
commit b4f4aeeec7030bd973a036f2b3bb39354d908622 1 parent e9afb63
@markstory markstory authored
Showing with 15 additions and 9 deletions.
  1. +2 −1  cake/console/libs/tasks/template.php
  2. 0  cake/console/libs/templates/skel/controllers/components/empty
  3. 0  cake/console/libs/templates/skel/locale/eng/LC_MESSAGES/empty
  4. 0  cake/console/{libs → }/templates/default/actions/controller_actions.ctp
  5. 0  cake/console/{libs → }/templates/default/classes/controller.ctp
  6. 0  cake/console/{libs → }/templates/default/classes/fixture.ctp
  7. 0  cake/console/{libs → }/templates/default/classes/model.ctp
  8. 0  cake/console/{libs → }/templates/default/classes/test.ctp
  9. 0  cake/console/{libs → }/templates/default/views/form.ctp
  10. 0  cake/console/{libs → }/templates/default/views/home.ctp
  11. 0  cake/console/{libs → }/templates/default/views/index.ctp
  12. 0  cake/console/{libs → }/templates/default/views/view.ctp
  13. 0  cake/console/{libs → }/templates/skel/.htaccess
  14. 0  cake/console/{libs → }/templates/skel/app_controller.php
  15. 0  cake/console/{libs → }/templates/skel/app_helper.php
  16. 0  cake/console/{libs → }/templates/skel/app_model.php
  17. 0  cake/console/{libs → }/templates/skel/config/acl.ini.php
  18. 0  cake/console/{libs → }/templates/skel/config/bootstrap.php
  19. 0  cake/console/{libs → }/templates/skel/config/core.php
  20. 0  cake/console/{libs → }/templates/skel/config/database.php.default
  21. 0  cake/console/{libs → }/templates/skel/config/inflections.php
  22. 0  cake/console/{libs → }/templates/skel/config/routes.php
  23. 0  cake/console/{libs → }/templates/skel/config/sql/db_acl.php
  24. 0  cake/console/{libs → }/templates/skel/config/sql/db_acl.sql
  25. 0  cake/console/{libs → }/templates/skel/config/sql/i18n.php
  26. 0  cake/console/{libs → }/templates/skel/config/sql/i18n.sql
  27. 0  cake/console/{libs → }/templates/skel/config/sql/sessions.php
  28. 0  cake/console/{libs → }/templates/skel/config/sql/sessions.sql
  29. 0  cake/console/{libs/templates/skel/views/scaffolds → templates/skel/controllers/components}/empty
  30. 0  cake/console/{libs → }/templates/skel/controllers/pages_controller.php
  31. 0  cake/console/{libs → }/templates/skel/index.php
  32. 0  cake/console/{libs/templates/skel/views/pages → templates/skel/locale/eng/LC_MESSAGES}/empty
  33. 0  cake/console/{libs/templates/skel/views/helpers → templates/skel/models/behaviors}/empty
  34. 0  cake/console/{libs/templates/skel/views/errors → templates/skel/models/datasources}/empty
  35. 0  cake/console/{libs/templates/skel/views/elements → templates/skel/plugins}/empty
  36. 0  cake/console/{libs/templates/skel/vendors/shells/templates → templates/skel/tests/cases/behaviors}/empty
  37. 0  cake/console/{libs/templates/skel/vendors/shells/tasks → templates/skel/tests/cases/components}/empty
  38. 0  cake/console/{libs/templates/skel/tmp/tests → templates/skel/tests/cases/controllers}/empty
  39. 0  cake/console/{libs/templates/skel/tmp/sessions → templates/skel/tests/cases/datasources}/empty
  40. 0  cake/console/{libs/templates/skel/tmp/logs → templates/skel/tests/cases/helpers}/empty
  41. 0  cake/console/{libs/templates/skel/tmp/cache/views → templates/skel/tests/cases/models}/empty
  42. 0  cake/console/{libs/templates/skel/tmp/cache/persistent → templates/skel/tests/cases/shells}/empty
  43. 0  cake/console/{libs/templates/skel/tmp/cache/models → templates/skel/tests/fixtures}/empty
  44. 0  cake/console/{libs → }/templates/skel/tests/groups/empty
  45. 0  cake/console/{libs/templates/skel/tests/fixtures → templates/skel/tmp/cache/models}/empty
  46. 0  cake/console/{libs/templates/skel/tests/cases/shells → templates/skel/tmp/cache/persistent}/empty
  47. 0  cake/console/{libs/templates/skel/tests/cases/models → templates/skel/tmp/cache/views}/empty
  48. 0  cake/console/{libs/templates/skel/tests/cases/helpers → templates/skel/tmp/logs}/empty
  49. 0  cake/console/{libs/templates/skel/tests/cases/datasources → templates/skel/tmp/sessions}/empty
  50. 0  cake/console/{libs/templates/skel/tests/cases/controllers → templates/skel/tmp/tests}/empty
  51. 0  cake/console/{libs → }/templates/skel/views/elements/email/html/default.ctp
  52. 0  cake/console/{libs → }/templates/skel/views/elements/email/text/default.ctp
  53. 0  cake/console/{libs/templates/skel/tests/cases/components → templates/skel/views/elements}/empty
  54. 0  cake/console/{libs/templates/skel/tests/cases/behaviors → templates/skel/views/errors}/empty
  55. 0  cake/console/{libs/templates/skel/plugins → templates/skel/views/helpers}/empty
  56. 0  cake/console/{libs → }/templates/skel/views/layouts/ajax.ctp
  57. 0  cake/console/{libs → }/templates/skel/views/layouts/default.ctp
  58. 0  cake/console/{libs → }/templates/skel/views/layouts/email/html/default.ctp
  59. 0  cake/console/{libs → }/templates/skel/views/layouts/email/text/default.ctp
  60. 0  cake/console/{libs → }/templates/skel/views/layouts/flash.ctp
  61. 0  cake/console/{libs → }/templates/skel/views/layouts/js/default.ctp
  62. 0  cake/console/{libs → }/templates/skel/views/layouts/rss/default.ctp
  63. 0  cake/console/{libs → }/templates/skel/views/layouts/xml/default.ctp
  64. 0  cake/console/{libs/templates/skel/models/datasources → templates/skel/views/pages}/empty
  65. 0  cake/console/{libs/templates/skel/models/behaviors → templates/skel/views/scaffolds}/empty
  66. 0  cake/console/{libs → }/templates/skel/webroot/.htaccess
  67. 0  cake/console/{libs → }/templates/skel/webroot/css.php
  68. 0  cake/console/{libs → }/templates/skel/webroot/css/cake.generic.css
  69. 0  cake/console/{libs → }/templates/skel/webroot/favicon.ico
  70. 0  cake/console/{libs → }/templates/skel/webroot/img/cake.icon.gif
  71. 0  cake/console/{libs → }/templates/skel/webroot/img/cake.power.gif
  72. 0  cake/console/{libs → }/templates/skel/webroot/index.php
  73. 0  cake/console/{libs → }/templates/skel/webroot/js/vendors.php
  74. 0  cake/console/{libs → }/templates/skel/webroot/test.php
  75. +13 −8 cake/tests/cases/console/libs/tasks/template.test.php
View
3  cake/console/libs/tasks/template.php
@@ -52,7 +52,8 @@ function initialize() {
* @return array Array of bake themes that are installed.
**/
function _findThemes() {
- $paths = $this->Dispatch->shellPaths;
+ $paths = App::path('shells');
+ array_unshift($paths, CAKE_CORE_INCLUDE_PATH . DS . CAKE . 'console' . DS);
$themes = array();
foreach ($paths as $path) {
$Folder =& new Folder($path . 'templates', false);
View
0  cake/console/libs/templates/skel/controllers/components/empty
No changes.
View
0  cake/console/libs/templates/skel/locale/eng/LC_MESSAGES/empty
No changes.
View
0  .../templates/default/actions/controller_actions.ctp → .../templates/default/actions/controller_actions.ctp
File renamed without changes
View
0  ...ole/libs/templates/default/classes/controller.ctp → .../console/templates/default/classes/controller.ctp
File renamed without changes
View
0  ...onsole/libs/templates/default/classes/fixture.ctp → cake/console/templates/default/classes/fixture.ctp
File renamed without changes
View
0  .../console/libs/templates/default/classes/model.ctp → cake/console/templates/default/classes/model.ctp
File renamed without changes
View
0  cake/console/libs/templates/default/classes/test.ctp → cake/console/templates/default/classes/test.ctp
File renamed without changes
View
0  cake/console/libs/templates/default/views/form.ctp → cake/console/templates/default/views/form.ctp
File renamed without changes
View
0  cake/console/libs/templates/default/views/home.ctp → cake/console/templates/default/views/home.ctp
File renamed without changes
View
0  cake/console/libs/templates/default/views/index.ctp → cake/console/templates/default/views/index.ctp
File renamed without changes
View
0  cake/console/libs/templates/default/views/view.ctp → cake/console/templates/default/views/view.ctp
File renamed without changes
View
0  cake/console/libs/templates/skel/.htaccess → cake/console/templates/skel/.htaccess
File renamed without changes
View
0  cake/console/libs/templates/skel/app_controller.php → cake/console/templates/skel/app_controller.php
File renamed without changes
View
0  cake/console/libs/templates/skel/app_helper.php → cake/console/templates/skel/app_helper.php
File renamed without changes
View
0  cake/console/libs/templates/skel/app_model.php → cake/console/templates/skel/app_model.php
File renamed without changes
View
0  cake/console/libs/templates/skel/config/acl.ini.php → cake/console/templates/skel/config/acl.ini.php
File renamed without changes
View
0  .../console/libs/templates/skel/config/bootstrap.php → cake/console/templates/skel/config/bootstrap.php
File renamed without changes
View
0  cake/console/libs/templates/skel/config/core.php → cake/console/templates/skel/config/core.php
File renamed without changes
View
0  ...e/libs/templates/skel/config/database.php.default → ...onsole/templates/skel/config/database.php.default
File renamed without changes
View
0  ...onsole/libs/templates/skel/config/inflections.php → cake/console/templates/skel/config/inflections.php
File renamed without changes
View
0  cake/console/libs/templates/skel/config/routes.php → cake/console/templates/skel/config/routes.php
File renamed without changes
View
0  ...console/libs/templates/skel/config/sql/db_acl.php → cake/console/templates/skel/config/sql/db_acl.php
File renamed without changes
View
0  ...console/libs/templates/skel/config/sql/db_acl.sql → cake/console/templates/skel/config/sql/db_acl.sql
File renamed without changes
View
0  cake/console/libs/templates/skel/config/sql/i18n.php → cake/console/templates/skel/config/sql/i18n.php
File renamed without changes
View
0  cake/console/libs/templates/skel/config/sql/i18n.sql → cake/console/templates/skel/config/sql/i18n.sql
File renamed without changes
View
0  ...nsole/libs/templates/skel/config/sql/sessions.php → cake/console/templates/skel/config/sql/sessions.php
File renamed without changes
View
0  ...nsole/libs/templates/skel/config/sql/sessions.sql → cake/console/templates/skel/config/sql/sessions.sql
File renamed without changes
View
0  ...console/libs/templates/skel/views/scaffolds/empty → ...nsole/templates/skel/controllers/components/empty
File renamed without changes
View
0  ...s/templates/skel/controllers/pages_controller.php → ...e/templates/skel/controllers/pages_controller.php
File renamed without changes
View
0  cake/console/libs/templates/skel/index.php → cake/console/templates/skel/index.php
File renamed without changes
View
0  cake/console/libs/templates/skel/views/pages/empty → ...nsole/templates/skel/locale/eng/LC_MESSAGES/empty
File renamed without changes
View
0  cake/console/libs/templates/skel/views/helpers/empty → cake/console/templates/skel/models/behaviors/empty
File renamed without changes
View
0  cake/console/libs/templates/skel/views/errors/empty → cake/console/templates/skel/models/datasources/empty
File renamed without changes
View
0  .../console/libs/templates/skel/views/elements/empty → cake/console/templates/skel/plugins/empty
File renamed without changes
View
0  ...ibs/templates/skel/vendors/shells/templates/empty → ...onsole/templates/skel/tests/cases/behaviors/empty
File renamed without changes
View
0  ...le/libs/templates/skel/vendors/shells/tasks/empty → ...nsole/templates/skel/tests/cases/components/empty
File renamed without changes
View
0  cake/console/libs/templates/skel/tmp/tests/empty → ...sole/templates/skel/tests/cases/controllers/empty
File renamed without changes
View
0  cake/console/libs/templates/skel/tmp/sessions/empty → ...sole/templates/skel/tests/cases/datasources/empty
File renamed without changes
View
0  cake/console/libs/templates/skel/tmp/logs/empty → .../console/templates/skel/tests/cases/helpers/empty
File renamed without changes
View
0  ...console/libs/templates/skel/tmp/cache/views/empty → cake/console/templates/skel/tests/cases/models/empty
File renamed without changes
View
0  ...le/libs/templates/skel/tmp/cache/persistent/empty → cake/console/templates/skel/tests/cases/shells/empty
File renamed without changes
View
0  ...onsole/libs/templates/skel/tmp/cache/models/empty → cake/console/templates/skel/tests/fixtures/empty
File renamed without changes
View
0  cake/console/libs/templates/skel/tests/groups/empty → cake/console/templates/skel/tests/groups/empty
File renamed without changes
View
0  .../console/libs/templates/skel/tests/fixtures/empty → cake/console/templates/skel/tmp/cache/models/empty
File renamed without changes
View
0  ...sole/libs/templates/skel/tests/cases/shells/empty → ...console/templates/skel/tmp/cache/persistent/empty
File renamed without changes
View
0  ...sole/libs/templates/skel/tests/cases/models/empty → cake/console/templates/skel/tmp/cache/views/empty
File renamed without changes
View
0  ...ole/libs/templates/skel/tests/cases/helpers/empty → cake/console/templates/skel/tmp/logs/empty
File renamed without changes
View
0  ...libs/templates/skel/tests/cases/datasources/empty → cake/console/templates/skel/tmp/sessions/empty
File renamed without changes
View
0  ...libs/templates/skel/tests/cases/controllers/empty → cake/console/templates/skel/tmp/tests/empty
File renamed without changes
View
0  ...plates/skel/views/elements/email/html/default.ctp → ...plates/skel/views/elements/email/html/default.ctp
File renamed without changes
View
0  ...plates/skel/views/elements/email/text/default.ctp → ...plates/skel/views/elements/email/text/default.ctp
File renamed without changes
View
0  .../libs/templates/skel/tests/cases/components/empty → cake/console/templates/skel/views/elements/empty
File renamed without changes
View
0  ...e/libs/templates/skel/tests/cases/behaviors/empty → cake/console/templates/skel/views/errors/empty
File renamed without changes
View
0  cake/console/libs/templates/skel/plugins/empty → cake/console/templates/skel/views/helpers/empty
File renamed without changes
View
0  ...onsole/libs/templates/skel/views/layouts/ajax.ctp → cake/console/templates/skel/views/layouts/ajax.ctp
File renamed without changes
View
0  ...ole/libs/templates/skel/views/layouts/default.ctp → .../console/templates/skel/views/layouts/default.ctp
File renamed without changes
View
0  ...mplates/skel/views/layouts/email/html/default.ctp → ...mplates/skel/views/layouts/email/html/default.ctp
File renamed without changes
View
0  ...mplates/skel/views/layouts/email/text/default.ctp → ...mplates/skel/views/layouts/email/text/default.ctp
File renamed without changes
View
0  ...nsole/libs/templates/skel/views/layouts/flash.ctp → cake/console/templates/skel/views/layouts/flash.ctp
File renamed without changes
View
0  .../libs/templates/skel/views/layouts/js/default.ctp → ...nsole/templates/skel/views/layouts/js/default.ctp
File renamed without changes
View
0  ...libs/templates/skel/views/layouts/rss/default.ctp → ...sole/templates/skel/views/layouts/rss/default.ctp
File renamed without changes
View
0  ...libs/templates/skel/views/layouts/xml/default.ctp → ...sole/templates/skel/views/layouts/xml/default.ctp
File renamed without changes
View
0  ...sole/libs/templates/skel/models/datasources/empty → cake/console/templates/skel/views/pages/empty
File renamed without changes
View
0  ...onsole/libs/templates/skel/models/behaviors/empty → cake/console/templates/skel/views/scaffolds/empty
File renamed without changes
View
0  cake/console/libs/templates/skel/webroot/.htaccess → cake/console/templates/skel/webroot/.htaccess
File renamed without changes
View
0  cake/console/libs/templates/skel/webroot/css.php → cake/console/templates/skel/webroot/css.php
File renamed without changes
View
0  .../libs/templates/skel/webroot/css/cake.generic.css → ...nsole/templates/skel/webroot/css/cake.generic.css
File renamed without changes
View
0  cake/console/libs/templates/skel/webroot/favicon.ico → cake/console/templates/skel/webroot/favicon.ico
File renamed without changes
View
0  ...ole/libs/templates/skel/webroot/img/cake.icon.gif → .../console/templates/skel/webroot/img/cake.icon.gif
File renamed without changes
View
0  ...le/libs/templates/skel/webroot/img/cake.power.gif → ...console/templates/skel/webroot/img/cake.power.gif
File renamed without changes
View
0  cake/console/libs/templates/skel/webroot/index.php → cake/console/templates/skel/webroot/index.php
File renamed without changes
View
0  ...onsole/libs/templates/skel/webroot/js/vendors.php → cake/console/templates/skel/webroot/js/vendors.php
File renamed without changes
View
0  cake/console/libs/templates/skel/webroot/test.php → cake/console/templates/skel/webroot/test.php
File renamed without changes
View
21 cake/tests/cases/console/libs/tasks/template.test.php
@@ -100,7 +100,7 @@ function testSet() {
* @return void
**/
function testFindingInstalledThemesForBake() {
- $consoleLibs = CAKE_CORE_INCLUDE_PATH . DS . CONSOLE_LIBS;
+ $consoleLibs = CAKE_CORE_INCLUDE_PATH . DS . CAKE . 'console' . DS;
$this->Task->Dispatch->shellPaths = array($consoleLibs);
$this->Task->initialize();
$this->assertEqual($this->Task->templatePaths, array('default' => $consoleLibs . 'templates' . DS . 'default' . DS));
@@ -138,10 +138,13 @@ function testGetThemePath() {
* @return void
**/
function testGenerate() {
- $this->Task->Dispatch->shellPaths = array(
- TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors' . DS . 'shells' . DS
- );
+ App::build(array(
+ 'shells' => array(
+ TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors' . DS . 'shells' . DS
+ )
+ ));
$this->Task->initialize();
+ $this->Task->setReturnValue('in', 1);
$result = $this->Task->generate('classes', 'test_object', array('test' => 'foo'));
$expected = "I got rendered\nfoo";
$this->assertEqual($result, $expected);
@@ -154,10 +157,12 @@ function testGenerate() {
* @return void
**/
function testGenerateWithTemplateFallbacks() {
- $this->Task->Dispatch->shellPaths = array(
- TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors' . DS . 'shells' . DS,
- CAKE_CORE_INCLUDE_PATH . DS . CONSOLE_LIBS
- );
+ App::build(array(
+ 'shells' => array(
+ TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'vendors' . DS . 'shells' . DS,
+ CAKE_CORE_INCLUDE_PATH . DS . 'console' . DS
+ )
+ ));
$this->Task->initialize();
$this->Task->params['theme'] = 'test';
$this->Task->set(array(
Please sign in to comment.
Something went wrong with that request. Please try again.