mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-21 20:48:00 +01:00
Laravel 5.4
This commit is contained in:
parent
61ee103299
commit
0cc03b509b
19 changed files with 1109 additions and 1074 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,6 +1,7 @@
|
||||||
/vendor
|
/vendor
|
||||||
/node_modules
|
/node_modules
|
||||||
/public/build
|
/public/build
|
||||||
|
/public/hot
|
||||||
/logs
|
/logs
|
||||||
Homestead.yaml
|
Homestead.yaml
|
||||||
/public/storage
|
/public/storage
|
||||||
|
|
|
@ -74,7 +74,7 @@ class Handler extends ExceptionHandler
|
||||||
if ($request->expectsJson()) {
|
if ($request->expectsJson()) {
|
||||||
return response()->json(['error' => 'Unauthenticated.'], 401);
|
return response()->json(['error' => 'Unauthenticated.'], 401);
|
||||||
} else {
|
} else {
|
||||||
return redirect()->guest('login');
|
return redirect()->guest(route('login'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ class BroadcastServiceProvider extends ServiceProvider
|
||||||
/*
|
/*
|
||||||
* Authenticate the user's personal channel...
|
* Authenticate the user's personal channel...
|
||||||
*/
|
*/
|
||||||
Broadcast::channel('App.User.*', function ($user, $userId) {
|
Broadcast::channel('App.User.{userId}', function ($user, $userId) {
|
||||||
return (int) $user->id === (int) $userId;
|
return (int) $user->id === (int) $userId;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
|
|
||||||
namespace Poniverse\Ponyfm\Providers;
|
namespace Poniverse\Ponyfm\Providers;
|
||||||
|
|
||||||
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
|
|
||||||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
|
||||||
|
|
||||||
class EventServiceProvider extends ServiceProvider
|
class EventServiceProvider extends ServiceProvider
|
||||||
|
@ -31,7 +30,7 @@ class EventServiceProvider extends ServiceProvider
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $listen = [
|
protected $listen = [
|
||||||
'Poniverse\Ponyfm\Events\SomeEvent' => [
|
'Poniverse\Ponyfm\Events\Event' => [
|
||||||
'Poniverse\Ponyfm\Listeners\EventListener',
|
'Poniverse\Ponyfm\Listeners\EventListener',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
@ -15,20 +15,3 @@ define('LARAVEL_START', microtime(true));
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require __DIR__.'/../vendor/autoload.php';
|
require __DIR__.'/../vendor/autoload.php';
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Include The Compiled Class File
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| To dramatically increase your application's performance, you may use a
|
|
||||||
| compiled class file which contains all of the classes commonly used
|
|
||||||
| by a request. The Artisan "optimize" is used to create this file.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
$compiledPath = __DIR__.'/cache/compiled.php';
|
|
||||||
|
|
||||||
if (file_exists($compiledPath)) {
|
|
||||||
require $compiledPath;
|
|
||||||
}
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.0.1",
|
"php": ">=7.0.1",
|
||||||
"laravel/framework": "5.3.*",
|
"laravel/framework": "5.4.*",
|
||||||
"codescale/ffmpeg-php": "2.7.0",
|
"codescale/ffmpeg-php": "2.7.0",
|
||||||
"intouch/laravel-newrelic": "*",
|
"intouch/laravel-newrelic": "*",
|
||||||
"barryvdh/laravel-ide-helper": "^2.1",
|
"barryvdh/laravel-ide-helper": "^2.1",
|
||||||
|
@ -20,14 +20,15 @@
|
||||||
"venturecraft/revisionable": "^1.23",
|
"venturecraft/revisionable": "^1.23",
|
||||||
"pda/pheanstalk": "~3.0",
|
"pda/pheanstalk": "~3.0",
|
||||||
"cviebrock/laravel-elasticsearch": "^1.0",
|
"cviebrock/laravel-elasticsearch": "^1.0",
|
||||||
"barryvdh/laravel-debugbar": "^2.2",
|
"barryvdh/laravel-debugbar": "~2.4",
|
||||||
"predis/predis": "^1.0",
|
"predis/predis": "^1.0",
|
||||||
"ksubileau/color-thief-php": "^1.3",
|
"ksubileau/color-thief-php": "^1.3",
|
||||||
"graham-campbell/exceptions": "^9.1",
|
"graham-campbell/exceptions": "^9.1",
|
||||||
"minishlink/web-push": "^1.0",
|
"minishlink/web-push": "^1.0",
|
||||||
"alsofronie/eloquent-uuid": "^1.0",
|
"alsofronie/eloquent-uuid": "^1.0",
|
||||||
"poniverse/api": "dev-rewrite",
|
"poniverse/api": "dev-rewrite",
|
||||||
"barryvdh/laravel-cors": "^0.8.2"
|
"barryvdh/laravel-cors": "^0.8.2",
|
||||||
|
"laravel/tinker": "^1.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fzaninotto/faker": "~1.4",
|
"fzaninotto/faker": "~1.4",
|
||||||
|
@ -36,7 +37,9 @@
|
||||||
"phpspec/phpspec": "~2.1",
|
"phpspec/phpspec": "~2.1",
|
||||||
"filp/whoops": "^2.1",
|
"filp/whoops": "^2.1",
|
||||||
"symfony/dom-crawler": "~3.1",
|
"symfony/dom-crawler": "~3.1",
|
||||||
"symfony/css-selector": "~3.1"
|
"symfony/css-selector": "~3.1",
|
||||||
|
"laravel/browser-kit-testing": "1.*",
|
||||||
|
"nategood/httpful": "^0.2.20"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"classmap": [
|
"classmap": [
|
||||||
|
@ -50,9 +53,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"classmap": [
|
"psr-4": {
|
||||||
"tests/TestCase.php"
|
"Tests\\": "tests/"
|
||||||
]
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"post-install-cmd": [
|
"post-install-cmd": [
|
||||||
|
|
1888
composer.lock
generated
1888
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -12,7 +12,8 @@ return [
|
||||||
| any other location as required by the application or its packages.
|
| any other location as required by the application or its packages.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'name' => 'My Application',
|
'name' => env('APP_NAME', 'My Application'),
|
||||||
|
|
||||||
|
|
||||||
'env' => env('APP_ENV', 'production'),
|
'env' => env('APP_ENV', 'production'),
|
||||||
|
|
||||||
|
@ -164,6 +165,7 @@ return [
|
||||||
Poniverse\Ponyfm\Providers\AuthServiceProvider::class,
|
Poniverse\Ponyfm\Providers\AuthServiceProvider::class,
|
||||||
Poniverse\Ponyfm\Providers\NotificationServiceProvider::class,
|
Poniverse\Ponyfm\Providers\NotificationServiceProvider::class,
|
||||||
|
|
||||||
|
Laravel\Tinker\TinkerServiceProvider::class,
|
||||||
Intouch\LaravelNewrelic\NewrelicServiceProvider::class,
|
Intouch\LaravelNewrelic\NewrelicServiceProvider::class,
|
||||||
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
|
Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class,
|
||||||
Cviebrock\LaravelElasticsearch\ServiceProvider::class,
|
Cviebrock\LaravelElasticsearch\ServiceProvider::class,
|
||||||
|
|
|
@ -46,7 +46,7 @@ return [
|
||||||
|
|
||||||
'file' => [
|
'file' => [
|
||||||
'driver' => 'file',
|
'driver' => 'file',
|
||||||
'path' => storage_path('framework/cache'),
|
'path' => storage_path('framework/cache/data'),
|
||||||
],
|
],
|
||||||
|
|
||||||
'memcached' => [
|
'memcached' => [
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Additional Compiled Classes
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Here you may specify additional classes to include in the compiled file
|
|
||||||
| generated by the `artisan optimize` command. These should be classes
|
|
||||||
| that are included on basically every request into the application.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'files' => [
|
|
||||||
//
|
|
||||||
],
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Compiled File Providers
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Here you may list service providers which define a "compiles" function
|
|
||||||
| that returns additional files that should be compiled, providing an
|
|
||||||
| easy way to get common files from any packages you are utilizing.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'providers' => [
|
|
||||||
//
|
|
||||||
],
|
|
||||||
|
|
||||||
];
|
|
|
@ -2,19 +2,6 @@
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| PDO Fetch Style
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| By default, database results will be returned as instances of the PHP
|
|
||||||
| stdClass object; however, you may desire to retrieve records in an
|
|
||||||
| array format for simplicity. Here you can tweak the fetch style.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'fetch' => PDO::FETCH_CLASS,
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Default Database Connection Name
|
| Default Database Connection Name
|
||||||
|
@ -64,8 +51,9 @@ return [
|
||||||
'database' => env('DB_DATABASE', 'forge'),
|
'database' => env('DB_DATABASE', 'forge'),
|
||||||
'username' => env('DB_USERNAME', 'forge'),
|
'username' => env('DB_USERNAME', 'forge'),
|
||||||
'password' => env('DB_PASSWORD', ''),
|
'password' => env('DB_PASSWORD', ''),
|
||||||
'charset' => 'utf8',
|
'unix_socket' => env('DB_SOCKET', ''),
|
||||||
'collation' => 'utf8_unicode_ci',
|
'charset' => 'utf8mb4',
|
||||||
|
'collation' => 'utf8mb4_unicode_ci',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'strict' => false,
|
'strict' => false,
|
||||||
],
|
],
|
||||||
|
@ -119,13 +107,21 @@ return [
|
||||||
|
|
||||||
'redis' => [
|
'redis' => [
|
||||||
|
|
||||||
'cluster' => false,
|
'client' => 'predis',
|
||||||
|
|
||||||
'default' => [
|
'options' => [
|
||||||
'host' => env('REDIS_HOST', 'localhost'),
|
'cluster' => 'redis',
|
||||||
'password' => env('REDIS_PASSWORD', null),
|
],
|
||||||
'port' => env('REDIS_PORT', 6379),
|
|
||||||
'database' => 0,
|
'clusters' => [
|
||||||
|
'default' => [
|
||||||
|
[
|
||||||
|
'host' => env('REDIS_HOST', '127.0.0.1'),
|
||||||
|
'password' => env('REDIS_PASSWORD', null),
|
||||||
|
'port' => env('REDIS_PORT', 6379),
|
||||||
|
'database' => 0,
|
||||||
|
],
|
||||||
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
|
@ -12,7 +12,7 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'enabled' => null,
|
'enabled' => env('DEBUGBAR_ENABLED', null),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -27,10 +27,11 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
'storage' => [
|
'storage' => [
|
||||||
'enabled' => true,
|
'enabled' => true,
|
||||||
'driver' => 'redis', // redis, file, pdo
|
'driver' => 'file', // redis, file, pdo, custom
|
||||||
'path' => storage_path() . '/debugbar', // For file driver
|
'path' => storage_path('debugbar'), // For file driver
|
||||||
'connection' => null, // Leave null for default connection (Redis/PDO)
|
'connection' => null, // Leave null for default connection (Redis/PDO)
|
||||||
|
'provider' => '' // Instance of StorageInterface for custom driver
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -57,9 +58,22 @@ return [
|
||||||
| The Debugbar can capture Ajax requests and display them. If you don't want this (ie. because of errors),
|
| The Debugbar can capture Ajax requests and display them. If you don't want this (ie. because of errors),
|
||||||
| you can use this option to disable sending the data through the headers.
|
| you can use this option to disable sending the data through the headers.
|
||||||
|
|
|
|
||||||
|
| Optionally, you can also send ServerTiming headers on ajax requests for the Chrome DevTools.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'capture_ajax' => true,
|
'capture_ajax' => true,
|
||||||
|
'add_ajax_timing' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Custom Error Handler for Deprecated warnings
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When enabled, the Debugbar shows deprecated warnings for Symfony components
|
||||||
|
| in the Messages tab.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
'error_handler' => false,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -91,17 +105,18 @@ return [
|
||||||
'db' => true, // Show database (PDO) queries and bindings
|
'db' => true, // Show database (PDO) queries and bindings
|
||||||
'views' => true, // Views with their data
|
'views' => true, // Views with their data
|
||||||
'route' => true, // Current route information
|
'route' => true, // Current route information
|
||||||
|
'auth' => true, // Display Laravel authentication status
|
||||||
|
'gate' => true, // Display Laravel Gate checks
|
||||||
|
'session' => true, // Display session data
|
||||||
|
'symfony_request' => true, // Only one can be enabled..
|
||||||
|
'mail' => true, // Catch mail messages
|
||||||
'laravel' => false, // Laravel version and environment
|
'laravel' => false, // Laravel version and environment
|
||||||
'events' => false, // All events fired
|
'events' => false, // All events fired
|
||||||
'default_request' => false, // Regular or special Symfony request logger
|
'default_request' => false, // Regular or special Symfony request logger
|
||||||
'symfony_request' => true, // Only one can be enabled..
|
|
||||||
'mail' => true, // Catch mail messages
|
|
||||||
'logs' => false, // Add the latest log messages
|
'logs' => false, // Add the latest log messages
|
||||||
'files' => false, // Show the included files
|
'files' => false, // Show the included files
|
||||||
'config' => false, // Display config settings
|
'config' => false, // Display config settings
|
||||||
'auth' => false, // Display Laravel authentication status
|
'cache' => false, // Display cache events
|
||||||
'gate' => false, // Display Laravel Gate checks
|
|
||||||
'session' => true, // Display session data
|
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -119,11 +134,11 @@ return [
|
||||||
],
|
],
|
||||||
'db' => [
|
'db' => [
|
||||||
'with_params' => true, // Render SQL with the parameters substituted
|
'with_params' => true, // Render SQL with the parameters substituted
|
||||||
|
'backtrace' => true, // Use a backtrace to find the origin of the query in your files.
|
||||||
'timeline' => false, // Add the queries to the timeline
|
'timeline' => false, // Add the queries to the timeline
|
||||||
'backtrace' => false, // EXPERIMENTAL: Use a backtrace to find the origin of the query in your files.
|
'explain' => [ // Show EXPLAIN output on queries
|
||||||
'explain' => [ // EXPERIMENTAL: Show EXPLAIN output on queries
|
|
||||||
'enabled' => false,
|
'enabled' => false,
|
||||||
'types' => ['SELECT'], // array('SELECT', 'INSERT', 'UPDATE', 'DELETE'); for MySQL 5.6.3+
|
'types' => ['SELECT'], // ['SELECT', 'INSERT', 'UPDATE', 'DELETE']; for MySQL 5.6.3+
|
||||||
],
|
],
|
||||||
'hints' => true, // Show hints for common mistakes
|
'hints' => true, // Show hints for common mistakes
|
||||||
],
|
],
|
||||||
|
@ -139,6 +154,9 @@ return [
|
||||||
'logs' => [
|
'logs' => [
|
||||||
'file' => null
|
'file' => null
|
||||||
],
|
],
|
||||||
|
'cache' => [
|
||||||
|
'values' => true // collect cache values
|
||||||
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -146,7 +164,7 @@ return [
|
||||||
| Inject Debugbar in Response
|
| Inject Debugbar in Response
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Usually, the debugbar is added just before <body>, by listening to the
|
| Usually, the debugbar is added just before </body>, by listening to the
|
||||||
| Response after the App is done. If you disable this, you have to add them
|
| Response after the App is done. If you disable this, you have to add them
|
||||||
| in your template yourself. See http://phpdebugbar.com/docs/rendering.html
|
| in your template yourself. See http://phpdebugbar.com/docs/rendering.html
|
||||||
|
|
|
|
||||||
|
@ -166,4 +184,13 @@ return [
|
||||||
*/
|
*/
|
||||||
'route_prefix' => '_debugbar',
|
'route_prefix' => '_debugbar',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| DebugBar route domain
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By default DebugBar route served from the same domain that request served.
|
||||||
|
| To override default domain, specify it as a non-empty value.
|
||||||
|
*/
|
||||||
|
'route_domain' => null,
|
||||||
];
|
];
|
||||||
|
|
|
@ -8,10 +8,8 @@ return [
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Here you may specify the default filesystem disk that should be used
|
| Here you may specify the default filesystem disk that should be used
|
||||||
| by the framework. A "local" driver, as well as a variety of cloud
|
| by the framework. The "local" disk, as well as a variety of cloud
|
||||||
| based drivers are available for your choosing. Just store away!
|
| based disks are available to your application. Just store away!
|
||||||
|
|
|
||||||
| Supported: "local", "ftp", "s3", "rackspace"
|
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -39,6 +37,8 @@ return [
|
||||||
| may even configure multiple disks of the same driver. Defaults have
|
| may even configure multiple disks of the same driver. Defaults have
|
||||||
| been setup for each driver as an example of the required options.
|
| been setup for each driver as an example of the required options.
|
||||||
|
|
|
|
||||||
|
| Supported Drivers: "local", "ftp", "s3", "rackspace"
|
||||||
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'disks' => [
|
'disks' => [
|
||||||
|
@ -53,36 +53,19 @@ return [
|
||||||
'root' => storage_path('app').'/test-files',
|
'root' => storage_path('app').'/test-files',
|
||||||
],
|
],
|
||||||
|
|
||||||
'ftp' => [
|
'public' => [
|
||||||
'driver' => 'ftp',
|
'driver' => 'local',
|
||||||
'host' => 'ftp.example.com',
|
'root' => storage_path('app/public'),
|
||||||
'username' => 'your-username',
|
'url' => env('APP_URL').'/storage',
|
||||||
'password' => 'your-password',
|
'visibility' => 'public',
|
||||||
|
|
||||||
// Optional FTP Settings...
|
|
||||||
// 'port' => 21,
|
|
||||||
// 'root' => '',
|
|
||||||
// 'passive' => true,
|
|
||||||
// 'ssl' => true,
|
|
||||||
// 'timeout' => 30,
|
|
||||||
],
|
],
|
||||||
|
|
||||||
's3' => [
|
's3' => [
|
||||||
'driver' => 's3',
|
'driver' => 's3',
|
||||||
'key' => 'your-key',
|
'key' => env('AWS_KEY'),
|
||||||
'secret' => 'your-secret',
|
'secret' => env('AWS_SECRET'),
|
||||||
'region' => 'your-region',
|
'region' => env('AWS_REGION'),
|
||||||
'bucket' => 'your-bucket',
|
'bucket' => env('AWS_BUCKET'),
|
||||||
],
|
|
||||||
|
|
||||||
'rackspace' => [
|
|
||||||
'driver' => 'rackspace',
|
|
||||||
'username' => 'your-username',
|
|
||||||
'key' => 'your-key',
|
|
||||||
'container' => 'your-container',
|
|
||||||
'endpoint' => 'https://identity.api.rackspacecloud.com/v2.0/',
|
|
||||||
'region' => 'IAD',
|
|
||||||
'url_type' => 'publicURL',
|
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
|
@ -11,7 +11,8 @@ return [
|
||||||
| sending of e-mail. You may specify which one you're using throughout
|
| sending of e-mail. You may specify which one you're using throughout
|
||||||
| your application here. By default, Laravel is setup for SMTP mail.
|
| your application here. By default, Laravel is setup for SMTP mail.
|
||||||
|
|
|
|
||||||
| Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill", "ses", "log"
|
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
|
||||||
|
| "sparkpost", "log", "array"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -54,7 +55,10 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'from' => ['address' => 'hello@pony.fm', 'name' => 'Pony.fm'],
|
'from' => [
|
||||||
|
'address' => env('MAIL_FROM_ADDRESS', 'hello@pony.fm'),
|
||||||
|
'name' => env('MAIL_FROM_NAME', 'Pony.fm'),
|
||||||
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -82,17 +86,6 @@ return [
|
||||||
|
|
||||||
'username' => env('MAIL_USERNAME'),
|
'username' => env('MAIL_USERNAME'),
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| SMTP Server Password
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Here you may set the password required by your SMTP server to send out
|
|
||||||
| messages from your application. This will be given to the server on
|
|
||||||
| connection so that the application will be able to send messages.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'password' => env('MAIL_PASSWORD'),
|
'password' => env('MAIL_PASSWORD'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -108,5 +101,23 @@ return [
|
||||||
|
|
||||||
'sendmail' => '/usr/sbin/sendmail -bs',
|
'sendmail' => '/usr/sbin/sendmail -bs',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Markdown Mail Settings
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If you are using Markdown based email rendering, you may configure your
|
||||||
|
| theme and component paths here, allowing you to customize the design
|
||||||
|
| of the emails. Or, you may simply stick with the Laravel defaults!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'markdown' => [
|
||||||
|
'theme' => 'default',
|
||||||
|
|
||||||
|
'paths' => [
|
||||||
|
resource_path('views/vendor/mail'),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -14,7 +14,7 @@ return [
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'paths' => [
|
'paths' => [
|
||||||
realpath(base_path('resources/views')),
|
resource_path('views'),
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* Laravel - A PHP Framework For Web Artisans
|
* Laravel - A PHP Framework For Web Artisans
|
||||||
*
|
*
|
||||||
* @package Laravel
|
* @package Laravel
|
||||||
* @author Taylor Otwell <taylorotwell@gmail.com>
|
* @author Taylor Otwell <taylor@laravel.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
| Composer provides a convenient, automatically generated class loader for
|
| Composer provides a convenient, automatically generated class loader for
|
||||||
| our application. We just need to utilize it! We'll simply require it
|
| our application. We just need to utilize it! We'll simply require it
|
||||||
| into the script here so that we don't have to worry about manual
|
| into the script here so that we don't have to worry about manual
|
||||||
| loading any of our classes later on. It feels nice to relax.
|
| loading any of our classes later on. It feels great to relax.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace Tests;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pony.fm - A community for pony fan music.
|
* Pony.fm - A community for pony fan music.
|
||||||
* Copyright (C) 2015 Peter Deltchev
|
* Copyright (C) 2015 Peter Deltchev
|
||||||
|
@ -40,7 +42,7 @@ class ApiAuthTest extends TestCase
|
||||||
$accessTokenInfo->setIsActive(true);
|
$accessTokenInfo->setIsActive(true);
|
||||||
$accessTokenInfo->setScopes(['basic', 'ponyfm:tracks:upload']);
|
$accessTokenInfo->setScopes(['basic', 'ponyfm:tracks:upload']);
|
||||||
|
|
||||||
$poniverse = Mockery::mock('overload:Poniverse\Lib\OAuth2\PoniverseProvider');
|
$poniverse = \Mockery::mock('overload:Poniverse\Lib\OAuth2\PoniverseProvider');
|
||||||
$poniverse->shouldReceive('getResourceOwner')
|
$poniverse->shouldReceive('getResourceOwner')
|
||||||
->andReturn(new \Poniverse\Lib\Entity\Poniverse\User([
|
->andReturn(new \Poniverse\Lib\Entity\Poniverse\User([
|
||||||
'id' => $user->id,
|
'id' => $user->id,
|
||||||
|
@ -50,7 +52,7 @@ class ApiAuthTest extends TestCase
|
||||||
]));
|
]));
|
||||||
$poniverse->shouldReceive('setAccessToken');
|
$poniverse->shouldReceive('setAccessToken');
|
||||||
|
|
||||||
$accessTokenService = Mockery::mock('overload:Poniverse\Lib\Service\Poniverse\Meta');
|
$accessTokenService = \Mockery::mock('overload:Poniverse\Lib\Service\Poniverse\Meta');
|
||||||
$accessTokenService->shouldReceive('introspect')
|
$accessTokenService->shouldReceive('introspect')
|
||||||
->andReturn($accessTokenInfo);
|
->andReturn($accessTokenInfo);
|
||||||
|
|
||||||
|
@ -68,7 +70,7 @@ class ApiAuthTest extends TestCase
|
||||||
$accessTokenInfo->setClientId('Unicorns and rainbows');
|
$accessTokenInfo->setClientId('Unicorns and rainbows');
|
||||||
$accessTokenInfo->setScopes(['basic', 'ponyfm:tracks:upload']);
|
$accessTokenInfo->setScopes(['basic', 'ponyfm:tracks:upload']);
|
||||||
|
|
||||||
$poniverse = Mockery::mock('overload:Poniverse\Lib\OAuth2\PoniverseProvider');
|
$poniverse = \Mockery::mock('overload:Poniverse\Lib\OAuth2\PoniverseProvider');
|
||||||
$poniverse->shouldReceive('getResourceOwner')
|
$poniverse->shouldReceive('getResourceOwner')
|
||||||
->andReturn(new \Poniverse\Lib\Entity\Poniverse\User([
|
->andReturn(new \Poniverse\Lib\Entity\Poniverse\User([
|
||||||
'id' => $user->id,
|
'id' => $user->id,
|
||||||
|
@ -78,7 +80,7 @@ class ApiAuthTest extends TestCase
|
||||||
]));
|
]));
|
||||||
$poniverse->shouldReceive('setAccessToken');
|
$poniverse->shouldReceive('setAccessToken');
|
||||||
|
|
||||||
$accessTokenService = Mockery::mock('overload:Poniverse\Lib\Service\Poniverse\Meta');
|
$accessTokenService = \Mockery::mock('overload:Poniverse\Lib\Service\Poniverse\Meta');
|
||||||
$accessTokenService
|
$accessTokenService
|
||||||
->shouldReceive('introspect')
|
->shouldReceive('introspect')
|
||||||
->andReturn($accessTokenInfo);
|
->andReturn($accessTokenInfo);
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace Tests;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pony.fm - A community for pony fan music.
|
* Pony.fm - A community for pony fan music.
|
||||||
* Copyright (C) 2015-2017 Peter Deltchev
|
* Copyright (C) 2015-2017 Peter Deltchev
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
namespace Tests;
|
||||||
|
|
||||||
|
use Illuminate\Contracts\Console\Kernel;
|
||||||
|
use Laravel\BrowserKitTesting\TestCase as BaseTestCase;
|
||||||
use Poniverse\Ponyfm\Models\User;
|
use Poniverse\Ponyfm\Models\User;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -19,7 +24,7 @@ use Poniverse\Ponyfm\Models\User;
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class TestCase extends Illuminate\Foundation\Testing\TestCase
|
class TestCase extends BaseTestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The base URL to use while testing the application.
|
* The base URL to use while testing the application.
|
||||||
|
@ -46,7 +51,7 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||||
{
|
{
|
||||||
$app = require __DIR__.'/../bootstrap/app.php';
|
$app = require __DIR__.'/../bootstrap/app.php';
|
||||||
|
|
||||||
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
$app->make(Kernel::class)->bootstrap();
|
||||||
|
|
||||||
return $app;
|
return $app;
|
||||||
}
|
}
|
||||||
|
@ -58,8 +63,8 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||||
{
|
{
|
||||||
// Ensure we have the Pony.fm test files
|
// Ensure we have the Pony.fm test files
|
||||||
if (!static::$initializedFiles) {
|
if (!static::$initializedFiles) {
|
||||||
Storage::disk('local')->makeDirectory('test-files');
|
\Storage::disk('local')->makeDirectory('test-files');
|
||||||
$storage = Storage::disk('testing');
|
$storage = \Storage::disk('testing');
|
||||||
|
|
||||||
// To add new test files, upload them to poniverse.net/files
|
// To add new test files, upload them to poniverse.net/files
|
||||||
// and add them here with their last-modified date as a Unix
|
// and add them here with their last-modified date as a Unix
|
||||||
|
@ -102,7 +107,7 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown()
|
||||||
{
|
{
|
||||||
Storage::disk('local')->deleteDirectory('testing-datastore');
|
\Storage::disk('local')->deleteDirectory('testing-datastore');
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,8 +125,8 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||||
*/
|
*/
|
||||||
public function getTestFileForUpload($filename)
|
public function getTestFileForUpload($filename)
|
||||||
{
|
{
|
||||||
Storage::disk('local')->makeDirectory('testing-datastore/tmp');
|
\Storage::disk('local')->makeDirectory('testing-datastore/tmp');
|
||||||
Storage::disk('local')->copy("test-files/${filename}", "testing-datastore/tmp/${filename}");
|
\Storage::disk('local')->copy("test-files/${filename}", "testing-datastore/tmp/${filename}");
|
||||||
|
|
||||||
return new \Illuminate\Http\UploadedFile(storage_path("app/testing-datastore/tmp/${filename}"), $filename, null, null, null, true);
|
return new \Illuminate\Http\UploadedFile(storage_path("app/testing-datastore/tmp/${filename}"), $filename, null, null, null, true);
|
||||||
}
|
}
|
||||||
|
@ -135,8 +140,8 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||||
protected function callUploadWithParameters(array $parameters, array $files = [])
|
protected function callUploadWithParameters(array $parameters, array $files = [])
|
||||||
{
|
{
|
||||||
$this->expectsJobs([
|
$this->expectsJobs([
|
||||||
Poniverse\Ponyfm\Jobs\EncodeTrackFile::class,
|
\Poniverse\Ponyfm\Jobs\EncodeTrackFile::class,
|
||||||
Poniverse\Ponyfm\Jobs\UpdateSearchIndexForEntity::class
|
\Poniverse\Ponyfm\Jobs\UpdateSearchIndexForEntity::class
|
||||||
]);
|
]);
|
||||||
$this->user = factory(User::class)->create();
|
$this->user = factory(User::class)->create();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue