mirror of
https://github.com/Oreolek/kohana-migrations.git
synced 2024-05-24 11:58:11 +03:00
Updating README and changing controller to throw the right exception
This commit is contained in:
parent
7794e69fe8
commit
8893886896
25
README.md
25
README.md
|
@ -1,11 +1,11 @@
|
|||
# Minion
|
||||
|
||||
Minion is a module for the Kohana framework which allows you to run various tasks from the cli.
|
||||
Minion is a module for the Kohana framework which makes it easier to run various tasks from the cli.
|
||||
|
||||
The main purpose of minion is to run database migrations, but it exposes a useful framework for creating
|
||||
additional 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).
|
||||
|
||||
The system is inspired by ruckusing, which was in turn inspired by rake.
|
||||
The system is inspired by ruckusing, which had a nice system for defining tasks but lacked the desired flexibility.
|
||||
|
||||
## Getting Started
|
||||
|
||||
|
@ -24,14 +24,15 @@ To view help for a specific minion task run
|
|||
php index.php --uri=minion/help/{task}
|
||||
|
||||
For security reasons Minion will only run from the cli. Attempting to access it over http will cause
|
||||
a `Request_Exception` to be thrown.
|
||||
a `Kohana_Exception` to be thrown.
|
||||
|
||||
## Writing your own tasks
|
||||
|
||||
All minion tasks must be located in `classes/minion/task/`. They can be in any module, thus allowing you to
|
||||
ship custom minion tasks with your own module / product.
|
||||
|
||||
Each task must extend the abstract class `Minion_Task` and implement `Minion_Task::get_config_options()` and `Minion_Task::execute()`.
|
||||
Each task must extend the abstract class `Minion_Task` and implement `Minion_Task::execute()`.
|
||||
|
||||
See `Minion_Task` for more details.
|
||||
|
||||
## Documentation
|
||||
|
@ -41,16 +42,20 @@ as documentation on the cli.
|
|||
|
||||
## Testing
|
||||
|
||||
This module is unittested using the [unittest module](http://github.com/kohana/unittest). You can use the `minion` group to only run
|
||||
minion tests.
|
||||
This module is unittested using the [unittest module](http://github.com/kohana/unittest).
|
||||
You can use the `minion` group to only run minion tests.
|
||||
|
||||
i.e.
|
||||
|
||||
phpunit --group minion
|
||||
|
||||
Feel free to contribute tests(!), they can be found in the `tests/minion` directory. :)
|
||||
|
||||
## 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.
|
||||
|
||||
## FAQ
|
||||
|
||||
|
@ -64,4 +69,4 @@ Yes, controllers offer just as much control as tasks, however there are a number
|
|||
* It provides a uniform way to access and perform tasks on the command line, rather than creating an elaborate
|
||||
collection of controllers while trying to restrict access to them. If you create a module that requires command
|
||||
line interaction then you just ship a minion task with it and users will be able to start using it with minimal
|
||||
setup & configuration
|
||||
setup & configuration
|
||||
|
|
|
@ -14,7 +14,7 @@ class Controller_Minion extends Controller
|
|||
{
|
||||
if( ! Kohana::$is_cli)
|
||||
{
|
||||
throw new Request_Exception("Minion can only be ran from the cli");
|
||||
throw new Kohana_Exception("Minion can only be ran from the cli");
|
||||
}
|
||||
|
||||
return parent::before();
|
||||
|
|
Loading…
Reference in a new issue