From dc006ee1295deb5998038261e41de292ba3587cc Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Fri, 7 Jan 2011 13:35:24 +0800 Subject: [PATCH 1/3] Fix PHP short open tag usage --- views/minion/task/db/migrate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/minion/task/db/migrate.php b/views/minion/task/db/migrate.php index 5aa00b0..d4580f0 100644 --- a/views/minion/task/db/migrate.php +++ b/views/minion/task/db/migrate.php @@ -1,4 +1,4 @@ - + Executed migrations Current versions of locations: From d85ba5037b3b1ee938e02b77fe6bea7e370726b5 Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Fri, 7 Jan 2011 14:12:33 +0800 Subject: [PATCH 2/3] Fix typos --- README.md | 6 +++--- classes/minion/task/db/migrate.php | 6 +++--- views/minion/task/db/generate/template.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index dc2ca6d..8fd667f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ *NOTE: Minion is currently in a beta state, please report any issues in the issue tracker* -Minion is a module for running database migrations located in the kohana cascading filesystem, but it also provides a useful framework for creating cli based tasks. +Minion is a module for running database migrations located in the Kohana cascading filesystem, but it also provides a useful framework for creating cli based tasks. The original "need" behind Minion was the lack of a good db migrations system, capable of selecting migrations from multiple locations (i.e. different modules). @@ -13,7 +13,7 @@ The system is inspired by ruckusing, which had a nice system for defining tasks * [kohana-database](https://github.com/kohana/database) -## Compatability +## Compatibility Minion should be compatible with both Kohana 3.0.x and 3.1.x @@ -63,7 +63,7 @@ Feel free to contribute tests(!), they can be found in the `tests/minion` direct ## License -This is licensed under the [same license as kohana](http://kohanaframework.org/license). +This is licensed under the [same license as Kohana](http://kohanaframework.org/license). This project is not endorsed by the Kohana Framework project. diff --git a/classes/minion/task/db/migrate.php b/classes/minion/task/db/migrate.php index 384606d..319cf6d 100644 --- a/classes/minion/task/db/migrate.php +++ b/classes/minion/task/db/migrate.php @@ -42,7 +42,7 @@ * * --quiet * - * Suppress all unnessacery output. If --dry-run is enabled then only dry run + * Suppress all unnecessary output. If --dry-run is enabled then only dry run * SQL will be output * * @author Matt Button @@ -51,7 +51,7 @@ class Minion_Task_Db_Migrate extends Minion_Task { /* - * Th' default direction for migrations, TRUE = up, FALSE = down + * The default direction for migrations, TRUE = up, FALSE = down * @var boolean */ protected $_default_direction = TRUE; @@ -113,7 +113,7 @@ class Minion_Task_Db_Migrate extends Minion_Task } /** - * Parses a comma delimted set of locations and returns an array of them + * Parses a comma delimited set of locations and returns an array of them * * @param string Comma delimited string of locations * @return array Locations diff --git a/views/minion/task/db/generate/template.php b/views/minion/task/db/generate/template.php index bae68ad..fef2b6c 100644 --- a/views/minion/task/db/generate/template.php +++ b/views/minion/task/db/generate/template.php @@ -16,7 +16,7 @@ class extends Minion_Migration_Base { } /** - * Run queries need to remove this migration + * Run queries needed to remove this migration * * @param Kohana_Database Database connection */ From 5283d121c239876f648192e61946820304a24bbe Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Fri, 7 Jan 2011 16:26:37 +0800 Subject: [PATCH 3/3] Don't fail on tasks with no command line options --- classes/controller/minion.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/controller/minion.php b/classes/controller/minion.php index f52b190..43307b7 100644 --- a/classes/controller/minion.php +++ b/classes/controller/minion.php @@ -88,7 +88,9 @@ class Controller_Minion extends Controller $options = $task->get_config_options(); - $config = call_user_func_array(array('CLI', 'options'), $options); + $config = count($options) + ? call_user_func_array(array('CLI', 'options'), $options) + : array(); echo $task->execute($config); }