Skip to content

Commit

Permalink
Merge b97584e into 1e9cc03
Browse files Browse the repository at this point in the history
  • Loading branch information
zakhenry committed Dec 20, 2015
2 parents 1e9cc03 + b97584e commit 2215181
Show file tree
Hide file tree
Showing 14 changed files with 223 additions and 154 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: php
php:
- 5.6
- 7.0

addons:
postgresql: "9.3"
Expand Down Expand Up @@ -64,7 +64,7 @@ before_script:

script:
- gulp test:app
- php ./api/vendor/bin/phpunit --colors --configuration ./api/phpunit.xml --coverage-clover=./reports/coverage/api/clover.xml
- ./api/vendor/bin/phpunit --colors --configuration ./api/phpunit.xml --coverage-clover=./reports/coverage/api/clover.xml
- ./node_modules/.bin/cucumber.js --tags ~@ignore #skip @ignored features

after_script:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Lumen + AngularJS project seed with Docker

## Technologies integrated in this seed project
* [Lumen](http://lumen.laravel.com/)
* [HHVM](http://hhvm.com/)
* [PHP7](http://php.net/)
* [Xdebug](http://xdebug.org/)
* [AngularJS](https://angularjs.org/) (1.x)
* [Docker](https://www.docker.com/)
Expand Down
14 changes: 10 additions & 4 deletions api/app/Console/Commands/GenerateKeysCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,21 @@ public function __construct(Filesystem $file)
*/
public function handle()
{
$rsa = new \Crypt_RSA();
$keys = $rsa->createKey();
$res = openssl_pkey_new();

// Get private key
openssl_pkey_export($res, $privateKey);

// Get public key
$publicKey = openssl_pkey_get_details($res);
$publicKey = $publicKey['key'];

if (! $this->file->exists(storage_path('app/keys'))) {
$this->file->makeDirectory(storage_path('app/keys'));
}

$this->file->put(storage_path('app/keys/private.pem'), $keys['privatekey']);
$this->file->put(storage_path('app/keys/public.pem'), $keys['publickey']);
$this->file->put(storage_path('app/keys/private.pem'), $privateKey);
$this->file->put(storage_path('app/keys/public.pem'), $publicKey);

return 0;
}
Expand Down
31 changes: 0 additions & 31 deletions api/app/SpiraApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,6 @@

class SpiraApplication extends Application
{
/**
* Set the error handling for the application.
*
* @return void
*/
protected function registerErrorHandling()
{
parent::registerErrorHandling();

// Don't display additional errors on top of the exception being rendered
// @codeCoverageIgnoreStart
ini_set('display_errors', 0);
if ('cli' !== php_sapi_name() && (! ini_get('log_errors') || ini_get('error_log'))) {
// CLI - display errors only if they're not already logged to STDERR
ini_set('display_errors', 1);
}
// @codeCoverageIgnoreEnd
}

/**
* Get the Monolog handler for the application.
Expand All @@ -50,19 +32,6 @@ protected function getMonologHandler()
// @codeCoverageIgnoreEnd
}

/**
* @codeCoverageIgnore
* Determine if the error type is fatal.
*
* @param int $type
* @return bool
*/
protected function isFatalError($type)
{
// *** Add type 16777217 that HVVM returns for fatal
return in_array($type, [16777217, E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE]);
}

/**
* Lumen has so much magic in DI container
* The only way to override default drivers, Guard and so on
Expand Down
2 changes: 1 addition & 1 deletion api/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"namshi/jose": "^6.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0",
"phpunit/phpunit": "~5.1",
"mockery/mockery": "^0.9.4",
"fzaninotto/faker": "^1.4",
"barryvdh/laravel-ide-helper": "dev-master"
Expand Down
Loading

0 comments on commit 2215181

Please sign in to comment.