Skip to content

Commit

Permalink
Merge 7680164 into 1e9cc03
Browse files Browse the repository at this point in the history
  • Loading branch information
zakhenry committed Dec 18, 2015
2 parents 1e9cc03 + 7680164 commit b7767ab
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 79 deletions.
2 changes: 1 addition & 1 deletion .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
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
6 changes: 3 additions & 3 deletions api/tests/integration/ArticleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ public function testPatchOne()
$entity = $this->getFactory($this->factoryClass)->create();

$this->withAuthorization()->patchJson($this->baseRoute.'/'.$entity->post_id, ['title' => 'foo']);
$this->shouldReturnJson();
$this->assertResponseHasNoContent();
$this->assertResponseStatus(204);
$class = $this->factoryClass;
$checkEntity = $class::find($entity->post_id);
Expand All @@ -333,7 +333,7 @@ public function testPatchOneNewPermalink()
$linksCount = $entity->permalinks->count();

$this->withAuthorization()->patchJson($this->baseRoute.'/'.$entity->post_id, $data);
$this->shouldReturnJson();
$this->assertResponseHasNoContent();
$this->assertResponseStatus(204);
$class = $this->factoryClass;
$checkEntity = $class::find($entity->post_id);
Expand Down Expand Up @@ -405,7 +405,7 @@ public function testPatchOneRemovePermalink()
->transformed();

$this->withAuthorization()->patchJson($this->baseRoute.'/'.$entity->post_id, $data);
$this->shouldReturnJson();
$this->assertResponseHasNoContent();
$this->assertResponseStatus(204);
$class = $this->factoryClass;
$checkEntity = $class::find($entity->post_id);
Expand Down
2 changes: 1 addition & 1 deletion api/tests/integration/ImageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function testPatchOne()
$entity->alt = 'foo';
$preparedEntity = $this->prepareEntity($entity);
$this->withAuthorization()->patchJson('/images/'.$id, $preparedEntity);
$this->shouldReturnJson();
$this->assertResponseHasNoContent();
$this->assertResponseStatus(204);
$checkEntity = Image::find($id);
$this->assertEquals($checkEntity->alt, $entity->alt);
Expand Down
2 changes: 1 addition & 1 deletion api/tests/integration/TagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function testPatchTag()

$this->withAuthorization()->patchJson('/tags/'.$tag['tagId'], $tag);

$this->shouldReturnJson();
$this->assertResponseHasNoContent();
$this->assertResponseStatus(204);
$checkEntity = Tag::find($tag['tagId']);
$this->assertEquals($checkEntity->tag, $tag['tag']);
Expand Down
4 changes: 1 addition & 3 deletions docker/common-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ web:
privileged: true

devtools:
# image: spira/docker-dev-tools:latest #built version of latest phantomjs (build often fails)
image: spira/docker-dev-tools:phantomjs-2.0.0 #static binary of phantomjs 2.0.0
# image: spira/docker-dev-tools:phantomjs-1.9.8 #static bindary of phantomjs 1.9.8
image: spira/docker-dev-tools:php-7.0
working_dir: /data
privileged: true
env_file:
Expand Down
12 changes: 8 additions & 4 deletions forum/composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "project",
"require": {
"vanilla/vanilla": "2.2-b1",
"vanilla/vanilla": "dev-master",
"vanilla/addons": "1.4.5",
"kasperisager/vanilla-api": "0.4.0"
},
Expand All @@ -14,9 +14,9 @@
"type": "package",
"package": {
"name": "vanilla/vanilla",
"version": "2.2-b1",
"version": "dev-master",
"dist": {
"url": "https://github.com/vanilla/vanilla/archive/Vanilla_2.2b1.zip",
"url": "https://github.com/vanilla/vanilla/archive/b8b3bc7a64850389bd57ee770a199d5874775686.zip",
"type": "zip"
}
}
Expand Down Expand Up @@ -84,7 +84,11 @@
},
"scripts": {
"build-forum": "Spira\\Build::buildForum",
"post-install-cmd": "Spira\\Build::postInstall",
"post-install-cmd": [
"Spira\\Build::postInstall",
"composer install --working-dir public",
"Spira\\Build::buildForum"
],
"post-update-cmd": ""
}
}

0 comments on commit b7767ab

Please sign in to comment.