Merge pull request #17 from DavidBadura/taskwarrior-build

Taskwarrior 2.4.2
This commit is contained in:
David Badura 2015-04-22 14:09:05 +02:00
commit cc02f7aa60
3 changed files with 31 additions and 17 deletions

View File

@ -15,10 +15,17 @@ env:
- PREFER_LOWEST=""
before_install:
- sudo add-apt-repository ppa:ultrafredde/ppa -y
- sudo apt-get update -qq
- sudo apt-get install -qq task --force-yes
- wget http://taskwarrior.org/download/task-2.4.2.tar.gz
- gunzip task-2.4.2.tar.gz
- tar xf task-2.4.2.tar
- cd task-2.4.2
- sudo apt-get install cmake build-essential uuid-dev libgnutls-dev libreadline6-dev --force-yes
- sudo cmake -DCMAKE_BUILD_TYPE=release .
- sudo make
- sudo make install
- sudo ln -s /usr/local/bin/task /usr/bin/task
- task --version
- cd ..
before_script:
- composer self-update

View File

@ -255,19 +255,21 @@ class TaskManager
*/
private function edit(Task $task)
{
$this->taskwarrior->modify(
[
$params = [
'description' => $task->getDescription(),
'project' => $task->getProject(),
'priority' => $task->getPriority(),
'tags' => $task->getTags(),
'due' => $task->getDue() ? $task->getDue()->format('Ymd\THis\Z') : null,
'wait' => $task->getWait() ? $task->getWait()->format('Ymd\THis\Z') : null,
'until' => $task->getUntil() ? $task->getUntil()->format('Ymd\THis\Z') : null,
'recur' => $task->getRecurring() ? $task->getRecurring()->getValue() : null,
],
$task->getUuid()
);
'until' => $task->getUntil() ? $task->getUntil()->format('Ymd\THis\Z') : null
];
if ($task->getRecurring()) {
$params['recur'] = $task->getRecurring()->getValue();
}
$this->taskwarrior->modify($params, $task->getUuid());
}
/**

View File

@ -196,7 +196,10 @@ class TaskManagerTest extends \PHPUnit_Framework_TestCase
$this->taskManager->save($task1);
$this->assertInstanceOf('DateTime', $task1->getEntry());
$this->assertNull($task1->getModified());
$this->assertInstanceOf('DateTime', $task1->getModified());
$mod = $task1->getModified();
sleep(2);
$task1->setDescription('bar2');
@ -204,6 +207,8 @@ class TaskManagerTest extends \PHPUnit_Framework_TestCase
$this->assertInstanceOf('DateTime', $task1->getEntry());
$this->assertInstanceOf('DateTime', $task1->getModified());
$this->assertNotEquals($mod, $task1->getModified());
}
public function testEnd()