Navigation Menu

Skip to content

Commit

Permalink
Updating all calls to Shell::out().
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuswilms committed Sep 26, 2009
1 parent 0f6bca7 commit ccbc6f3
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion cake/console/libs/bake.php
Expand Up @@ -225,7 +225,7 @@ function help() {
$this->out("\n\tbake model\n\t\tbakes a model. run 'bake model help' for more info");
$this->out("\n\tbake view\n\t\tbakes views. run 'bake view help' for more info");
$this->out("\n\tbake controller\n\t\tbakes a controller. run 'bake controller help' for more info");
$this->out("");
$this->out();

}
}
Expand Down
4 changes: 2 additions & 2 deletions cake/console/libs/console.php
Expand Up @@ -238,7 +238,7 @@ function main($command = null) {
$this->out("\t$field2: $value2");
}

$this->out("");
$this->out();
} else {
$this->out("\t$field: $value");
}
Expand All @@ -253,7 +253,7 @@ function main($command = null) {
$this->out("\t$field2: $value2");
}

$this->out("");
$this->out();
} else {
$this->out("\t$field: $value");
}
Expand Down
2 changes: 1 addition & 1 deletion cake/console/libs/i18n.php
Expand Up @@ -128,7 +128,7 @@ function help() {
$this->out(__('usage:', true));
$this->out(' cake i18n help');
$this->out(' cake i18n initdb [-datasource custom]');
$this->out('');
$this->out();
$this->hr();

$this->Extract->help();
Expand Down
4 changes: 2 additions & 2 deletions cake/console/libs/schema.php
Expand Up @@ -371,7 +371,7 @@ function __update(&$Schema, $table = null) {
$this->out("\n" . __('The following statements will run.', true));
$this->out(array_map('trim', $contents));
if ('y' == $this->in(__('Are you sure you want to alter the tables?', true), array('y', 'n'), 'n')) {
$this->out('');
$this->out();
$this->out(__('Updating Database...', true));
$this->__run($contents, 'update', $Schema);
}
Expand Down Expand Up @@ -447,7 +447,7 @@ function help() {
$this->out("\n\tschema dump <filename>\n\t\tDump database sql based on schema file to <filename>. \n\t\tIf <filename> is write, schema dump will be written to a file\n\t\tthat has the same name as the app directory.");
$this->out("\n\tschema run create <schema> <table>\n\t\tDrop and create tables based on schema file\n\t\toptional <schema> arg for selecting schema name\n\t\toptional <table> arg for creating only one table\n\t\tpass the -s param with a number to use a snapshot\n\t\tTo see the changes, perform a dry run with the -dry param");
$this->out("\n\tschema run update <schema> <table>\n\t\talter tables based on schema file\n\t\toptional <schema> arg for selecting schema name.\n\t\toptional <table> arg for altering only one table.\n\t\tTo use a snapshot, pass the -s param with the snapshot number\n\t\tTo see the changes, perform a dry run with the -dry param");
$this->out("");
$this->out();
$this->_stop();
}
}
Expand Down
14 changes: 7 additions & 7 deletions cake/console/libs/tasks/controller.php
Expand Up @@ -222,7 +222,7 @@ function __interactive() {
* @return void
**/
function confirmController($controllerName, $useDynamicScaffold, $helpers, $components) {
$this->out('');
$this->out();
$this->hr();
$this->out(__('The following controller will be created:', true));
$this->hr();
Expand Down Expand Up @@ -457,27 +457,27 @@ function help() {
$this->out("Usage: cake bake controller <arg1> <arg2>...");
$this->hr();
$this->out('Commands:');
$this->out('');
$this->out();
$this->out("controller <name>");
$this->out("\tbakes controller with var \$scaffold");
$this->out('');
$this->out();
$this->out("controller <name> public");
$this->out("\tbakes controller with basic crud actions");
$this->out("\t(index, view, add, edit, delete)");
$this->out('');
$this->out();
$this->out("controller <name> admin");
$this->out("\tbakes a controller with basic crud actions for");
$this->out("\tConfigure::read('Routing.admin') methods.");
$this->out('');
$this->out();
$this->out("controller <name> public admin");
$this->out("\tbakes a controller with basic crud actions for");
$this->out("\tConfigure::read('Routing.admin') and non admin methods.");
$this->out("\t(index, view, add, edit, delete,");
$this->out("\tadmin_index, admin_view, admin_edit, admin_add, admin_delete)");
$this->out('');
$this->out();
$this->out("controller all");
$this->out("\tbakes all controllers with CRUD methods.");
$this->out("");
$this->out();
$this->_stop();
}
}
Expand Down
2 changes: 1 addition & 1 deletion cake/console/libs/tasks/db_config.php
Expand Up @@ -204,7 +204,7 @@ function __interactive() {
function __verify($config) {
$config = array_merge($this->__defaultConfig, $config);
extract($config);
$this->out('');
$this->out();
$this->hr();
$this->out('The following database configuration will be created:');
$this->hr();
Expand Down
18 changes: 9 additions & 9 deletions cake/console/libs/tasks/extract.php
Expand Up @@ -106,15 +106,15 @@ function execute() {
$this->out(__('Extract Aborted', true));
$this->_stop();
} elseif (strtoupper($response) === 'D') {
$this->out('');
$this->out();
break;
} elseif (is_dir($response)) {
$this->__paths[] = $response;
$defaultPath = 'D';
} else {
$this->err(__('The directory path you supplied was not found. Please try again.', true));
}
$this->out('');
$this->out();
}
}

Expand All @@ -133,7 +133,7 @@ function execute() {
} else {
$this->err(__('The directory path you supplied was not found. Please try again.', true));
}
$this->out('');
$this->out();
}
}

Expand All @@ -150,8 +150,8 @@ function execute() {
* @access private
*/
function __extract() {
$this->out('');
$this->out('');
$this->out();
$this->out();
$this->out(__('Extracting...', true));
$this->hr();
$this->out(__('Paths:', true));
Expand All @@ -177,7 +177,7 @@ function help() {
$this->out(__('By default -app is ROOT/app', true));
$this->hr();
$this->out(__('Usage: cake i18n extract [command] [path...]', true));
$this->out('');
$this->out();
$this->out(__('Commands:', true));
$this->out(__(' -app [path...]: directory where your application is located', true));
$this->out(__(' -root [path...]: path to install', true));
Expand All @@ -186,7 +186,7 @@ function help() {
$this->out(__(' -output [path...]: Full path to output directory', true));
$this->out(__(' -files: [comma separated list of files, full path to file is needed]', true));
$this->out(__(' cake i18n extract help: Shows this help message.', true));
$this->out('');
$this->out();
}

/**
Expand Down Expand Up @@ -230,7 +230,7 @@ function __extractTokens() {
}
$this->__buildFiles();
$this->__writeFiles();
$this->out('');
$this->out();
$this->out(__('Done.', true));
}

Expand Down Expand Up @@ -364,7 +364,7 @@ function __writeFiles() {
if ($File->exists()) {
$response = '';
while ($response == '') {
$this->out('');
$this->out();
$response = $this->in(sprintf(__('Error: %s already exists in this location. Overwrite?', true), $filename), array('y', 'n'), 'y');
if (strtoupper($response) === 'N') {
$response = '';
Expand Down
4 changes: 2 additions & 2 deletions cake/console/libs/tasks/fixture.php
Expand Up @@ -415,12 +415,12 @@ function help() {
$this->out('Commands:');
$this->out("\nfixture <name>\n\tbakes fixture with specified name.");
$this->out("\nfixture all\n\tbakes all fixtures.");
$this->out("");
$this->out();
$this->out('Parameters:');
$this->out("\t-count When using generated data, the number of records to include in the fixture(s).");
$this->out("\t-connection Which database configuration to use for baking.");
$this->out("\t-plugin lowercased_underscored name of plugin to bake fixtures for.");
$this->out("");
$this->out();
$this->_stop();
}
}
Expand Down
14 changes: 7 additions & 7 deletions cake/console/libs/tasks/model.php
Expand Up @@ -220,7 +220,7 @@ function __interactive() {
$associations = $this->doAssociations($tempModel);
}

$this->out('');
$this->out();
$this->hr();
$this->out(__('The following Model will be created:', true));
$this->hr();
Expand Down Expand Up @@ -379,7 +379,7 @@ function fieldValidation($fieldName, $metaData, $primaryKey = 'id') {
$anotherValidator = 'y';
while ($anotherValidator == 'y') {
if ($this->interactive) {
$this->out('');
$this->out();
$this->out(sprintf(__('Field: %s', true), $fieldName));
$this->out(sprintf(__('Type: %s', true), $metaData['type']));
$this->hr();
Expand Down Expand Up @@ -801,7 +801,7 @@ function getTable($modelName, $useDbConfig = null) {
$tableIsGood = false;

if (array_search($useTable, $this->__tables) === false) {
$this->out('');
$this->out();
$this->out(sprintf(__("Given your model named '%s',\nCake would expect a database table named '%s'", true), $modelName, $fullTableName));
$tableIsGood = $this->in(__('Do you want to use this table?', true), array('y','n'), 'y');
}
Expand Down Expand Up @@ -883,16 +883,16 @@ function help() {
$this->out("Usage: cake bake model <arg1>");
$this->hr();
$this->out('Commands:');
$this->out('');
$this->out();
$this->out("model");
$this->out("\tbakes model in interactive mode.");
$this->out('');
$this->out();
$this->out("model <name>");
$this->out("\tbakes model file with no associations or validation");
$this->out('');
$this->out();
$this->out("model all");
$this->out("\tbakes all model files with associations and validation");
$this->out("");
$this->out();
$this->_stop();
}

Expand Down
10 changes: 5 additions & 5 deletions cake/console/libs/tasks/plugin.php
Expand Up @@ -232,19 +232,19 @@ function help() {
$this->out("Usage: cake bake plugin <arg1> <arg2>...");
$this->hr();
$this->out('Commands:');
$this->out('');
$this->out();
$this->out("plugin <name>");
$this->out("\tbakes plugin directory structure");
$this->out('');
$this->out();
$this->out("plugin <name> model");
$this->out("\tbakes model. Run 'cake bake model help' for more info.");
$this->out('');
$this->out();
$this->out("plugin <name> controller");
$this->out("\tbakes controller. Run 'cake bake controller help' for more info.");
$this->out('');
$this->out();
$this->out("plugin <name> view");
$this->out("\tbakes view. Run 'cake bake view help' for more info.");
$this->out("");
$this->out();
$this->_stop();
}
}
Expand Down
4 changes: 2 additions & 2 deletions cake/console/libs/tasks/project.php
Expand Up @@ -308,11 +308,11 @@ function help() {
$this->out("Usage: cake bake project <arg1>");
$this->hr();
$this->out('Commands:');
$this->out('');
$this->out();
$this->out("project <name>");
$this->out("\tbakes app directory structure.");
$this->out("\tif <name> begins with '/' path is absolute.");
$this->out("");
$this->out();
$this->_stop();
}

Expand Down
12 changes: 6 additions & 6 deletions cake/console/libs/tasks/view.php
Expand Up @@ -242,7 +242,7 @@ function __interactive() {
$this->bakeActions($adminActions, $vars);
}
$this->hr();
$this->out('');
$this->out();
$this->out(__("View Scaffolding Complete.\n", true));
} else {
$this->customAction();
Expand Down Expand Up @@ -332,7 +332,7 @@ function customAction() {
$this->out(__('The action name you supplied was empty. Please try again.', true));
}
}
$this->out('');
$this->out();
$this->hr();
$this->out(__('The following view will be created:', true));
$this->hr();
Expand Down Expand Up @@ -419,22 +419,22 @@ function help() {
$this->out("Usage: cake bake view <arg1> <arg2>...");
$this->hr();
$this->out('Commands:');
$this->out('');
$this->out();
$this->out("view <controller>");
$this->out("\tWill read the given controller for methods");
$this->out("\tand bake corresponding views.");
$this->out("\tUsing the -admin flag will only bake views for actions");
$this->out("\tthat begin with Routing.admin.");
$this->out("\tIf var scaffold is found it will bake the CRUD actions");
$this->out("\t(index,view,add,edit)");
$this->out('');
$this->out();
$this->out("view <controller> <action>");
$this->out("\tWill bake a template. core templates: (index, add, edit, view)");
$this->out('');
$this->out();
$this->out("view <controller> <template> <alias>");
$this->out("\tWill use the template specified");
$this->out("\tbut name the file based on the alias");
$this->out('');
$this->out();
$this->out("view all");
$this->out("\tBake all CRUD action views for all controllers.");
$this->out("\tRequires that models and controllers exist.");
Expand Down
12 changes: 6 additions & 6 deletions cake/console/libs/testsuite.php
Expand Up @@ -170,28 +170,28 @@ function help() {
$this->out("\t\t- category - \"app\", \"core\" or name of a plugin");
$this->out("\t\t- test_type - \"case\", \"group\" or \"all\"");
$this->out("\t\t- test_file - file name with folder prefix and without the (test|group).php suffix");
$this->out('');
$this->out();
$this->out('Examples: ');
$this->out("\t\tcake testsuite app all");
$this->out("\t\tcake testsuite core all");
$this->out('');
$this->out();
$this->out("\t\tcake testsuite app case behaviors/debuggable");
$this->out("\t\tcake testsuite app case models/my_model");
$this->out("\t\tcake testsuite app case controllers/my_controller");
$this->out('');
$this->out();
$this->out("\t\tcake testsuite core case file");
$this->out("\t\tcake testsuite core case router");
$this->out("\t\tcake testsuite core case set");
$this->out('');
$this->out();
$this->out("\t\tcake testsuite app group mygroup");
$this->out("\t\tcake testsuite core group acl");
$this->out("\t\tcake testsuite core group socket");
$this->out('');
$this->out();
$this->out("\t\tcake testsuite bugs case models/bug");
$this->out("\t\t // for the plugin 'bugs' and its test case 'models/bug'");
$this->out("\t\tcake testsuite bugs group bug");
$this->out("\t\t // for the plugin bugs and its test group 'bug'");
$this->out('');
$this->out();
$this->out('Code Coverage Analysis: ');
$this->out("\n\nAppend 'cov' to any of the above in order to enable code coverage analysis");
}
Expand Down

0 comments on commit ccbc6f3

Please sign in to comment.