18
.travis.yml
18
.travis.yml
@@ -2,26 +2,24 @@ language: php
|
|||||||
services:
|
services:
|
||||||
- mysql
|
- mysql
|
||||||
php:
|
php:
|
||||||
|
- 5.6
|
||||||
- 7
|
- 7
|
||||||
env:
|
env:
|
||||||
matrix:
|
matrix:
|
||||||
- CORE_BRANCH=master DB=sqlite
|
- CORE_BRANCH=master DB=sqlite
|
||||||
|
- CORE_BRANCH=master DB=mysql
|
||||||
- CORE_BRANCH=stable11 DB=sqlite
|
- CORE_BRANCH=stable11 DB=sqlite
|
||||||
|
- CORE_BRANCH=stable11 DB=mysql
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
# install core
|
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
||||||
- cd ../
|
- bash ./before_install.sh deck $CORE_BRANCH $DB
|
||||||
- git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b $CORE_BRANCH
|
- cd ../server
|
||||||
- mv deck server/apps/deck
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
# fill owncloud with default configs and enable deck
|
|
||||||
- cd server
|
|
||||||
- mkdir data
|
|
||||||
- ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database $DB --database-pass=''
|
|
||||||
- ./occ app:enable deck
|
- ./occ app:enable deck
|
||||||
- ./occ app:check-code deck
|
- ./occ app:check-code deck
|
||||||
- php -S localhost:8080 &
|
- php -S localhost:8080 &
|
||||||
|
|
||||||
|
before_script:
|
||||||
- cd apps/deck
|
- cd apps/deck
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Deck
|
# Deck
|
||||||
|
|
||||||
[](https://travis-ci.org/juliushaertl/deck) [](https://codecov.io/github/juliushaertl/deck) [](https://scrutinizer-ci.com/g/juliushaertl/deck/?branch=master) [](https://raw.githubusercontent.com/juliushaertl/deck/master/LICENSE)
|
[](https://travis-ci.org/juliushaertl/deck) [](https://codecov.io/github/juliushaertl/deck) [](https://scrutinizer-ci.com/g/juliushaertl/deck/?branch=master) [](https://raw.githubusercontent.com/juliushaertl/deck/master/LICENSE)
|
||||||
|
|
||||||
Deck is a kanban style project and personal management tool integrated with Nextcloud.
|
Deck is a kanban style project and personal management tool integrated with Nextcloud.
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
namespace OCA\Deck\Db;
|
namespace OCA\Deck\Db;
|
||||||
|
|
||||||
class Acl extends Entity implements \JsonSerializable {
|
class Acl extends RelationalEntity implements \JsonSerializable {
|
||||||
|
|
||||||
const PERMISSION_READ = 0;
|
const PERMISSION_READ = 0;
|
||||||
const PERMISSION_EDIT = 1;
|
const PERMISSION_EDIT = 1;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace OCA\Deck\Db;
|
|||||||
|
|
||||||
use JsonSerializable;
|
use JsonSerializable;
|
||||||
|
|
||||||
class Board extends Entity implements JsonSerializable {
|
class Board extends RelationalEntity implements JsonSerializable {
|
||||||
|
|
||||||
public $id;
|
public $id;
|
||||||
protected $title;
|
protected $title;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace OCA\Deck\Db;
|
|||||||
|
|
||||||
use JsonSerializable;
|
use JsonSerializable;
|
||||||
|
|
||||||
class Card extends Entity implements JsonSerializable {
|
class Card extends RelationalEntity implements JsonSerializable {
|
||||||
|
|
||||||
public $id;
|
public $id;
|
||||||
protected $title;
|
protected $title;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class CardMapper extends DeckMapper implements IPermissionMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $id
|
* @param $id
|
||||||
* @return Entity if not found
|
* @return RelationalEntity if not found
|
||||||
*/
|
*/
|
||||||
public function find($id) {
|
public function find($id) {
|
||||||
$sql = 'SELECT * FROM `*PREFIX*deck_cards` ' .
|
$sql = 'SELECT * FROM `*PREFIX*deck_cards` ' .
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace OCA\Deck\Db;
|
|||||||
|
|
||||||
use JsonSerializable;
|
use JsonSerializable;
|
||||||
|
|
||||||
class Label extends Entity implements JsonSerializable {
|
class Label extends RelationalEntity implements JsonSerializable {
|
||||||
|
|
||||||
public $id;
|
public $id;
|
||||||
protected $title;
|
protected $title;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
namespace OCA\Deck\Db;
|
namespace OCA\Deck\Db;
|
||||||
|
|
||||||
|
|
||||||
class Entity extends \OCP\AppFramework\Db\Entity {
|
class RelationalEntity extends \OCP\AppFramework\Db\Entity {
|
||||||
|
|
||||||
private $_relations = array();
|
private $_relations = array();
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ namespace OCA\Deck\Db;
|
|||||||
use JsonSerializable;
|
use JsonSerializable;
|
||||||
|
|
||||||
|
|
||||||
class Stack extends Entity implements JsonSerializable {
|
class Stack extends RelationalEntity implements JsonSerializable {
|
||||||
|
|
||||||
public $id;
|
public $id;
|
||||||
protected $title;
|
protected $title;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class StackMapper extends DeckMapper implements IPermissionMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $id
|
* @param $id
|
||||||
* @return Entity if not found
|
* @return \OCP\AppFramework\Db\Entity if not found
|
||||||
*/
|
*/
|
||||||
public function find($id) {
|
public function find($id) {
|
||||||
$sql = 'SELECT * FROM `*PREFIX*deck_stacks` ' .
|
$sql = 'SELECT * FROM `*PREFIX*deck_stacks` ' .
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace OCA\Deck\Db;
|
|||||||
class EntityTest extends \PHPUnit_Framework_TestCase {
|
class EntityTest extends \PHPUnit_Framework_TestCase {
|
||||||
|
|
||||||
public function testRelation() {
|
public function testRelation() {
|
||||||
$entity = new Entity();
|
$entity = new RelationalEntity();
|
||||||
$entity->foo = null;
|
$entity->foo = null;
|
||||||
$entity->addRelation('foo');
|
$entity->addRelation('foo');
|
||||||
$entity->setFoo('test');
|
$entity->setFoo('test');
|
||||||
@@ -34,7 +34,7 @@ class EntityTest extends \PHPUnit_Framework_TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function testWithoutRelation() {
|
public function testWithoutRelation() {
|
||||||
$entity = new Entity();
|
$entity = new RelationalEntity();
|
||||||
$entity->foo = null;
|
$entity->foo = null;
|
||||||
$entity->setFoo('test');
|
$entity->setFoo('test');
|
||||||
$this->assertEquals(['foo'=>true], $entity->getUpdatedFields());
|
$this->assertEquals(['foo'=>true], $entity->getUpdatedFields());
|
||||||
|
|||||||
Reference in New Issue
Block a user