Move source code to sub folder so we can re-integrate ion
timw4mail/HummingBirdAnimeClient/pipeline/head There was a failure building this commit Details

This commit is contained in:
Timothy Warren 2020-03-11 22:11:00 -04:00
parent 5807c9dac3
commit 9924793a49
117 changed files with 27 additions and 14 deletions

View File

@ -4,11 +4,11 @@
"license": "MIT",
"autoload": {
"files": [
"src/constants.php",
"src/AnimeClient.php"
"src/AnimeClient/constants.php",
"src/AnimeClient/AnimeClient.php"
],
"psr-4": {
"Aviat\\AnimeClient\\": "src/"
"Aviat\\": "src/"
}
},
"autoload-dev": {

View File

@ -18,6 +18,7 @@ namespace Aviat\AnimeClient;
use function Amp\Promise\wait;
use Amp\Http\Client\Request;
use Amp\Http\Client\Response;
use Amp\Http\Client\HttpClient;
use Amp\Http\Client\HttpClientBuilder;
@ -180,8 +181,8 @@ function checkFolderPermissions(ConfigInterface $config): array
$publicDir = $config->get('asset_dir');
$pathMap = [
'app/config' => realpath(__DIR__ . '/../app/config'),
'app/logs' => realpath(__DIR__ . '/../app/logs'),
'app/config' => realpath(__DIR__ . '/../../app/config'),
'app/logs' => realpath(__DIR__ . '/../../app/logs'),
'public/images/avatars' => "{$publicDir}/images/avatars",
'public/images/anime' => "{$publicDir}/images/anime",
'public/images/characters' => "{$publicDir}/images/characters",
@ -229,13 +230,20 @@ function getApiClient ()
/**
* Simplify making a request with Http\Client
*
* @param $request
* @param string|Request $request
* @return Response
* @throws \Throwable
*/
function getResponse ($request): Response
{
$client = getApiClient();
if (is_string($request))
{
$request = new Request($request);
}
return wait($client->request($request));
}

View File

@ -68,7 +68,7 @@ abstract class BaseCommand extends Command {
*/
protected function setupContainer(): Container
{
$APP_DIR = realpath(__DIR__ . '/../../app');
$APP_DIR = realpath(__DIR__ . '/../../../app');
$APPCONF_DIR = realpath("{$APP_DIR}/appConf/");
$CONF_DIR = realpath("{$APP_DIR}/config/");
$baseConfig = require $APPCONF_DIR . '/base_config.php';

View File

@ -207,7 +207,7 @@ final class Settings {
return FALSE;
}
$savePath = realpath(_dir(__DIR__, '..', '..', 'app', 'config'));
$savePath = realpath(_dir(__DIR__, '..', '..', '..', 'app', 'config'));
$saveFile = _dir($savePath, 'admin-override.toml');
$saved = file_put_contents($saveFile, arrayToToml($settings));

Some files were not shown because too many files have changed in this diff Show More