Commit graph

4257 commits

Author SHA1 Message Date
mark_story
fbcc9c1fc1 Making Tasks lazy load.
This allows task initialization to be moved out of ShellDispatcher where it does not belong, as tasks are similar to components.  Updating parts of TaskCollection, as the Dispatcher is still required to be passed around.
2010-10-13 23:18:22 -04:00
mark_story
7f5b5c4fbd Adding exception for unknown option usage. 2010-10-13 23:18:21 -04:00
mark_story
d3c95bc2c4 Adding epilog and description to the generate help. 2010-10-13 23:18:21 -04:00
mark_story
501e63e45d Adding argument help generation in the long help and usage string.
Fixing output of option help, formatting was calculated in 2 places.
2010-10-13 23:18:21 -04:00
mark_story
09adc38b6c Doing some fixes as the longest option + a short would cause incorrect formatting. 2010-10-13 23:18:21 -04:00
mark_story
0eb68226ce Adding ConsoleOptionParser to the AllShells test. 2010-10-13 23:18:21 -04:00
mark_story
cea6cef727 Adding smart defaults for verbose, quiet, and help options.
Adding help formatting for options.
2010-10-13 23:18:21 -04:00
mark_story
a3259743f7 Making error output style have an underline.
Adding a comment style which has blue text.
2010-10-13 23:18:21 -04:00
mark_story
f5ad54e97e Adding required argument checking. 2010-10-13 23:18:21 -04:00
mark_story
505e59ac66 Adding support for boolean options. 2010-10-13 23:18:21 -04:00
mark_story
3e402e2dfb Adding support for positional arguments.
Adding tests and support for positional arguments. Renaming description
key to help as its shorter.
2010-10-13 23:18:21 -04:00
mark_story
3b9921a390 Adding support for -abc style combination of short options.
Renaming shortcut to short as its shorter :)
2010-10-13 23:18:20 -04:00
mark_story
07bda824f0 Adding test for parsing multiple options. 2010-10-13 23:18:20 -04:00
mark_story
2c2c9a38d2 Removing required, and type from option flag as they didn't really make sense to include at this point. Adding support for --foo=bar type parameters. 2010-10-13 23:18:20 -04:00
mark_story
7b1b835bc1 Adding very basic implementation for parsing long and short options. 2010-10-13 23:18:20 -04:00
mark_story
d5d9adb92b Starting to implement options and option parsing. 2010-10-13 23:18:20 -04:00
mark_story
694537933e Adding description() and epilog() to ConsoleOptionParser. Starting to build out addOption. 2010-10-13 23:18:20 -04:00
mark_story
d914c0aaea Adding ConsoleOptionParser and its test. 2010-10-13 23:18:20 -04:00
mark_story
41db1485aa Updating test cases to use new objects.
Preventing ConsoleOutput and ConsoleInput constructors from being run as it causes too many files open exceptions.
2010-10-13 23:18:20 -04:00
mark_story
73ad3043a2 Fixing more console tests to use new internals.
Making TaskCollection pass the stdout, stdin, stderr to Tasks they create.  This allows for more flexible dependency injection and makes testing easier.
2010-10-13 23:18:20 -04:00
mark_story
a3023430c8 Updating test cases to use new Shell internals.
Cleaning up some mocks.
2010-10-13 23:18:19 -04:00
mark_story
7921ef1282 Fixing Shell tests to use ConsoleInput. 2010-10-13 23:18:19 -04:00
mark_story
67f03afa02 Moving ConsoleInput to the correct directory. 2010-10-13 23:18:19 -04:00
mark_story
d64078db2d Adding ConsoleInput for reading stdin. 2010-10-13 23:18:19 -04:00
mark_story
76c6decb52 Updating tests for Shell so they pass with the changes in the Shell internals. 2010-10-13 23:18:19 -04:00
mark_story
131433739e Removing dead test stubs and test methods.
Moving clear() into Shell, it should be a shell method.
Changing shell methods to use ConsoleOutput objects, instead of methods on Dispatcher.
2010-10-13 23:18:19 -04:00
mark_story
a55098b00b Making TaskCollection require a Shell instead of a ShellDispatcher.
This will help reduce the coupling between ShellDispatcher and other objects.
Since ShellDispatcher never directly uses or interacts with TaskCollection, it doesn't make much sense for it to have one.  Instead shells will either get their own, or be passed one in.
2010-10-13 23:18:19 -04:00
mark_story
b11f2bfb1f Adding ConsoleOutput to the AllShells group. 2010-10-13 23:18:18 -04:00
mark_story
02c4e00556 Starting to move command list out to a separate class so ShellDispatcher can stop having stderr/stdout connections. 2010-10-13 23:18:18 -04:00
mark_story
317e32f07b Making ShellDispatcher use exceptions instead of returning false and doing other goofy things.
Adding MissingShellMethodException, MissingShellClassException and MissingShellFileException for use with ShellDispatcher.
Removing duplicated tests, and refactoring them into separate tests with expected exceptions.
2010-10-13 23:18:18 -04:00
mark_story
ffbb4e6b45 Integrating ConsoleOutput with ConsoleErrorHandler.
Updating test cases to match new output.
2010-10-13 23:18:18 -04:00
mark_story
90d5c12b3e Fixing issues with background colours, and adding tests for options. 2010-10-13 23:18:18 -04:00
mark_story
d5b5fbee3b Adding formatting methods for coloured output. 2010-10-13 23:18:18 -04:00
mark_story
aec1770abc Adding style format manipulation methods. 2010-10-13 23:18:18 -04:00
mark_story
7dea9b0dbd Starting to refactor console output into ConsoleOutput. 2010-10-13 23:18:18 -04:00
mark_story
3d65b68f1d Renaming cake.test
Updating AllShells suite.
2010-10-13 23:18:17 -04:00
mark_story
9b8ce2d7fa Updating includes for shell + task includes to point at the new file. 2010-10-13 23:18:17 -04:00
mark_story
517c8949f9 Merge branch '2.0' of github.com:cakephp/cakephp into 2.0 2010-10-13 23:17:50 -04:00
mark_story
0c070f7131 Fixing tests that were failing due to SimpleTest being less sensitive to types than PHPUnit.
Fixing tests that were failing due to XmlHelper being removed in 2.0.
2010-10-13 23:09:55 -04:00
mark_story
f19e3d501c Merge branch '1.3' into integration
Conflicts:
	cake/libs/model/cake_schema.php
	cake/libs/model/datasources/dbo_source.php
	cake/libs/model/model.php
	cake/libs/view/helpers/form.php
	cake/libs/view/view.php
	cake/libs/xml.php
	cake/tests/cases/libs/model/model_delete.test.php
	cake/tests/cases/libs/view/view.test.php
	cake/tests/cases/libs/xml.test.php
2010-10-13 22:30:40 -04:00
mark_story
6529e0e2b4 Making optiongroup elements follow the escape parameter.
Tests added.
Fixes #1191
2010-10-13 21:59:53 -04:00
mark_story
3f2109f3c3 Applying patch from 'dragonfly' to fix issue where FormHelper would always append an argument even if one was supplied.
Test Added
Fixes #1155
2010-10-13 21:36:05 -04:00
Jeremy Harris
692aafbf42 Merge remote branch 'upstream/2.0' into 2.0 2010-10-11 20:12:24 -07:00
mark_story
a0a84d1a8d Changing pattern used to read digest auth data. Allows emails to be used as usernames.
This also adds the realm to the return value of SecurityComponent::parseDigestAuth().  Fixes #1181
2010-10-11 22:35:47 -04:00
Jeremy Harris
137c4f7295 Added backwards compatibility to h()'s second param 2010-10-11 19:26:41 -07:00
Jeremy Harris
b58899cf04 Added 'double' option to Santize::html() to pass double_encode parameter to htmlentities() 2010-10-11 18:25:11 -07:00
Jeremy Harris
c686362de8 Added double_encode paramater to h() 2010-10-11 18:23:05 -07:00
Juan Basso
c95c808f88 Merge with 2.0-xml 2010-10-10 23:21:56 -03:00
ADmad
62161203f2 Fixed issue where FormHelper::radio() and FormHelper::select() with option "multiple"=>"checkbox" would generate tag with invalid "id" attribute if a value was non alphanumeric 2010-10-10 23:16:48 +05:30
Phally
0d86302404 Fixed issue with Set::extract() where conditions containing a space and a slash would fail. Fixes #1185
Signed-off-by: mark_story <mark@mark-story.com>
2010-10-08 23:28:23 -04:00