diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5a77ab5 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,26 @@ +language: php + +php: + - 5.6 + - 7.0 + - 7.1 + +# This triggers builds to run on the new TravisCI infrastructure. +# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/ +sudo: false + +## Cache composer for faster builds +cache: + directories: + - $HOME/.composer/cache + +before_script: + - cd ./webservice + - cp .env.travis .env + - travis_retry composer self-update + - travis_retry composer update --no-interaction --prefer-dist + - php artisan key:gen + - php artisan jwt:secret -f + +script: + - vendor/bin/phpunit \ No newline at end of file diff --git a/webservice/.env.travis b/webservice/.env.travis new file mode 100644 index 0000000..7045f71 --- /dev/null +++ b/webservice/.env.travis @@ -0,0 +1,37 @@ +APP_ENV=local +APP_KEY= +APP_DEBUG=true +APP_LOG_LEVEL=debug +APP_URL=http://localhost + +# Please create database file: /database/database.sqlite +DB_CONNECTION=sqlite + +#DB_CONNECTION=mysql +#DB_HOST=127.0.0.1 +#DB_PORT=3306 +#DB_DATABASE=homestead +#DB_USERNAME=homestead +#DB_PASSWORD=secret + +BROADCAST_DRIVER=log +CACHE_DRIVER=file +SESSION_DRIVER=file +QUEUE_DRIVER=sync + +REDIS_HOST=127.0.0.1 +REDIS_PASSWORD=null +REDIS_PORT=6379 + +MAIL_DRIVER=smtp +MAIL_HOST=mailtrap.io +MAIL_PORT=2525 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_ENCRYPTION=null + +PUSHER_APP_ID= +PUSHER_KEY= +PUSHER_SECRET= + +JWT_SECRET= \ No newline at end of file diff --git a/webservice/app/Exceptions/Handler.php b/webservice/app/Exceptions/Handler.php index 380d58c..fea52f5 100644 --- a/webservice/app/Exceptions/Handler.php +++ b/webservice/app/Exceptions/Handler.php @@ -79,12 +79,12 @@ protected function handleExceptionJsonResponse($request, Exception $e) 'messages' => [$e->getMessage()], ]; - // If it's a HttpException the use the appropriate HTTP status code instead of 500 + // If it's a HttpException then use the appropriate HTTP status code instead of 500 if ($e instanceof HttpException) { $code = $e->getStatusCode(); } - // If the debugging is on then include in the exception trace in the body of the response + // If the debugging is on then include the exception trace in the body of the response if (config('app.debug')) { $body['trace'] = $e->getTrace(); }