From 4cfa9fe8a6e607e32eb0a6b43ac12e780be80345 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 1 Aug 2018 16:55:35 +0200 Subject: [PATCH 1/5] make data_request compatible with Nc14 Signed-off-by: Arthur Schiwon --- appinfo/info.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 - + From 5fc4980bbf4a8483115207dac7e9b6858980197c Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 1 Aug 2018 16:58:59 +0200 Subject: [PATCH 2/5] required args first Signed-off-by: Arthur Schiwon --- lib/Controller/DataRequestController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; From 66c52e3a7ef29855fd378d9b140f2b1fafe18e57 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 1 Aug 2018 17:04:24 +0200 Subject: [PATCH 3/5] adjust CI Signed-off-by: Arthur Schiwon --- .drone.yml | 69 ++++++++++++++++++++---------------------------------- 1 file changed, 25 insertions(+), 44 deletions(-) diff --git a/.drone.yml b/.drone.yml index 6f5b0c4..dd3ae2e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,7 +22,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 +36,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 +52,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 +76,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 +92,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 From ab6743cb17b7a9769bba2c546da46d50734fd900 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 1 Aug 2018 17:35:11 +0200 Subject: [PATCH 4/5] adjust tests Signed-off-by: Arthur Schiwon --- tests/unit/Controller/DataRequestControllerTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ); } From b51242178c320d733fb13b2b7187122026be2642 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 1 Aug 2018 18:47:51 +0200 Subject: [PATCH 5/5] use github_token Signed-off-by: Arthur Schiwon --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index dd3ae2e..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