diff --git a/.drone.yml b/.drone.yml index 6f5b0c4..74bfeab 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,6 +15,7 @@ pipeline: - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB - cd ../server - php ./build/signed-off-checker.php + secrets: [ github_token ] when: matrix: TESTS: signed-off-check @@ -22,7 +23,7 @@ pipeline: image: nextcloudci/php7.0:php7.0-2 environment: - APP_NAME=data_request - - CORE_BRANCH=stable13 + - CORE_BRANCH=master - DB=sqlite commands: # Pre-setup steps @@ -36,27 +37,11 @@ pipeline: when: matrix: TESTS: check-app-compatbility - syntax-php5.6: - image: nextcloudci/php5.6:php5.6-8 - environment: - - APP_NAME=data_request - - CORE_BRANCH=stable13 - - DB=sqlite - commands: - # Pre-setup steps - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB - - cd ../server - - composer install - - ./lib/composer/bin/parallel-lint apps/$APP_NAME/ - when: - matrix: - TESTS: syntax-php5.6 syntax-php7.0: image: nextcloudci/php7.0:php7.0-2 environment: - APP_NAME=data_request - - CORE_BRANCH=stable13 + - CORE_BRANCH=master - DB=sqlite commands: # Pre-setup steps @@ -68,33 +53,11 @@ pipeline: when: matrix: TESTS: syntax-php7.0 - php5.6: - image: nextcloudci/php5.6:php5.6-8 - environment: - - APP_NAME=data_request - - CORE_BRANCH=stable13 - - DB=sqlite - commands: - - apt update && apt-get -y install php5-xdebug - - # Pre-setup steps - - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh - - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB - - cd ../server/ - - ./occ app:enable $APP_NAME - - cd apps/$APP_NAME - - # Run phpunit tests - - cd tests/unit/ - - phpunit --configuration phpunit.xml - when: - matrix: - TESTS: php5.6 php7.0: image: nextcloudci/php7.0:php7.0-2 environment: - APP_NAME=data_request - - CORE_BRANCH=stable13 + - CORE_BRANCH=master - DB=sqlite commands: # Pre-setup steps @@ -114,7 +77,7 @@ pipeline: image: nextcloudci/php7.1:php7.1-15 environment: - APP_NAME=data_request - - CORE_BRANCH=stable13 + - CORE_BRANCH=master - DB=sqlite commands: # Pre-setup steps @@ -130,13 +93,32 @@ pipeline: when: matrix: TESTS: php7.1 + php7.2: + image: nextcloudci/php7.2:php7.2-12 + environment: + - APP_NAME=data_request + - CORE_BRANCH=master + - DB=sqlite + commands: + # Pre-setup steps + - wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh + - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB + - cd ../server/ + - ./occ app:enable $APP_NAME + - cd apps/$APP_NAME + + # Run phpunit tests + - cd tests/unit/ + - phpunit --configuration phpunit.xml + when: + matrix: + TESTS: php7.2 matrix: include: - TESTS: signed-off-check - TESTS: check-app-compatbility - - TESTS: syntax-php5.6 - TESTS: syntax-php7.0 - - TESTS: php5.6 - TESTS: php7.0 - TESTS: php7.1 + - TESTS: php7.2 diff --git a/appinfo/info.xml b/appinfo/info.xml index 11b8f54..4c112c6 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -5,7 +5,7 @@ Data Request Request your data from the admins - 1.0.1 + 1.1.0 agpl Arthur Schiwon DataRequest @@ -15,7 +15,7 @@ https://raw.githubusercontent.com/nextcloud/data_request/master/screenshots/personal-settings.png https://raw.githubusercontent.com/nextcloud/data_request/master/screenshots/settings-close-up.png - + diff --git a/lib/Controller/DataRequestController.php b/lib/Controller/DataRequestController.php index c7477cf..7fa8b5e 100644 --- a/lib/Controller/DataRequestController.php +++ b/lib/Controller/DataRequestController.php @@ -38,10 +38,10 @@ class DataRequestController extends OCSController { public function __construct( $appName, IRequest $request, + Request $dataRequest, $corsMethods = 'PUT, POST, GET, DELETE, PATCH', $corsAllowedHeaders = 'Authorization, Content-Type, Accept', - $corsMaxAge = 1728000, - Request $dataRequest + $corsMaxAge = 1728000 ) { parent::__construct($appName, $request, $corsMethods, $corsAllowedHeaders, $corsMaxAge); $this->dataRequest = $dataRequest; diff --git a/tests/unit/Controller/DataRequestControllerTest.php b/tests/unit/Controller/DataRequestControllerTest.php index 49793fb..9bc36fd 100644 --- a/tests/unit/Controller/DataRequestControllerTest.php +++ b/tests/unit/Controller/DataRequestControllerTest.php @@ -48,10 +48,10 @@ class DataRequestControllerTest extends \Test\TestCase { $this->controller = new DataRequestController( 'data_request', $request, + $this->requestService, 'PUT, POST, GET, DELETE, PATCH', 'Authorization, Content-Type, Accept', - 1728000, - $this->requestService + 1728000 ); }