-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
- Loading branch information
0 parents
commit e7db27f
Showing
16 changed files
with
14,693 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
"extends": "standard" | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
sudo: false | ||
dist: trusty | ||
language: php | ||
php: | ||
- 5.6 | ||
- 7 | ||
- 7.1 | ||
env: | ||
global: | ||
- CORE_BRANCH=stable13 | ||
matrix: | ||
- DB=pgsql | ||
|
||
matrix: | ||
allow_failures: | ||
- env: DB=pgsql CORE_BRANCH=master | ||
include: | ||
- php: 5.6 | ||
env: DB=sqlite | ||
- php: 5.6 | ||
env: DB=mysql | ||
- php: 5.6 | ||
env: DB=pgsql CORE_BRANCH=master | ||
fast_finish: true | ||
|
||
|
||
before_install: | ||
# enable a display for running JavaScript tests | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
- nvm install 8 | ||
- npm install -g npm@latest | ||
- make | ||
- make appstore | ||
# install core | ||
- cd ../ | ||
- git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b $CORE_BRANCH nextcloud | ||
- mv "$TRAVIS_BUILD_DIR" nextcloud/apps/vueexample | ||
|
||
before_script: | ||
- if [[ "$DB" == 'pgsql' ]]; then createuser -U travis -s oc_autotest; fi | ||
- if [[ "$DB" == 'mysql' ]]; then mysql -u root -e 'create database oc_autotest;'; fi | ||
- if [[ "$DB" == 'mysql' ]]; then mysql -u root -e "CREATE USER 'oc_autotest'@'localhost' IDENTIFIED BY '';"; fi | ||
- if [[ "$DB" == 'mysql' ]]; then mysql -u root -e "grant all on oc_autotest.* to 'oc_autotest'@'localhost';"; fi | ||
- cd nextcloud | ||
- 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 vueexample | ||
- php -S localhost:8080 & | ||
- cd apps/vueexample | ||
|
||
script: | ||
- make test | ||
|
||
after_failure: | ||
- cat ../../data/nextcloud.log | ||
|
||
addons: | ||
firefox: 'latest' | ||
mariadb: '10.1' | ||
|
||
services: | ||
- postgresql | ||
- mariadb |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
all: dev-setup lint build-js-production test | ||
|
||
# Dev env management | ||
dev-setup: clean clean-dev npm-init | ||
|
||
npm-init: | ||
npm install | ||
|
||
npm-update: | ||
npm update | ||
|
||
# Building | ||
build-js: | ||
npm run dev | ||
|
||
build-js-production: | ||
npm run build | ||
|
||
watch-js: | ||
npm run watch | ||
|
||
# Testing | ||
test: | ||
npm run test | ||
|
||
test-watch: | ||
npm run test:watch | ||
|
||
test-coverage: | ||
npm run test:coverage | ||
|
||
# Linting | ||
lint: | ||
npm run lint | ||
|
||
lint-fix: | ||
npm run lint:fix | ||
|
||
# Cleaning | ||
clean: | ||
rm -f js/vueexample.js | ||
rm -f js/vueexample.js.map | ||
|
||
clean-dev: | ||
rm -rf node_modules | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0"?> | ||
<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd"> | ||
<id>vueexample</id> | ||
<name>Vue example</name> | ||
<summary>test</summary> | ||
<description><![CDATA[test]]></description> | ||
<version>0.0.1</version> | ||
<licence>agpl</licence> | ||
<author mail="jus@bitgrid.net" >Julius Härtl</author> | ||
<namespace>VueExample</namespace> | ||
<category>tools</category> | ||
<bugs>https://github.com</bugs> | ||
<dependencies> | ||
<nextcloud min-version="13" max-version="14"/> | ||
</dependencies> | ||
<navigations> | ||
<navigation> | ||
<name>VueExample</name> | ||
<route>vueexample.page.index</route> | ||
</navigation> | ||
</navigations> | ||
</info> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
/** | ||
* Create your routes in here. The name is the lowercase name of the controller | ||
* without the controller part, the stuff after the hash is the method. | ||
* e.g. page#index -> OCA\MailTest\Controller\PageController->index() | ||
* | ||
* The controller class has to be registered in the application.php file since | ||
* it's instantiated in there | ||
*/ | ||
return [ | ||
'routes' => [ | ||
['name' => 'page#index', 'url' => '/', 'verb' => 'GET'], | ||
['name' => 'page#mail', 'url' => '/mail', 'verb' => 'GET'], | ||
] | ||
]; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
namespace OCA\VueExample\Controller; | ||
|
||
use OCP\AppFramework\Http\ContentSecurityPolicy; | ||
use OCP\IL10N; | ||
use OCP\IRequest; | ||
use OCP\AppFramework\Http\TemplateResponse; | ||
use OCP\AppFramework\Http\DataResponse; | ||
use OCP\AppFramework\Controller; | ||
use OCP\Mail\IEMailTemplate; | ||
use OCP\Mail\IMailer; | ||
|
||
class PageController extends Controller { | ||
private $userId; | ||
|
||
public function __construct($AppName, IRequest $request, $UserId, IL10N $l10n){ | ||
parent::__construct($AppName, $request); | ||
$this->userId = $UserId; | ||
$this->l10n = $l10n; | ||
} | ||
|
||
/** | ||
* @NoAdminRequired | ||
* @NoCSRFRequired | ||
*/ | ||
public function index() { | ||
$response = new TemplateResponse('vueexample', 'main'); | ||
return $response; | ||
} | ||
|
||
} |
Oops, something went wrong.