Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions app/Classes/Renderer/Entities/SnappyImageClient.php

This file was deleted.

88 changes: 0 additions & 88 deletions app/Classes/Renderer/Services/ImageService.php

This file was deleted.

39 changes: 0 additions & 39 deletions app/Classes/Renderer/Services/ImageServiceException.php

This file was deleted.

29 changes: 1 addition & 28 deletions app/Http/Controllers/WhatNow/InstructionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
use App\Classes\RcnApi\Exceptions\RcnApiResourceNotFoundException;
use App\Classes\RcnApi\RcnApiClient;
use App\Classes\RcnApi\Resources\WhatNowResource;
use App\Classes\Renderer\Entities\ImageFile;
use App\Classes\Renderer\Services\ImageService;
use App\Classes\Renderer\Services\ImageServiceException;
use App\Events\WhatNow\InstructionCreated;
use App\Events\WhatNow\InstructionDeleted;
use App\Events\WhatNow\InstructionTranslationCreated;
Expand All @@ -36,13 +33,9 @@ final class InstructionController extends ApiController
private $client;


private $image;


public function __construct(RcnApiClient $client, ImageService $image)
public function __construct(RcnApiClient $client)
{
$this->client = $client->whatnow();
$this->image = $image;
}


Expand Down Expand Up @@ -768,24 +761,4 @@ public function publishTranslations($countryCode, Request $request)
}
}

public function renderImage(Request $request, $instructionId, $translationCode, $stageRef)
{
try {
$revision = $request->query('revision') == 'true';
$image = $this->image->createFromArray([
'instructionId' => $instructionId,
'translationCode' => $translationCode,
'stageRef' => $stageRef,
'revision' => $revision
]);
} catch (ImageServiceException $e) {
return $this->respondWithNotFound($e, $e->getMessage());
}

$filename = $instructionId . '_' . $translationCode . '_' . $stageRef . '.jpg';
$imageFile = new ImageFile(config('whatnowimage.directory'), $filename);
$path = $this->image->render($image, $imageFile);

return response()->file($path);
}
}
28 changes: 0 additions & 28 deletions app/Providers/ImageClientServiceProvider.php

This file was deleted.

3 changes: 0 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,16 @@
"type": "project",
"require": {
"php": ">=7.0.0",
"aws/aws-sdk-php": "^3.216",
"darkaonline/l5-swagger": "5.8",
"fideloper/proxy": "~4.0",
"guzzlehttp/guzzle": "~6.0",
"guzzlehttp/promises": "^1.4.0",
"guzzlehttp/psr7": "^1.7.0",
"knplabs/knp-snappy-bundle": "^1.6",
"laravel/framework": "5.8.*",
"laravel/socialite": "^3.0",
"laravel/tinker": "~1.0",
"league/csv": "^9.8",
"maatwebsite/excel": "3.1",
"silvertipsoftware/wkhtmltoimage-amd64": "0.12.5",
"spatie/laravel-cors": "^1.0",
"symfony/polyfill-mbstring": "^1.17",
"tymon/jwt-auth": "^1.0.0-rc.1"
Expand Down
1 change: 0 additions & 1 deletion config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@


App\Classes\RcnApi\RcnApiServiceProvider::class,
App\Providers\ImageClientServiceProvider::class,
],


Expand Down
8 changes: 0 additions & 8 deletions config/filesystems.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@



'cloud' => env('FILESYSTEM_CLOUD', 's3'),



Expand All @@ -26,13 +25,6 @@
'visibility' => 'public',
],

's3' => [
'driver' => 's3',
'key' => env('AWS_KEY'),
'secret' => env('AWS_SECRET'),
'subnationals' => env('AWS_REGION'),
'bucket' => env('AWS_BUCKET'),
],

],

Expand Down
8 changes: 0 additions & 8 deletions config/queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@
'retry_after' => 90,
],

'sqs' => [
'driver' => 'sqs',
'key' => 'your-public-key',
'secret' => 'your-secret-key',
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
'queue' => 'your-queue-name',
'subnationals' => 'us-east-1',
],

'redis' => [
'driver' => 'redis',
Expand Down
20 changes: 0 additions & 20 deletions config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,6 @@



'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
],

'ses' => [
'key' => env('SES_KEY'),
'secret' => env('SES_SECRET'),
'subnationals' => env('SES_REGION','us-west-1')
],

'sparkpost' => [
'secret' => env('SPARKPOST_SECRET'),
],

'stripe' => [
'model' => \App\Models\Access\User\User::class,
'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
],

'github' => [
'client_id' => env('GITHUB_CLIENT_ID'),
Expand Down
6 changes: 0 additions & 6 deletions config/whatnowimage.php

This file was deleted.

4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"production": "mix --production",
"lint": "eslint resources/assets/js",
"transifex:push": "tx push -s",
"transifex:pull": "tx pull -a"
"lint": "eslint resources/assets/js"
},
"dependencies": {
"@fortawesome/fontawesome": "^1.0.0",
Expand Down
Loading
Loading