Skip to content

Commit

Permalink
Merge 3.3/release/3.3.3 into 3.3/master
Browse files Browse the repository at this point in the history
  • Loading branch information
enov committed Dec 11, 2014
2 parents cfa6232 + 2415626 commit b966320
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 8 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ Icon?
.svn
nbproject
Thumbs.db
*.komodoproject
*.komodoproject
composer.lock
vendor/*
koharness_bootstrap.php
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: php

php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm

before_script:
- composer install --prefer-dist
- vendor/bin/koharness

script:
- cd /tmp/koharness && ./vendor/bin/phpunit --bootstrap=modules/unittest/bootstrap.php modules/unittest/tests.php

notifications:
email: false
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Minion

| ver | Stable | Develop |
|-------|----------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|
| 3.3.x | [![Build Status - 3.3/master](https://travis-ci.org/kohana/minion.svg?branch=3.3%2Fmaster)](https://travis-ci.org/kohana/minion) | [![Build Status - 3.3/develop](https://travis-ci.org/kohana/minion.svg?branch=3.3%2Fdevelop)](https://travis-ci.org/kohana/minion) |
| 3.4.x | [![Build Status - 3.4/master](https://travis-ci.org/kohana/minion.svg?branch=3.4%2Fmaster)](https://travis-ci.org/kohana/minion) | [![Build Status - 3.4/develop](https://travis-ci.org/kohana/minion.svg?branch=3.4%2Fdevelop)](https://travis-ci.org/kohana/minion) |

Minion is a framework for running tasks via the CLI.

The system is inspired by ruckusing, which had a nice system for defining tasks but lacked the desired flexibility for kohana integration.
Expand Down
2 changes: 1 addition & 1 deletion classes/Kohana/Minion/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public static function password($text = '')
// Create temporary file
file_put_contents($vbscript, 'wscript.echo(InputBox("'.addslashes($text).'"))');

$password = shell_exec('cscript //nologo '.escapeshellarg($command));
$password = shell_exec('cscript //nologo '.escapeshellarg($vbscript));

// Remove temporary file.
unlink($vbscript);
Expand Down
5 changes: 3 additions & 2 deletions classes/Kohana/Minion/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ class Kohana_Minion_Exception extends Kohana_Exception {
*
* Should this display a stack trace? It's useful.
*
* Should this still log? Maybe not as useful since we'll see the error on the screen.
*
* @uses Kohana_Exception::text
* @param Exception $e
* @return boolean
Expand All @@ -25,6 +23,9 @@ public static function handler(Exception $e)
{
try
{
// Log the exception
Kohana_Exception::log($e);

if ($e instanceof Minion_Exception)
{
echo $e->format_for_cli();
Expand Down
2 changes: 1 addition & 1 deletion classes/Kohana/Minion/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public function get_accepted_options()
public function build_validation(Validation $validation)
{
// Add a rule to each key making sure it's in the task
foreach ($validation->as_array() as $key => $value)
foreach ($validation->data() as $key => $value)
{
$validation->rule($key, array($this, 'valid_option'), array(':validation', ':field'));
}
Expand Down
10 changes: 9 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,18 @@
"kohana/core": ">=3.3",
"php": ">=5.3.3"
},
"require-dev": {
"kohana/core": "3.3.*@dev",
"kohana/unittest": "3.3.*@dev",
"kohana/koharness": "*@dev"
},
"extra": {
"branch-alias": {
"dev-3.3/develop": "3.3.x-dev",
"dev-3.4/develop": "3.4.x-dev"
}
},
"installer-paths": {
"vendor/{$vendor}/{$name}": ["type:kohana-module"]
}
}
}
4 changes: 2 additions & 2 deletions guide/minion/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Writing a task in minion is very easy. Simply create a new class called `Task_<T
class Task_Demo extends Minion_Task
{
protected $_options = array(
'foo' = 'bar',
'foo' => 'bar',
'bar' => NULL,
);

Expand Down Expand Up @@ -68,4 +68,4 @@ Tasks can have built-in help. Minion will read class docblocks that you specify:
*/
class Minion_Task_Demo extends Minion_Task

The `@` tags in the class comments will also be displayed in a human readable format. When writing your task comments, you should specify how to use it, and any parameters it accepts.
The `@` tags in the class comments will also be displayed in a human readable format. When writing your task comments, you should specify how to use it, and any parameters it accepts.
8 changes: 8 additions & 0 deletions koharness.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
// Configuration for koharness - builds a standalone skeleton Kohana app for running unit tests
return array(
'modules' => array(
'minion' => __DIR__,
'unittest' => __DIR__ . '/vendor/kohana/unittest'
),
);

0 comments on commit b966320

Please sign in to comment.