Skip to content

Commit

Permalink
Removing newlines in files.
Browse files Browse the repository at this point in the history
Adding and update bake.test to bake group test.
Fixing doc blocks.
  • Loading branch information
markstory committed Jul 17, 2009
1 parent 7b06ba2 commit ad3e5f4
Show file tree
Hide file tree
Showing 22 changed files with 68 additions and 285 deletions.
11 changes: 2 additions & 9 deletions cake/console/libs/bake.php
@@ -1,5 +1,4 @@
<?php
/* SVN FILE: $Id$ */
/**
* Command-line code generation utility to automate programmer chores.
*
Expand All @@ -21,9 +20,6 @@
* @package cake
* @subpackage cake.cake.console.libs
* @since CakePHP(tm) v 1.2.0.5012
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
/**
Expand Down Expand Up @@ -137,9 +133,10 @@ function all() {
}

if (empty($this->args)) {
$this->Model->interactive = true;
$name = $this->Model->getName($this->connection);
}

foreach (array('Model', 'Controller', 'View') as $task) {
$this->{$task}->connection = $this->connection;
$this->{$task}->interactive = false;
Expand Down Expand Up @@ -188,10 +185,6 @@ function all() {
} else {
$this->err(__('Bake All could not continue without a valid model', true));
}

if (empty($this->args)) {
$this->all();
}
$this->_stop();
}

Expand Down
24 changes: 3 additions & 21 deletions cake/console/libs/tasks/controller.php
@@ -1,5 +1,4 @@
<?php
/* SVN FILE: $Id$ */
/**
* The ControllerTask handles creating and updating controller files.
*
Expand All @@ -8,20 +7,17 @@
* PHP versions 4 and 5
*
* CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
* Copyright 2005-2008, Cake Software Foundation, Inc.
* Copyright 2005-2009, Cake Software Foundation, Inc.
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
* @package cake
* @subpackage cake.cake.console.libs.tasks
* @since CakePHP(tm) v 1.2
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
/**
Expand Down Expand Up @@ -59,7 +55,6 @@ class ControllerTask extends Shell {
*/
function initialize() {
}

/**
* Execution method always used for tasks
*
Expand Down Expand Up @@ -102,7 +97,6 @@ function execute() {
}
}
}

/**
* Bake All the controllers at once. Will only bake controllers for models that exist.
*
Expand All @@ -125,7 +119,6 @@ function all() {
}
}
}

/**
* Interactive
*
Expand Down Expand Up @@ -209,7 +202,6 @@ function __interactive() {
}
}
}

/**
* Confirm a to be baked controller with the user
*
Expand Down Expand Up @@ -247,7 +239,6 @@ function confirmController($controllerName, $useDynamicScaffold, $helpers, $comp
}
$this->hr();
}

/**
* Interact with the user and ask about which methods (admin or regular they want to bake)
*
Expand All @@ -264,7 +255,6 @@ function _askAboutMethods() {
);
return array($wannaBakeCrud, $wannaBakeAdminCrud);
}

/**
* Bake scaffold actions
*
Expand Down Expand Up @@ -296,8 +286,6 @@ function bakeActions($controllerName, $admin = null, $wannaUseSession = true) {
$actions = $this->Template->generate('actions', 'controller_actions');
return $actions;
}


/**
* Assembles and writes a Controller file
*
Expand Down Expand Up @@ -326,7 +314,6 @@ function bake($controllerName, $actions = '', $helpers = null, $components = nul
}
return false;
}

/**
* Assembles and writes a unit test file
*
Expand All @@ -339,7 +326,6 @@ function bakeTest($className) {
$this->Test->connection = $this->connection;
return $this->Test->bake('Controller', $className);
}

/**
* Interact with the user and get a list of additional helpers
*
Expand All @@ -363,7 +349,6 @@ function doComponents() {
__("Please provide a comma separated list of the component names you'd like to use.\nExample: 'Acl, Security, RequestHandler'", true)
);
}

/**
* Common code for property choice handling.
*
Expand All @@ -381,7 +366,6 @@ function _doPropertyChoices($prompt, $example) {
}
return array_filter($property);
}

/**
* Outputs and gets the list of possible controllers from database
*
Expand All @@ -408,7 +392,6 @@ function listAll($useDbConfig = null) {
}
return $this->__tables;
}

/**
* Forces the user to specify the controller he wants to bake, and returns the selected controller name.
*
Expand Down Expand Up @@ -441,7 +424,6 @@ function getName($useDbConfig = null) {
}
return $controllerName;
}

/**
* Displays help contents
*
Expand Down Expand Up @@ -474,4 +456,4 @@ function help() {
$this->_stop();
}
}
?>
?>
10 changes: 2 additions & 8 deletions cake/console/libs/tasks/db_config.php
@@ -1,5 +1,4 @@
<?php
/* SVN FILE: $Id$ */
/**
* The DbConfig Task handles creating and updating the database.php
*
Expand All @@ -8,20 +7,17 @@
* PHP versions 4 and 5
*
* CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
* Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
* Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
* @package cake
* @subpackage cake.cake.console.libs.tasks
* @since CakePHP(tm) v 1.2
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
/**
Expand Down Expand Up @@ -341,7 +337,6 @@ function bake($configs) {
$filename = $this->path . 'database.php';
return $this->createFile($filename, $out);
}

/**
* Get a user specified Connection name
*
Expand All @@ -361,6 +356,5 @@ function getConfig() {
}
return $useDbConfig;
}

}
?>
8 changes: 2 additions & 6 deletions cake/console/libs/tasks/extract.php
@@ -1,5 +1,4 @@
<?php
/* SVN FILE: $Id$ */
/**
* Short description for file.
*
Expand All @@ -8,20 +7,17 @@
* PHP versions 4 and 5
*
* CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
* Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
* Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @copyright Copyright 2005-2008, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://www.cakefoundation.org)
* @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
* @package cake
* @subpackage cake.cake.console.libs
* @since CakePHP(tm) v 1.2.0.5012
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
/**
Expand Down
17 changes: 3 additions & 14 deletions cake/console/libs/tasks/fixture.php
@@ -1,12 +1,11 @@
<?php
/* SVN FILE: $Id$ */
/**
* The FixtureTest handles creating and updating fixture files.
* The FixtureTask handles creating and updating fixture files.
*
* PHP versions 4 and 5
*
* CakePHP(tm) : Rapid Development Framework (http://www.cakephp.org)
* Copyright 2005-2008, Cake Software Foundation, Inc.
* Copyright 2005-2009, Cake Software Foundation, Inc.
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
Expand All @@ -17,9 +16,6 @@
* @package cake
* @subpackage cake.cake.console.libs.tasks
* @since CakePHP(tm) v 1.3
* @version $Revision$
* @modifiedby $LastChangedBy$
* @lastmodified $Date$
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
/**
Expand Down Expand Up @@ -90,7 +86,6 @@ function execute() {
$this->bake($model);
}
}

/**
* Bake All the Fixtures at once. Will only bake fixtures for models that exist.
*
Expand All @@ -105,7 +100,6 @@ function all() {
$this->bake($model);
}
}

/**
* Interactive baking function
*
Expand Down Expand Up @@ -144,7 +138,6 @@ function importOptions($modelName) {
}
return $options;
}

/**
* Assembles and writes a Fixture file
*
Expand Down Expand Up @@ -199,7 +192,6 @@ function bake($model, $useTable = false, $importOptions = array()) {
$out = $this->generateFixtureFile($model, compact('records', 'table', 'schema', 'import', 'fields'));
return $out;
}

/**
* Generate the fixture file, and write to disk
*
Expand All @@ -226,7 +218,6 @@ function generateFixtureFile($model, $otherVars) {
$this->createFile($path . $filename, $content);
return $content;
}

/**
* Generates a string representation of a schema.
*
Expand Down Expand Up @@ -257,7 +248,6 @@ function _generateSchema($tableInfo) {
$out .= "\n\t)";
return $out;
}

/**
* Generate String representation of Records
*
Expand Down Expand Up @@ -322,7 +312,6 @@ function _generateRecords($tableInfo, $recordCount = 1) {
$out .= "\t)";
return $out;
}

/**
* Displays help contents
*
Expand All @@ -344,4 +333,4 @@ function help() {
$this->_stop();
}
}
?>
?>

0 comments on commit ad3e5f4

Please sign in to comment.