Merge pull request #19 from nextcloud/nc14-compat

make data_request compatible with Nc14
This commit is contained in:
blizzz 2018-08-02 12:49:40 +04:00 committed by GitHub
commit a2ee407814
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 50 deletions

View File

@ -15,6 +15,7 @@ pipeline:
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB - bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
- cd ../server - cd ../server
- php ./build/signed-off-checker.php - php ./build/signed-off-checker.php
secrets: [ github_token ]
when: when:
matrix: matrix:
TESTS: signed-off-check TESTS: signed-off-check
@ -22,7 +23,7 @@ pipeline:
image: nextcloudci/php7.0:php7.0-2 image: nextcloudci/php7.0:php7.0-2
environment: environment:
- APP_NAME=data_request - APP_NAME=data_request
- CORE_BRANCH=stable13 - CORE_BRANCH=master
- DB=sqlite - DB=sqlite
commands: commands:
# Pre-setup steps # Pre-setup steps
@ -36,27 +37,11 @@ pipeline:
when: when:
matrix: matrix:
TESTS: check-app-compatbility 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: syntax-php7.0:
image: nextcloudci/php7.0:php7.0-2 image: nextcloudci/php7.0:php7.0-2
environment: environment:
- APP_NAME=data_request - APP_NAME=data_request
- CORE_BRANCH=stable13 - CORE_BRANCH=master
- DB=sqlite - DB=sqlite
commands: commands:
# Pre-setup steps # Pre-setup steps
@ -68,33 +53,11 @@ pipeline:
when: when:
matrix: matrix:
TESTS: syntax-php7.0 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: php7.0:
image: nextcloudci/php7.0:php7.0-2 image: nextcloudci/php7.0:php7.0-2
environment: environment:
- APP_NAME=data_request - APP_NAME=data_request
- CORE_BRANCH=stable13 - CORE_BRANCH=master
- DB=sqlite - DB=sqlite
commands: commands:
# Pre-setup steps # Pre-setup steps
@ -114,7 +77,7 @@ pipeline:
image: nextcloudci/php7.1:php7.1-15 image: nextcloudci/php7.1:php7.1-15
environment: environment:
- APP_NAME=data_request - APP_NAME=data_request
- CORE_BRANCH=stable13 - CORE_BRANCH=master
- DB=sqlite - DB=sqlite
commands: commands:
# Pre-setup steps # Pre-setup steps
@ -130,13 +93,32 @@ pipeline:
when: when:
matrix: matrix:
TESTS: php7.1 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: matrix:
include: include:
- TESTS: signed-off-check - TESTS: signed-off-check
- TESTS: check-app-compatbility - TESTS: check-app-compatbility
- TESTS: syntax-php5.6
- TESTS: syntax-php7.0 - TESTS: syntax-php7.0
- TESTS: php5.6
- TESTS: php7.0 - TESTS: php7.0
- TESTS: php7.1 - TESTS: php7.1
- TESTS: php7.2

View File

@ -5,7 +5,7 @@
<name>Data Request</name> <name>Data Request</name>
<summary>Request your data from the admins</summary> <summary>Request your data from the admins</summary>
<description><![CDATA[Enable your users to request an export or deletion of their data. According options are added to the personal settings section. Administrations will be notified by email about the request.]]></description> <description><![CDATA[Enable your users to request an export or deletion of their data. According options are added to the personal settings section. Administrations will be notified by email about the request.]]></description>
<version>1.0.1</version> <version>1.1.0</version>
<licence>agpl</licence> <licence>agpl</licence>
<author mail="blizzz@arthur-schiwon.de" homepage="https://nextcloud.com">Arthur Schiwon</author> <author mail="blizzz@arthur-schiwon.de" homepage="https://nextcloud.com">Arthur Schiwon</author>
<namespace>DataRequest</namespace> <namespace>DataRequest</namespace>
@ -15,7 +15,7 @@
<screenshot>https://raw.githubusercontent.com/nextcloud/data_request/master/screenshots/personal-settings.png</screenshot> <screenshot>https://raw.githubusercontent.com/nextcloud/data_request/master/screenshots/personal-settings.png</screenshot>
<screenshot>https://raw.githubusercontent.com/nextcloud/data_request/master/screenshots/settings-close-up.png</screenshot> <screenshot>https://raw.githubusercontent.com/nextcloud/data_request/master/screenshots/settings-close-up.png</screenshot>
<dependencies> <dependencies>
<nextcloud min-version="13" max-version="13"/> <nextcloud min-version="14" max-version="14"/>
</dependencies> </dependencies>
<settings> <settings>

View File

@ -38,10 +38,10 @@ class DataRequestController extends OCSController {
public function __construct( public function __construct(
$appName, $appName,
IRequest $request, IRequest $request,
Request $dataRequest,
$corsMethods = 'PUT, POST, GET, DELETE, PATCH', $corsMethods = 'PUT, POST, GET, DELETE, PATCH',
$corsAllowedHeaders = 'Authorization, Content-Type, Accept', $corsAllowedHeaders = 'Authorization, Content-Type, Accept',
$corsMaxAge = 1728000, $corsMaxAge = 1728000
Request $dataRequest
) { ) {
parent::__construct($appName, $request, $corsMethods, $corsAllowedHeaders, $corsMaxAge); parent::__construct($appName, $request, $corsMethods, $corsAllowedHeaders, $corsMaxAge);
$this->dataRequest = $dataRequest; $this->dataRequest = $dataRequest;

View File

@ -48,10 +48,10 @@ class DataRequestControllerTest extends \Test\TestCase {
$this->controller = new DataRequestController( $this->controller = new DataRequestController(
'data_request', 'data_request',
$request, $request,
$this->requestService,
'PUT, POST, GET, DELETE, PATCH', 'PUT, POST, GET, DELETE, PATCH',
'Authorization, Content-Type, Accept', 'Authorization, Content-Type, Accept',
1728000, 1728000
$this->requestService
); );
} }