mark_story
56292b658c
Adding option value validation to ConsoleOptionParser.
2010-10-13 23:18:24 -04:00
mark_story
27a4f3c0d7
Adding test to make sure tags that are unknown are not removed.
2010-10-13 23:18:24 -04:00
mark_story
ad367fed9a
Adding addOptions and addArguments as convience methods for adding multiple options/arguments.
2010-10-13 23:18:24 -04:00
mark_story
72e1a96a9a
Renaming a Shell::_getOptionParser -> getOptionParser
...
Made the method public so subparser help would be easy to wire up. Moving help generation above task invocation so it always displays.
2010-10-13 23:18:23 -04:00
mark_story
ab794b300e
Adding support for help generating help for subcommands.
...
Adding tests for subcommand help generation.
2010-10-13 23:18:23 -04:00
mark_story
56339e05f3
Adding subcommand to help output.
...
Subcommands can be shell methods or tasks. Both should support additional parsers. Which is not complete yet.
2010-10-13 23:18:23 -04:00
mark_story
f1ee46749b
Fixing failing tests in Schema shell.
2010-10-13 23:18:23 -04:00
mark_story
193721a0eb
Fixing notice errors in ShellDispatcher
...
Removing ShellDispatcher tests that are now inside Shell.
Changing exception type to match the one used in ShellDispatcher.
2010-10-13 23:18:23 -04:00
mark_story
e70089891d
Adding some more array_unshift. These fix issues where tasks would receive their name in the argv which is not correct.
2010-10-13 23:18:22 -04:00
mark_story
79d1739778
Adding tests for task methods in runCommand.
...
Moving startup() call to the dispatcher so nested runCommand calls don't double output the startup content.
2010-10-13 23:18:22 -04:00
mark_story
cea9dadaa2
Fixing ShellDispatcher::parseParams tests to reflect the changes in what they do.
...
Adding tests for Shell::runCommand().
2010-10-13 23:18:22 -04:00
mark_story
cd18c8214c
Adding Shell::hasMethod and tests for it.
2010-10-13 23:18:22 -04:00
mark_story
18c5a62445
Removing a dead test and adding tests for hasTask
2010-10-13 23:18:22 -04:00
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