From 852f1ac88cbc53833aec171ee83a4b0f61b0faef Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 16 Feb 2019 20:08:28 +0900 Subject: [PATCH 01/52] =?UTF-8?q?Bootstrap4=E7=94=A8=E3=81=AE=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=83=8D=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3?= =?UTF-8?q?=E3=83=86=E3=83=B3=E3=83=97=E3=83=AC=E3=83=BC=E3=83=88=E3=82=92?= =?UTF-8?q?publish?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/vendor/pagination/default.blade.php | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 resources/views/vendor/pagination/default.blade.php diff --git a/resources/views/vendor/pagination/default.blade.php b/resources/views/vendor/pagination/default.blade.php new file mode 100644 index 0000000..3f98455 --- /dev/null +++ b/resources/views/vendor/pagination/default.blade.php @@ -0,0 +1,36 @@ +@if ($paginator->hasPages()) + +@endif From 72e9d4e3e878eb0ffdf289af66e6d9af77bb26e9 Mon Sep 17 00:00:00 2001 From: shibafu Date: Sat, 16 Feb 2019 20:50:22 +0900 Subject: [PATCH 02/52] =?UTF-8?q?=E3=82=B9=E3=83=9E=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=83=95=E3=82=A9=E3=83=B3=E5=90=91=E3=81=91=E3=81=AE=E7=B0=A1?= =?UTF-8?q?=E6=98=93=E3=81=AA=E3=83=9A=E3=83=BC=E3=82=B8=E3=83=A3=E3=83=BC?= =?UTF-8?q?=E3=82=92=E7=94=A8=E6=84=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/user/profile.blade.php | 18 +----------------- .../views/vendor/pagination/default.blade.php | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/resources/views/user/profile.blade.php b/resources/views/user/profile.blade.php index 4e442ca..51c59ae 100644 --- a/resources/views/user/profile.blade.php +++ b/resources/views/user/profile.blade.php @@ -87,23 +87,7 @@ @endforelse - + {{ $ejaculations->links(null, ['className' => 'mt-4 justify-content-center']) }} @endif @component('components.modal', ['id' => 'deleteCheckinModal']) diff --git a/resources/views/vendor/pagination/default.blade.php b/resources/views/vendor/pagination/default.blade.php index 3f98455..f661f12 100644 --- a/resources/views/vendor/pagination/default.blade.php +++ b/resources/views/vendor/pagination/default.blade.php @@ -1,5 +1,6 @@ @if ($paginator->hasPages()) - - + {{ $results->links(null, ['className' => 'mt-4 justify-content-center']) }} @endif @endsection From 35789befc533f06b80e890327faf47b8c05a3005 Mon Sep 17 00:00:00 2001 From: Eai Date: Sun, 17 Feb 2019 00:24:25 +0900 Subject: [PATCH 06/52] =?UTF-8?q?page=E3=81=8C=E5=8F=8D=E6=98=A0=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=81=A6=E3=81=84=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3=20(#98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/MetadataResolver/PixivResolver.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/MetadataResolver/PixivResolver.php b/app/MetadataResolver/PixivResolver.php index 16c89d9..851a317 100644 --- a/app/MetadataResolver/PixivResolver.php +++ b/app/MetadataResolver/PixivResolver.php @@ -36,6 +36,7 @@ class PixivResolver implements Resolver { parse_str(parse_url($url, PHP_URL_QUERY), $params); $illustId = $params['illust_id']; + $page = 0; // 漫画ページ(ページ数はmanga_bigならあるかも) if ($params['mode'] === 'manga_big' || $params['mode'] === 'manga') { @@ -54,6 +55,10 @@ class PixivResolver implements Resolver preg_match("~https://i\.pximg\.net/c/128x128/img-master/img/\d{4}/\d{2}/\d{2}/\d{2}/\d{2}/\d{2}/{$illustId}(_p0)?_square1200\.jpg~", $res->getBody(), $match); $illustThumbnailUrl = $match[0]; + if ($page != 0) { + $illustThumbnailUrl = str_replace('_p0', '_p'.$page, $illustThumbnailUrl); + } + $illustUrl = $this->thumbnailToMasterUrl($illustThumbnailUrl); $metadata->image = $this->proxize($illustUrl); From 4196b1a02d16189cb1abfbe1c513f84b8de5962c Mon Sep 17 00:00:00 2001 From: hina Date: Sun, 17 Feb 2019 02:51:27 +0900 Subject: [PATCH 07/52] Add `barryvdh/laravel-ide-helper` --- composer.json | 1 + composer.lock | 485 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 483 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index be2f2b5..27bdca3 100644 --- a/composer.json +++ b/composer.json @@ -16,6 +16,7 @@ }, "require-dev": { "barryvdh/laravel-debugbar": "^3.1", + "barryvdh/laravel-ide-helper": "^2.5", "filp/whoops": "~2.0", "friendsofphp/php-cs-fixer": "^2.14", "fzaninotto/faker": "~1.4", diff --git a/composer.lock b/composer.lock index 0e3e49e..6766e6b 100644 --- a/composer.lock +++ b/composer.lock @@ -1,10 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9a0efd1b396f7a748eee3b98cbd7b6a6", + "content-hash": "79423bebbfa31e28aab2d06ba7e19828", "packages": [ { "name": "anhskohbo/no-captcha", @@ -3045,6 +3045,265 @@ ], "time": "2018-11-09T08:37:55+00:00" }, + { + "name": "barryvdh/laravel-ide-helper", + "version": "v2.5.3", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-ide-helper.git", + "reference": "3d7f1240896a075aa23b13f82dfcbe165dadeef2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/3d7f1240896a075aa23b13f82dfcbe165dadeef2", + "reference": "3d7f1240896a075aa23b13f82dfcbe165dadeef2", + "shasum": "" + }, + "require": { + "barryvdh/reflection-docblock": "^2.0.6", + "composer/composer": "^1.6", + "illuminate/console": "^5.5,<5.8", + "illuminate/filesystem": "^5.5,<5.8", + "illuminate/support": "^5.5,<5.8", + "php": ">=7" + }, + "require-dev": { + "doctrine/dbal": "~2.3", + "illuminate/config": "^5.1,<5.8", + "illuminate/view": "^5.1,<5.8", + "phpro/grumphp": "^0.14", + "phpunit/phpunit": "4.*", + "scrutinizer/ocular": "~1.1", + "squizlabs/php_codesniffer": "^3" + }, + "suggest": { + "doctrine/dbal": "Load information from the database about models for phpdocs (~2.3)" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\LaravelIdeHelper\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.", + "keywords": [ + "autocomplete", + "codeintel", + "helper", + "ide", + "laravel", + "netbeans", + "phpdoc", + "phpstorm", + "sublime" + ], + "time": "2018-12-19T12:12:05+00:00" + }, + { + "name": "barryvdh/reflection-docblock", + "version": "v2.0.6", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/ReflectionDocBlock.git", + "reference": "6b69015d83d3daf9004a71a89f26e27d27ef6a16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/ReflectionDocBlock/zipball/6b69015d83d3daf9004a71a89f26e27d27ef6a16", + "reference": "6b69015d83d3daf9004a71a89f26e27d27ef6a16", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0,<4.5" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Barryvdh": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "time": "2018-12-13T10:34:14+00:00" + }, + { + "name": "composer/ca-bundle", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/composer/ca-bundle.git", + "reference": "558f321c52faeb4828c03e7dc0cfe39a09e09a2d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/558f321c52faeb4828c03e7dc0cfe39a09e09a2d", + "reference": "558f321c52faeb4828c03e7dc0cfe39a09e09a2d", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^5.3.2 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5", + "psr/log": "^1.0", + "symfony/process": "^2.5 || ^3.0 || ^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], + "time": "2019-01-28T09:30:10+00:00" + }, + { + "name": "composer/composer", + "version": "1.8.4", + "source": { + "type": "git", + "url": "https://github.com/composer/composer.git", + "reference": "bc364c2480c17941e2135cfc568fa41794392534" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/composer/zipball/bc364c2480c17941e2135cfc568fa41794392534", + "reference": "bc364c2480c17941e2135cfc568fa41794392534", + "shasum": "" + }, + "require": { + "composer/ca-bundle": "^1.0", + "composer/semver": "^1.0", + "composer/spdx-licenses": "^1.2", + "composer/xdebug-handler": "^1.1", + "justinrainbow/json-schema": "^3.0 || ^4.0 || ^5.0", + "php": "^5.3.2 || ^7.0", + "psr/log": "^1.0", + "seld/jsonlint": "^1.4", + "seld/phar-utils": "^1.0", + "symfony/console": "^2.7 || ^3.0 || ^4.0", + "symfony/filesystem": "^2.7 || ^3.0 || ^4.0", + "symfony/finder": "^2.7 || ^3.0 || ^4.0", + "symfony/process": "^2.7 || ^3.0 || ^4.0" + }, + "conflict": { + "symfony/console": "2.8.38" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7", + "phpunit/phpunit-mock-objects": "^2.3 || ^3.0" + }, + "suggest": { + "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", + "ext-zip": "Enabling the zip extension allows you to unzip archives", + "ext-zlib": "Allow gzip compression of HTTP requests" + }, + "bin": [ + "bin/composer" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\": "src/Composer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Composer helps you declare, manage and install dependencies of PHP projects, ensuring you have the right stack everywhere.", + "homepage": "https://getcomposer.org/", + "keywords": [ + "autoload", + "dependency", + "package" + ], + "time": "2019-02-11T09:52:10+00:00" + }, { "name": "composer/semver", "version": "1.4.2", @@ -3107,6 +3366,67 @@ ], "time": "2016-08-30T16:08:34+00:00" }, + { + "name": "composer/spdx-licenses", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/composer/spdx-licenses.git", + "reference": "7a9556b22bd9d4df7cad89876b00af58ef20d3a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/7a9556b22bd9d4df7cad89876b00af58ef20d3a2", + "reference": "7a9556b22bd9d4df7cad89876b00af58ef20d3a2", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5", + "phpunit/phpunit-mock-objects": "2.3.0 || ^3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Spdx\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "SPDX licenses list and validation library.", + "keywords": [ + "license", + "spdx", + "validator" + ], + "time": "2018-11-01T09:45:54+00:00" + }, { "name": "composer/xdebug-handler", "version": "1.3.1", @@ -3528,6 +3848,72 @@ ], "time": "2016-01-20T08:20:44+00:00" }, + { + "name": "justinrainbow/json-schema", + "version": "5.2.8", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "dcb6e1006bb5fd1e392b4daa68932880f37550d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/dcb6e1006bb5fd1e392b4daa68932880f37550d4", + "reference": "dcb6e1006bb5fd1e392b4daa68932880f37550d4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.2.20", + "json-schema/json-schema-test-suite": "1.2.0", + "phpunit/phpunit": "^4.8.35" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "time": "2019-01-14T23:55:14+00:00" + }, { "name": "maximebf/debugbar", "version": "v1.15.0", @@ -5021,6 +5407,99 @@ "homepage": "https://github.com/sebastianbergmann/version", "time": "2016-10-03T07:35:21+00:00" }, + { + "name": "seld/jsonlint", + "version": "1.7.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/jsonlint.git", + "reference": "d15f59a67ff805a44c50ea0516d2341740f81a38" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/d15f59a67ff805a44c50ea0516d2341740f81a38", + "reference": "d15f59a67ff805a44c50ea0516d2341740f81a38", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "bin": [ + "bin/jsonlint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Seld\\JsonLint\\": "src/Seld/JsonLint/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "JSON Linter", + "keywords": [ + "json", + "linter", + "parser", + "validator" + ], + "time": "2018-01-24T12:46:19+00:00" + }, + { + "name": "seld/phar-utils", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/phar-utils.git", + "reference": "7009b5139491975ef6486545a39f3e6dad5ac30a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/7009b5139491975ef6486545a39f3e6dad5ac30a", + "reference": "7009b5139491975ef6486545a39f3e6dad5ac30a", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Seld\\PharUtils\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "PHAR file format utilities, for when PHP phars you up", + "keywords": [ + "phra" + ], + "time": "2015-10-13T18:44:15+00:00" + }, { "name": "symfony/filesystem", "version": "v4.2.2", @@ -5370,7 +5849,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.0.0" + "php": ">=7.1.0" }, "platform-dev": [] } From 9f1cd607d7f589ae1285c9d14d737c095b29bc60 Mon Sep 17 00:00:00 2001 From: hina Date: Sun, 17 Feb 2019 02:51:52 +0900 Subject: [PATCH 08/52] ignore ide-helper files --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f2e912f..f96b13b 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,6 @@ yarn-error.log .env *.iml .php_cs -.php_cs.cache \ No newline at end of file +.php_cs.cache +.phpstorm.meta.php +_ide_helper*.php From 24dee801ad0a75ea3c1d9e4db7f91042367caa5b Mon Sep 17 00:00:00 2001 From: hina Date: Sun, 17 Feb 2019 02:58:36 +0900 Subject: [PATCH 09/52] =?UTF-8?q?Guzzle\Client=E3=82=92=E3=83=A2=E3=83=83?= =?UTF-8?q?=E3=82=AB=E3=83=96=E3=83=AB=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Listeners/LinkCollector.php | 3 ++- app/MetadataResolver/CienResolver.php | 22 ++++++++++++++---- app/MetadataResolver/DLsiteResolver.php | 25 ++++++++++++++++----- app/MetadataResolver/DeviantArtResolver.php | 23 +++++++++++++++---- app/MetadataResolver/FantiaResolver.php | 21 +++++++++++++---- app/MetadataResolver/FanzaResolver.php | 25 ++++++++++++++++----- app/MetadataResolver/IwaraResolver.php | 16 +++++++++++-- app/MetadataResolver/KomifloResolver.php | 15 +++++++++++-- app/MetadataResolver/MelonbooksResolver.php | 22 ++++++++++++++---- app/MetadataResolver/MetadataResolver.php | 8 ++++--- app/MetadataResolver/NarouResolver.php | 22 ++++++++++++++---- app/MetadataResolver/NicoSeigaResolver.php | 23 +++++++++++++++---- app/MetadataResolver/NijieResolver.php | 12 +++++++++- app/MetadataResolver/OGPResolver.php | 15 +++++++++++-- app/MetadataResolver/PatreonResolver.php | 24 +++++++++++++++----- app/MetadataResolver/PixivResolver.php | 23 +++++++++++++++---- app/MetadataResolver/ToranoanaResolver.php | 22 ++++++++++++++---- 17 files changed, 263 insertions(+), 58 deletions(-) diff --git a/app/Listeners/LinkCollector.php b/app/Listeners/LinkCollector.php index 0484f95..0354f65 100644 --- a/app/Listeners/LinkCollector.php +++ b/app/Listeners/LinkCollector.php @@ -21,7 +21,8 @@ class LinkCollector /** * Create the event listener. * - * @return void + * @param Formatter $formatter + * @param MetadataResolver $metadataResolver */ public function __construct(Formatter $formatter, MetadataResolver $metadataResolver) { diff --git a/app/MetadataResolver/CienResolver.php b/app/MetadataResolver/CienResolver.php index 73f8c0e..5af47c3 100644 --- a/app/MetadataResolver/CienResolver.php +++ b/app/MetadataResolver/CienResolver.php @@ -3,16 +3,30 @@ namespace App\MetadataResolver; use Carbon\Carbon; +use GuzzleHttp\Client; class CienResolver extends MetadataResolver { + /** + * @var Client + */ + private $client; + /** + * @var OGPResolver + */ + private $ogpResolver; + + public function __construct(Client $client, OGPResolver $ogpResolver) + { + $this->client = $client; + $this->ogpResolver = $ogpResolver; + } + public function resolve(string $url): Metadata { - $client = new \GuzzleHttp\Client(); - $res = $client->get($url); + $res = $this->client->get($url); if ($res->getStatusCode() === 200) { - $ogpResolver = new OGPResolver(); - $metadata = $ogpResolver->parse($res->getBody()); + $metadata = $this->ogpResolver->parse($res->getBody()); // 画像URLから有効期限の起点を拾う parse_str(parse_url($metadata->image, PHP_URL_QUERY), $params); diff --git a/app/MetadataResolver/DLsiteResolver.php b/app/MetadataResolver/DLsiteResolver.php index fc0d522..99aae49 100644 --- a/app/MetadataResolver/DLsiteResolver.php +++ b/app/MetadataResolver/DLsiteResolver.php @@ -2,16 +2,31 @@ namespace App\MetadataResolver; +use GuzzleHttp\Client; + class DLsiteResolver implements Resolver { + /** + * @var Client + */ + private $client; + /** + * @var OGPResolver + */ + private $ogpResolver; + + public function __construct(Client $client, OGPResolver $ogpResolver) + { + $this->client = $client; + $this->ogpResolver = $ogpResolver; + } + public function resolve(string $url): Metadata { - $client = new \GuzzleHttp\Client(); - $res = $client->get($url); + $res = $this->client->get($url); if ($res->getStatusCode() === 200) { - $ogpResolver = new OGPResolver(); - $metadata = $ogpResolver->parse($res->getBody()); - $metadata->image = str_replace('img_sam.jpg', 'img_main.jpg', $metadata->image); + $metadata = $this->ogpResolver->parse($res->getBody()); + $metadata->image = str_replace('img_sam.jpg', 'img_main.jpg', $metadata->image); return $metadata; } else { diff --git a/app/MetadataResolver/DeviantArtResolver.php b/app/MetadataResolver/DeviantArtResolver.php index fb939d5..2ef5898 100644 --- a/app/MetadataResolver/DeviantArtResolver.php +++ b/app/MetadataResolver/DeviantArtResolver.php @@ -2,15 +2,30 @@ namespace App\MetadataResolver; +use GuzzleHttp\Client; + class DeviantArtResolver implements Resolver { + /** + * @var Client + */ + private $client; + /** + * @var OGPResolver + */ + private $ogpResolver; + + public function __construct(Client $client, OGPResolver $ogpResolver) + { + $this->client = $client; + $this->ogpResolver = $ogpResolver; + } + public function resolve(string $url): Metadata { - $client = new \GuzzleHttp\Client(); - $res = $client->get($url); + $res = $this->client->get($url); if ($res->getStatusCode() === 200) { - $ogpResolver = new OGPResolver(); - $metadata = $ogpResolver->parse($res->getBody()); + $metadata = $this->ogpResolver->parse($res->getBody()); $dom = new \DOMDocument(); @$dom->loadHTML(mb_convert_encoding($res->getBody(), 'HTML-ENTITIES', 'UTF-8')); diff --git a/app/MetadataResolver/FantiaResolver.php b/app/MetadataResolver/FantiaResolver.php index 0a5e5b3..63af366 100644 --- a/app/MetadataResolver/FantiaResolver.php +++ b/app/MetadataResolver/FantiaResolver.php @@ -2,20 +2,33 @@ namespace App\MetadataResolver; +use GuzzleHttp\Client; use Illuminate\Support\Facades\Log; class FantiaResolver implements Resolver { + /** + * @var Client + */ + private $client; + /** + * @var OGPResolver + */ + private $ogpResolver; + + public function __construct(Client $client, OGPResolver $ogpResolver) + { + $this->client = $client; + $this->ogpResolver = $ogpResolver; + } public function resolve(string $url): Metadata { preg_match("~\d+~", $url, $match); $postId = $match[0]; - $client = new \GuzzleHttp\Client(); - $res = $client->get($url); + $res = $this->client->get($url); if ($res->getStatusCode() === 200) { - $ogpResolver = new OGPResolver(); - $metadata = $ogpResolver->parse($res->getBody()); + $metadata = $this->ogpResolver->parse($res->getBody()); $dom = new \DOMDocument(); @$dom->loadHTML(mb_convert_encoding($res->getBody(), 'HTML-ENTITIES', 'UTF-8')); diff --git a/app/MetadataResolver/FanzaResolver.php b/app/MetadataResolver/FanzaResolver.php index de06b75..cfb73db 100644 --- a/app/MetadataResolver/FanzaResolver.php +++ b/app/MetadataResolver/FanzaResolver.php @@ -2,16 +2,31 @@ namespace App\MetadataResolver; +use GuzzleHttp\Client; + class FanzaResolver implements Resolver { + /** + * @var Client + */ + private $client; + /** + * @var OGPResolver + */ + private $ogpResolver; + + public function __construct(Client $client, OGPResolver $ogpResolver) + { + $this->client = $client; + $this->ogpResolver = $ogpResolver; + } + public function resolve(string $url): Metadata { - $client = new \GuzzleHttp\Client(); - $res = $client->get($url); + $res = $this->client->get($url); if ($res->getStatusCode() === 200) { - $ogpResolver = new OGPResolver(); - $metadata = $ogpResolver->parse($res->getBody()); - $metadata->image = preg_replace("~(pr|ps)\.jpg$~", 'pl.jpg', $metadata->image); + $metadata = $this->ogpResolver->parse($res->getBody()); + $metadata->image = preg_replace("~(pr|ps)\.jpg$~", 'pl.jpg', $metadata->image); return $metadata; } else { diff --git a/app/MetadataResolver/IwaraResolver.php b/app/MetadataResolver/IwaraResolver.php index 60aaf1b..361501d 100644 --- a/app/MetadataResolver/IwaraResolver.php +++ b/app/MetadataResolver/IwaraResolver.php @@ -2,12 +2,24 @@ namespace App\MetadataResolver; +use GuzzleHttp\Client; + class IwaraResolver implements Resolver { + /** + * @var Client + */ + private $client; + + public function __construct(Client $client) + { + $this->client = $client; + } + public function resolve(string $url): Metadata { - $client = new \GuzzleHttp\Client(); - $res = $client->get($url); + $res = $this->client->get($url); + if ($res->getStatusCode() === 200) { $dom = new \DOMDocument(); @$dom->loadHTML(mb_convert_encoding($res->getBody(), 'HTML-ENTITIES', 'UTF-8')); diff --git a/app/MetadataResolver/KomifloResolver.php b/app/MetadataResolver/KomifloResolver.php index b09396a..f3007d3 100644 --- a/app/MetadataResolver/KomifloResolver.php +++ b/app/MetadataResolver/KomifloResolver.php @@ -2,8 +2,20 @@ namespace App\MetadataResolver; +use GuzzleHttp\Client; + class KomifloResolver implements Resolver { + /** + * @var Client + */ + private $client; + + public function __construct(Client $client) + { + $this->client = $client; + } + public function resolve(string $url): Metadata { if (preg_match('~komiflo\.com(?:/#!)?/comics/(\\d+)~', $url, $matches) !== 1) { @@ -11,8 +23,7 @@ class KomifloResolver implements Resolver } $id = $matches[1]; - $client = new \GuzzleHttp\Client(); - $res = $client->get('https://api.komiflo.com/content/id/' . $id); + $res = $this->client->get('https://api.komiflo.com/content/id/' . $id); if ($res->getStatusCode() === 200) { $json = json_decode($res->getBody()->getContents(), true); $metadata = new Metadata(); diff --git a/app/MetadataResolver/MelonbooksResolver.php b/app/MetadataResolver/MelonbooksResolver.php index 2e8b7fb..5cc3669 100644 --- a/app/MetadataResolver/MelonbooksResolver.php +++ b/app/MetadataResolver/MelonbooksResolver.php @@ -2,19 +2,33 @@ namespace App\MetadataResolver; +use GuzzleHttp\Client; use GuzzleHttp\Cookie\CookieJar; class MelonbooksResolver implements Resolver { + /** + * @var Client + */ + private $client; + /** + * @var OGPResolver + */ + private $ogpResolver; + + public function __construct(Client $client, OGPResolver $ogpResolver) + { + $this->client = $client; + $this->ogpResolver = $ogpResolver; + } + public function resolve(string $url): Metadata { $cookieJar = CookieJar::fromArray(['AUTH_ADULT' => '1'], 'www.melonbooks.co.jp'); - $client = new \GuzzleHttp\Client(); - $res = $client->get($url, ['cookies' => $cookieJar]); + $res = $this->client->get($url, ['cookies' => $cookieJar]); if ($res->getStatusCode() === 200) { - $ogpResolver = new OGPResolver(); - $metadata = $ogpResolver->parse($res->getBody()); + $metadata = $this->ogpResolver->parse($res->getBody()); // censoredフラグの除去 if (mb_strpos($metadata->image, '&c=1') !== false) { diff --git a/app/MetadataResolver/MetadataResolver.php b/app/MetadataResolver/MetadataResolver.php index b55da22..5759bf3 100644 --- a/app/MetadataResolver/MetadataResolver.php +++ b/app/MetadataResolver/MetadataResolver.php @@ -37,7 +37,8 @@ class MetadataResolver implements Resolver { foreach ($this->rules as $pattern => $class) { if (preg_match($pattern, $url) === 1) { - $resolver = new $class(); + /** @var Resolver $resolver */ + $resolver = app($class); return $resolver->resolve($url); } @@ -49,13 +50,14 @@ class MetadataResolver implements Resolver } if (isset($this->defaultResolver)) { - $resolver = new $this->defaultResolver(); + /** @var Resolver $resolver */ + $resolver = app($this->defaultResolver); return $resolver->resolve($url); } throw new \UnexpectedValueException('URL not matched.'); } - + public function resolveWithAcceptHeader(string $url): ?Metadata { try { diff --git a/app/MetadataResolver/NarouResolver.php b/app/MetadataResolver/NarouResolver.php index 5f14d0a..6600b23 100644 --- a/app/MetadataResolver/NarouResolver.php +++ b/app/MetadataResolver/NarouResolver.php @@ -2,19 +2,33 @@ namespace App\MetadataResolver; +use GuzzleHttp\Client; use GuzzleHttp\Cookie\CookieJar; class NarouResolver implements Resolver { + /** + * @var Client + */ + private $client; + /** + * @var OGPResolver + */ + private $ogpResolver; + + public function __construct(Client $client, OGPResolver $ogpResolver) + { + $this->client = $client; + $this->ogpResolver = $ogpResolver; + } + public function resolve(string $url): Metadata { $cookieJar = CookieJar::fromArray(['over18' => 'yes'], '.syosetu.com'); - $client = new \GuzzleHttp\Client(); - $res = $client->get($url, ['cookies' => $cookieJar]); + $res = $this->client->get($url, ['cookies' => $cookieJar]); if ($res->getStatusCode() === 200) { - $ogpResolver = new OGPResolver(); - $metadata = $ogpResolver->parse($res->getBody()); + $metadata = $this->ogpResolver->parse($res->getBody()); $metadata->description = ''; $dom = new \DOMDocument(); diff --git a/app/MetadataResolver/NicoSeigaResolver.php b/app/MetadataResolver/NicoSeigaResolver.php index 3e6d5c0..3f2e000 100644 --- a/app/MetadataResolver/NicoSeigaResolver.php +++ b/app/MetadataResolver/NicoSeigaResolver.php @@ -2,15 +2,30 @@ namespace App\MetadataResolver; +use GuzzleHttp\Client; + class NicoSeigaResolver implements Resolver { + /** + * @var Client + */ + private $client; + /** + * @var OGPResolver + */ + private $ogpResolver; + + public function __construct(Client $client, OGPResolver $ogpResolver) + { + $this->client = $client; + $this->ogpResolver = $ogpResolver; + } + public function resolve(string $url): Metadata { - $client = new \GuzzleHttp\Client(); - $res = $client->get($url); + $res = $this->client->get($url); if ($res->getStatusCode() === 200) { - $ogpResolver = new OGPResolver(); - $metadata = $ogpResolver->parse($res->getBody()); + $metadata = $this->ogpResolver->parse($res->getBody()); // ページURLからサムネイルURLに変換 preg_match('~http://(?:(?:sp\\.)?seiga\\.nicovideo\\.jp/seiga(?:/#!)?|nico\\.ms)/im(\\d+)~', $url, $matches); diff --git a/app/MetadataResolver/NijieResolver.php b/app/MetadataResolver/NijieResolver.php index 45b73de..c39f096 100644 --- a/app/MetadataResolver/NijieResolver.php +++ b/app/MetadataResolver/NijieResolver.php @@ -2,8 +2,18 @@ namespace App\MetadataResolver; +use GuzzleHttp\Client; + class NijieResolver implements Resolver { + /** @var Client */ + protected $client; + + public function __construct(Client $client) + { + $this->client = $client; + } + public function resolve(string $url): Metadata { if (mb_strpos($url, '//sp.nijie.info') !== false) { @@ -13,7 +23,7 @@ class NijieResolver implements Resolver $url = preg_replace('~view_popup\.php~', 'view.php', $url); } - $client = new \GuzzleHttp\Client(); + $client = $this->client; $res = $client->get($url); if ($res->getStatusCode() === 200) { $ogpResolver = new OGPResolver(); diff --git a/app/MetadataResolver/OGPResolver.php b/app/MetadataResolver/OGPResolver.php index 1cf4c1e..f8e185e 100644 --- a/app/MetadataResolver/OGPResolver.php +++ b/app/MetadataResolver/OGPResolver.php @@ -2,12 +2,23 @@ namespace App\MetadataResolver; +use GuzzleHttp\Client; + class OGPResolver implements Resolver, Parser { + /** + * @var Client + */ + private $client; + + public function __construct(Client $client) + { + $this->client = $client; + } + public function resolve(string $url): Metadata { - $client = new \GuzzleHttp\Client(); - $res = $client->get($url); + $res = $this->client->get($url); if ($res->getStatusCode() === 200) { return $this->parse($res->getBody()); } else { diff --git a/app/MetadataResolver/PatreonResolver.php b/app/MetadataResolver/PatreonResolver.php index 78f461a..5ce28e7 100644 --- a/app/MetadataResolver/PatreonResolver.php +++ b/app/MetadataResolver/PatreonResolver.php @@ -3,19 +3,33 @@ namespace App\MetadataResolver; use Carbon\Carbon; +use GuzzleHttp\Client; class PatreonResolver implements Resolver { + /** + * @var Client + */ + private $client; + /** + * @var OGPResolver + */ + private $ogpResolver; + + public function __construct(Client $client, OGPResolver $ogpResolver) + { + $this->client = $client; + $this->ogpResolver = $ogpResolver; + } + public function resolve(string $url): Metadata { - $client = new \GuzzleHttp\Client(); - $res = $client->get($url); + $res = $this->client->get($url); if ($res->getStatusCode() === 200) { - $ogpResolver = new OGPResolver(); - $metadata = $ogpResolver->parse($res->getBody()); + $metadata = $this->ogpResolver->parse($res->getBody()); parse_str(parse_url($metadata->image, PHP_URL_QUERY), $temp); - $expires_at_unixtime = $temp["token-time"]; + $expires_at_unixtime = $temp['token-time']; $expires_at = Carbon::createFromTimestamp($expires_at_unixtime); $metadata->expires_at = $expires_at; diff --git a/app/MetadataResolver/PixivResolver.php b/app/MetadataResolver/PixivResolver.php index 16c89d9..094fcd2 100644 --- a/app/MetadataResolver/PixivResolver.php +++ b/app/MetadataResolver/PixivResolver.php @@ -2,8 +2,25 @@ namespace App\MetadataResolver; +use GuzzleHttp\Client; + class PixivResolver implements Resolver { + /** + * @var Client + */ + private $client; + /** + * @var OGPResolver + */ + private $ogpResolver; + + public function __construct(Client $client, OGPResolver $ogpResolver) + { + $this->client = $client; + $this->ogpResolver = $ogpResolver; + } + /** * サムネイル画像 URL から最大長辺 1200px の画像 URL に変換する * @@ -45,11 +62,9 @@ class PixivResolver implements Resolver $url = preg_replace('~mode=manga(_big)?~', 'mode=medium', $url); } - $client = new \GuzzleHttp\Client(); - $res = $client->get($url); + $res = $this->client->get($url); if ($res->getStatusCode() === 200) { - $ogpResolver = new OGPResolver(); - $metadata = $ogpResolver->parse($res->getBody()); + $metadata = $this->ogpResolver->parse($res->getBody()); preg_match("~https://i\.pximg\.net/c/128x128/img-master/img/\d{4}/\d{2}/\d{2}/\d{2}/\d{2}/\d{2}/{$illustId}(_p0)?_square1200\.jpg~", $res->getBody(), $match); $illustThumbnailUrl = $match[0]; diff --git a/app/MetadataResolver/ToranoanaResolver.php b/app/MetadataResolver/ToranoanaResolver.php index 968fff6..27b900e 100644 --- a/app/MetadataResolver/ToranoanaResolver.php +++ b/app/MetadataResolver/ToranoanaResolver.php @@ -2,20 +2,34 @@ namespace App\MetadataResolver; +use GuzzleHttp\Client; use GuzzleHttp\Cookie\CookieJar; class ToranoanaResolver implements Resolver { + /** + * @var Client + */ + private $client; + /** + * @var OGPResolver + */ + private $ogpResolver; + + public function __construct(Client $client, OGPResolver $ogpResolver) + { + $this->client = $client; + $this->ogpResolver = $ogpResolver; + } + public function resolve(string $url): Metadata { $cookieJar = CookieJar::fromArray(['adflg' => '0'], 'ec.toranoana.jp'); - $client = new \GuzzleHttp\Client(); - $res = $client->get($url, ['cookies' => $cookieJar]); + $res = $this->client->get($url, ['cookies' => $cookieJar]); if ($res->getStatusCode() === 200) { - $ogpResolver = new OGPResolver(); - return $ogpResolver->parse($res->getBody()); + return $this->ogpResolver->parse($res->getBody()); } else { throw new \RuntimeException("{$res->getStatusCode()}: $url"); } From 51f097fdf02c7ada023ac979b2abb640834170a9 Mon Sep 17 00:00:00 2001 From: hina Date: Sun, 17 Feb 2019 03:18:59 +0900 Subject: [PATCH 10/52] =?UTF-8?q?=E6=9C=80=E5=88=9D=E3=81=AB=E3=82=84?= =?UTF-8?q?=E3=81=A3=E3=81=9F=E3=83=8B=E3=82=B8=E3=82=A8=E3=81=AB=E6=8A=9C?= =?UTF-8?q?=E3=81=91=E3=81=8C=E3=81=82=E3=81=A3=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/MetadataResolver/NijieResolver.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/MetadataResolver/NijieResolver.php b/app/MetadataResolver/NijieResolver.php index c39f096..35ae370 100644 --- a/app/MetadataResolver/NijieResolver.php +++ b/app/MetadataResolver/NijieResolver.php @@ -6,12 +6,19 @@ use GuzzleHttp\Client; class NijieResolver implements Resolver { - /** @var Client */ + /** + * @var Client + */ protected $client; + /** + * @var OGPResolver + */ + private $ogpResolver; - public function __construct(Client $client) + public function __construct(Client $client, OGPResolver $ogpResolver) { $this->client = $client; + $this->ogpResolver = $ogpResolver; } public function resolve(string $url): Metadata @@ -26,8 +33,7 @@ class NijieResolver implements Resolver $client = $this->client; $res = $client->get($url); if ($res->getStatusCode() === 200) { - $ogpResolver = new OGPResolver(); - $metadata = $ogpResolver->parse($res->getBody()); + $metadata = $this->ogpResolver->parse($res->getBody()); $dom = new \DOMDocument(); @$dom->loadHTML(mb_convert_encoding($res->getBody(), 'HTML-ENTITIES', 'UTF-8')); From a934a7fc355c04a8b87e7b1fb4ef561f977a6aa5 Mon Sep 17 00:00:00 2001 From: hina Date: Sun, 17 Feb 2019 03:19:27 +0900 Subject: [PATCH 11/52] =?UTF-8?q?=E3=83=AA=E3=83=A2=E3=83=BC=E3=83=88URL?= =?UTF-8?q?=E3=82=92=E3=83=AA=E3=82=AF=E3=82=A8=E3=82=B9=E3=83=88=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=83=86=E3=82=B9=E3=83=88=E3=82=92=E3=83=88=E3=82=B0?= =?UTF-8?q?=E3=82=8C=E3=82=8B=E3=83=A2=E3=83=83=E3=82=AF=E3=81=AB=E5=B7=AE?= =?UTF-8?q?=E3=81=97=E6=9B=BF=E3=81=88=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MetadataResolver/CreateMockedResolver.php | 53 +++++++++++ .../MetadataResolver/NijieResolverTest.php | 88 ++++++++++++++----- .../Unit/MetadataResolver/OGPResolverTest.php | 54 ++++++++++-- .../Nijie/testAnimationGifResponse.html | 11 +++ tests/fixture/Nijie/testMp4MovieResponse.html | 30 +++++++ .../Nijie/testMultiplePictureResponse.html | 12 +++ .../Nijie/testStandardPictureResponse.html | 16 ++++ 7 files changed, 233 insertions(+), 31 deletions(-) create mode 100644 tests/Unit/MetadataResolver/CreateMockedResolver.php create mode 100644 tests/fixture/Nijie/testAnimationGifResponse.html create mode 100644 tests/fixture/Nijie/testMp4MovieResponse.html create mode 100644 tests/fixture/Nijie/testMultiplePictureResponse.html create mode 100644 tests/fixture/Nijie/testStandardPictureResponse.html diff --git a/tests/Unit/MetadataResolver/CreateMockedResolver.php b/tests/Unit/MetadataResolver/CreateMockedResolver.php new file mode 100644 index 0000000..70a7847 --- /dev/null +++ b/tests/Unit/MetadataResolver/CreateMockedResolver.php @@ -0,0 +1,53 @@ +shouldUseMock()) { + $this->resolver = app()->make($resolverClass); + + return $this->resolver; + } + + $headers += [ + 'content-type' => 'text/html', + ]; + + $mockResponse = new Response($status, $headers, $responseText); + $this->handler = new MockHandler([$mockResponse]); + $client = new Client(['handler' => $this->handler]); + $this->resolver = app()->make($resolverClass, ['client' => $client]); + return $this->resolver; + } + + protected function shouldUseMock(): bool + { + return (bool)env('TEST_USE_HTTP_MOCK', true); + } +} diff --git a/tests/Unit/MetadataResolver/NijieResolverTest.php b/tests/Unit/MetadataResolver/NijieResolverTest.php index 25f361f..adb9b81 100644 --- a/tests/Unit/MetadataResolver/NijieResolverTest.php +++ b/tests/Unit/MetadataResolver/NijieResolverTest.php @@ -7,95 +7,135 @@ use Tests\TestCase; class NijieResolverTest extends TestCase { + use CreateMockedResolver; + + public function setUp() + { + parent::setUp(); + } + public function testStandardPicture() { - sleep(1); - $resolver = new NijieResolver(); + $responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html'); - $metadata = $resolver->resolve('https://nijie.info/view.php?id=66384'); + $this->createResolver(NijieResolver::class, $responseText); + + $metadata = $this->resolver->resolve('https://nijie.info/view.php?id=66384'); $this->assertEquals('チンポップくんの日常ep.1「チンポップくんと釣り」 | ニジエ運営', $metadata->title); $this->assertEquals("メールマガジン漫画のバックナンバー第一話です!\r\n最新話はメールマガジンより配信中です。", $metadata->description); $this->assertRegExp('/pic\d+\.nijie\.info/', $metadata->image); $this->assertNotRegExp('~/diff/main/~', $metadata->image); + if ($this->shouldUseMock()) { + $this->assertSame('https://nijie.info/view.php?id=66384', (string)$this->handler->getLastRequest()->getUri()); + } } public function testMultiplePicture() { - sleep(1); - $resolver = new NijieResolver(); + $responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testMultiplePictureResponse.html'); - $metadata = $resolver->resolve('https://nijie.info/view.php?id=202707'); + $this->createResolver(NijieResolver::class, $responseText); + + $metadata = $this->resolver->resolve('https://nijie.info/view.php?id=202707'); $this->assertEquals('ニジエ壁紙 | ニジエ運営', $metadata->title); $this->assertEquals("ニジエのPCとiphone用(4.7inch推奨)の壁紙です。\r\n保存してご自由にお使いくださいませ。", $metadata->description); $this->assertRegExp('/pic\d+\.nijie\.info/', $metadata->image); $this->assertNotRegExp('~/diff/main/~', $metadata->image); + if ($this->shouldUseMock()) { + $this->assertSame('https://nijie.info/view.php?id=202707', (string)$this->handler->getLastRequest()->getUri()); + } } public function testAnimationGif() { - sleep(1); - $resolver = new NijieResolver(); + $responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testAnimationGifResponse.html'); - $metadata = $resolver->resolve('https://nijie.info/view.php?id=9537'); + $this->createResolver(NijieResolver::class, $responseText); + + $metadata = $this->resolver->resolve('https://nijie.info/view.php?id=9537'); $this->assertEquals('ニジエがgifに対応したんだってね 奥さん | 黒末アプコ', $metadata->title); $this->assertEquals('アニメgifとか専門外なのでよくわかりませんでした', $metadata->description); $this->assertRegExp('~/nijie\.info/pic/logo~', $metadata->image); + if ($this->shouldUseMock()) { + $this->assertSame('https://nijie.info/view.php?id=9537', (string)$this->handler->getLastRequest()->getUri()); + } } public function testMp4Movie() { - sleep(1); - $resolver = new NijieResolver(); + $responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testMp4MovieResponse.html'); - $metadata = $resolver->resolve('https://nijie.info/view.php?id=256283'); + $this->createResolver(NijieResolver::class, $responseText); + + $metadata = $this->resolver->resolve('https://nijie.info/view.php?id=256283'); $this->assertEquals('てすと | ニジエ運営', $metadata->title); $this->assertEquals("H264動画てすと あとで消します\r\n\r\n今の所、H264コーデックのみ、出力時に音声なしにしないと投稿できません\r\n動画は勝手にループします", $metadata->description); $this->assertRegExp('~/nijie\.info/pic/logo~', $metadata->image); + if ($this->shouldUseMock()) { + $this->assertSame('https://nijie.info/view.php?id=256283', (string)$this->handler->getLastRequest()->getUri()); + } } public function testStandardPictureSp() { - sleep(1); - $resolver = new NijieResolver(); + $responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testStandardPictureResponse.html'); - $metadata = $resolver->resolve('https://sp.nijie.info/view.php?id=66384'); + $this->createResolver(NijieResolver::class, $responseText); + + $metadata = $this->resolver->resolve('https://sp.nijie.info/view.php?id=66384'); $this->assertEquals('チンポップくんの日常ep.1「チンポップくんと釣り」 | ニジエ運営', $metadata->title); $this->assertEquals("メールマガジン漫画のバックナンバー第一話です!\r\n最新話はメールマガジンより配信中です。", $metadata->description); $this->assertRegExp('/pic\d+\.nijie\.info/', $metadata->image); $this->assertNotRegExp('~/diff/main/~', $metadata->image); + if ($this->shouldUseMock()) { + $this->assertSame('https://nijie.info/view.php?id=66384', (string)$this->handler->getLastRequest()->getUri()); + } } public function testMultiplePictureSp() { - sleep(1); - $resolver = new NijieResolver(); + $responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testMultiplePictureResponse.html'); - $metadata = $resolver->resolve('https://sp.nijie.info/view.php?id=202707'); + $this->createResolver(NijieResolver::class, $responseText); + + $metadata = $this->resolver->resolve('https://sp.nijie.info/view.php?id=202707'); $this->assertEquals('ニジエ壁紙 | ニジエ運営', $metadata->title); $this->assertEquals("ニジエのPCとiphone用(4.7inch推奨)の壁紙です。\r\n保存してご自由にお使いくださいませ。", $metadata->description); $this->assertRegExp('/pic\d+\.nijie\.info/', $metadata->image); $this->assertNotRegExp('~/diff/main/~', $metadata->image); + if ($this->shouldUseMock()) { + $this->assertSame('https://nijie.info/view.php?id=202707', (string)$this->handler->getLastRequest()->getUri()); + } } public function testAnimationGifSp() { - sleep(1); - $resolver = new NijieResolver(); + $responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testAnimationGifResponse.html'); - $metadata = $resolver->resolve('https://nijie.info/view.php?id=9537'); + $this->createResolver(NijieResolver::class, $responseText); + + + $metadata = $this->resolver->resolve('https://nijie.info/view.php?id=9537'); $this->assertEquals('ニジエがgifに対応したんだってね 奥さん | 黒末アプコ', $metadata->title); $this->assertEquals('アニメgifとか専門外なのでよくわかりませんでした', $metadata->description); $this->assertRegExp('~/nijie\.info/pic/logo~', $metadata->image); + if ($this->shouldUseMock()) { + $this->assertSame('https://nijie.info/view.php?id=9537', (string)$this->handler->getLastRequest()->getUri()); + } } public function testMp4MovieSp() { - sleep(1); - $resolver = new NijieResolver(); + $responseText = file_get_contents(__DIR__ . '/../../fixture/Nijie/testMp4MovieResponse.html'); - $metadata = $resolver->resolve('https://sp.nijie.info/view.php?id=256283'); + $this->createResolver(NijieResolver::class, $responseText); + + $metadata = $this->resolver->resolve('https://sp.nijie.info/view.php?id=256283'); $this->assertEquals('てすと | ニジエ運営', $metadata->title); $this->assertEquals("H264動画てすと あとで消します\r\n\r\n今の所、H264コーデックのみ、出力時に音声なしにしないと投稿できません\r\n動画は勝手にループします", $metadata->description); $this->assertRegExp('~/nijie\.info/pic/logo~', $metadata->image); + if ($this->shouldUseMock()) { + $this->assertSame('https://nijie.info/view.php?id=256283', (string)$this->handler->getLastRequest()->getUri()); + } } } diff --git a/tests/Unit/MetadataResolver/OGPResolverTest.php b/tests/Unit/MetadataResolver/OGPResolverTest.php index 1befcd0..d1c6e80 100644 --- a/tests/Unit/MetadataResolver/OGPResolverTest.php +++ b/tests/Unit/MetadataResolver/OGPResolverTest.php @@ -8,18 +8,45 @@ use Tests\TestCase; class OGPResolverTest extends TestCase { + use CreateMockedResolver; + public function testMissingUrl() { - $resolver = new OGPResolver(); + $this->createResolver(OGPResolver::class, '', [], 404); - $this->expectException(ClientException::class); - $resolver->resolve('http://example.com/404'); + $this->expectException(\RuntimeException::class); + $this->resolver->resolve('http://example.com/404'); } public function testResolve() { - $resolver = new OGPResolver(); + $response = <<< 'HTML' + + + + + The Open Graph protocol + + + + + + + + + + + + + + + + + +HTML; + $this->createResolver(OGPResolver::class, $response); + $resolver = $this->createResolver(OGPResolver::class, $response); $metadata = $resolver->resolve('http://ogp.me'); $this->assertEquals('Open Graph protocol', $metadata->title); $this->assertEquals('The Open Graph protocol enables any web page to become a rich object in a social graph.', $metadata->description); @@ -28,9 +55,22 @@ class OGPResolverTest extends TestCase public function testResolveTitleOnly() { - $resolver = new OGPResolver(); + $response = <<< 'HTML' + + + + Example Domain - $metadata = $resolver->resolve('http://example.com'); + + + + + + +HTML; + $this->createResolver(OGPResolver::class, $response); + + $metadata = $this->resolver->resolve('http://example.com'); $this->assertEquals('Example Domain', $metadata->title); $this->assertEmpty($metadata->description); $this->assertEmpty($metadata->image); @@ -38,7 +78,7 @@ class OGPResolverTest extends TestCase public function testResolveTitleAndDescription() { - $resolver = new OGPResolver(); + $resolver = $this->app->make(OGPResolver::class); $html = <<Welcome to my homepage diff --git a/tests/fixture/Nijie/testAnimationGifResponse.html b/tests/fixture/Nijie/testAnimationGifResponse.html new file mode 100644 index 0000000..696dbb0 --- /dev/null +++ b/tests/fixture/Nijie/testAnimationGifResponse.html @@ -0,0 +1,11 @@ +ニジエがgifに対応したんだってね 奥さん | 黒末アプコ | ニジエ + + + + + + + + + + diff --git a/tests/fixture/Nijie/testMp4MovieResponse.html b/tests/fixture/Nijie/testMp4MovieResponse.html new file mode 100644 index 0000000..7b65b97 --- /dev/null +++ b/tests/fixture/Nijie/testMp4MovieResponse.html @@ -0,0 +1,30 @@ +てすと | ニジエ運営 | ニジエ + + + + + + +

 

good job

名無しのチンポップ

2018-04-10

+ + + + diff --git a/tests/fixture/Nijie/testMultiplePictureResponse.html b/tests/fixture/Nijie/testMultiplePictureResponse.html new file mode 100644 index 0000000..6b6f54f --- /dev/null +++ b/tests/fixture/Nijie/testMultiplePictureResponse.html @@ -0,0 +1,12 @@ + + ニジエ壁紙 | ニジエ運営 | ニジエ + + + + + + diff --git a/tests/fixture/Nijie/testStandardPictureResponse.html b/tests/fixture/Nijie/testStandardPictureResponse.html new file mode 100644 index 0000000..d8bd8f2 --- /dev/null +++ b/tests/fixture/Nijie/testStandardPictureResponse.html @@ -0,0 +1,16 @@ +チンポップくんの日常ep.1「チンポップくんと釣り」 | ニジエ運営 | ニジエ + + + + + + + + + + + From 0f4dfcd816d12fe8cf506fd4ea61b4c6df26d5fb Mon Sep 17 00:00:00 2001 From: shibafu Date: Sun, 17 Feb 2019 11:12:52 +0900 Subject: [PATCH 12/52] =?UTF-8?q?=E5=85=A8=E3=83=9A=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E6=95=B0=E3=81=AB=E3=81=AF=E3=83=AC=E3=82=A4=E3=82=A2=E3=82=A6?= =?UTF-8?q?=E3=83=88=E8=AA=BF=E6=95=B4=E7=8A=A0=E7=89=B2=E3=81=AB=E3=81=AA?= =?UTF-8?q?=E3=81=A3=E3=81=A6=E3=82=82=E3=82=89=E3=81=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * .page-linkと同様にline-heightを設定 * 高さ調整のためにheightを設定 --- public/css/tissue.css | 2 ++ resources/views/vendor/pagination/default.blade.php | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/public/css/tissue.css b/public/css/tissue.css index e7bd5e6..7b9c578 100644 --- a/public/css/tissue.css +++ b/public/css/tissue.css @@ -56,8 +56,10 @@ .tis-page-selector { margin-left: -1px; width: calc(100% + 2px); + height: 100%; border: 1px solid #dee2e6; border-radius: 0; + line-height: 1.25; } @media (min-width: 992px) { diff --git a/resources/views/vendor/pagination/default.blade.php b/resources/views/vendor/pagination/default.blade.php index 70c87bf..0c5fbb3 100644 --- a/resources/views/vendor/pagination/default.blade.php +++ b/resources/views/vendor/pagination/default.blade.php @@ -48,7 +48,6 @@ @endfor - / {{ $paginator->lastPage() }} @if ($paginator->hasMorePages()) From 0400bc771c4bfaaa64db5d4319688fb1e3d5b29f Mon Sep 17 00:00:00 2001 From: hina Date: Mon, 18 Feb 2019 17:32:09 +0900 Subject: [PATCH 13/52] =?UTF-8?q?git=E3=81=AB=E6=94=B9=E8=A1=8C=E3=82=B3?= =?UTF-8?q?=E3=83=BC=E3=83=89=E5=A4=89=E3=81=88=E3=82=89=E3=82=8C=E3=81=A6?= =?UTF-8?q?=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/fixture/.gitattributes | 1 + .../Nijie/testAnimationGifResponse.html | 22 +++---- tests/fixture/Nijie/testMp4MovieResponse.html | 60 +++++++++---------- .../Nijie/testMultiplePictureResponse.html | 24 ++++---- .../Nijie/testStandardPictureResponse.html | 32 +++++----- 5 files changed, 70 insertions(+), 69 deletions(-) create mode 100644 tests/fixture/.gitattributes diff --git a/tests/fixture/.gitattributes b/tests/fixture/.gitattributes new file mode 100644 index 0000000..fa1385d --- /dev/null +++ b/tests/fixture/.gitattributes @@ -0,0 +1 @@ +* -text diff --git a/tests/fixture/Nijie/testAnimationGifResponse.html b/tests/fixture/Nijie/testAnimationGifResponse.html index 696dbb0..f618032 100644 --- a/tests/fixture/Nijie/testAnimationGifResponse.html +++ b/tests/fixture/Nijie/testAnimationGifResponse.html @@ -1,11 +1,11 @@ -ニジエがgifに対応したんだってね 奥さん | 黒末アプコ | ニジエ - - - - - - - - - - +ニジエがgifに対応したんだってね 奥さん | 黒末アプコ | ニジエ + + + + + + + + + + diff --git a/tests/fixture/Nijie/testMp4MovieResponse.html b/tests/fixture/Nijie/testMp4MovieResponse.html index 7b65b97..f80c7c1 100644 --- a/tests/fixture/Nijie/testMp4MovieResponse.html +++ b/tests/fixture/Nijie/testMp4MovieResponse.html @@ -1,30 +1,30 @@ -てすと | ニジエ運営 | ニジエ - - - - - - -

 

good job

名無しのチンポップ

2018-04-10

- - - - +てすと | ニジエ運営 | ニジエ + + + + + + +

 

good job

名無しのチンポップ

2018-04-10

+ + + + diff --git a/tests/fixture/Nijie/testMultiplePictureResponse.html b/tests/fixture/Nijie/testMultiplePictureResponse.html index 6b6f54f..70d7a8e 100644 --- a/tests/fixture/Nijie/testMultiplePictureResponse.html +++ b/tests/fixture/Nijie/testMultiplePictureResponse.html @@ -1,12 +1,12 @@ - - ニジエ壁紙 | ニジエ運営 | ニジエ - - - - - - + + ニジエ壁紙 | ニジエ運営 | ニジエ + + + + + + diff --git a/tests/fixture/Nijie/testStandardPictureResponse.html b/tests/fixture/Nijie/testStandardPictureResponse.html index d8bd8f2..9d356db 100644 --- a/tests/fixture/Nijie/testStandardPictureResponse.html +++ b/tests/fixture/Nijie/testStandardPictureResponse.html @@ -1,16 +1,16 @@ -チンポップくんの日常ep.1「チンポップくんと釣り」 | ニジエ運営 | ニジエ - - - - - - - - - - - +チンポップくんの日常ep.1「チンポップくんと釣り」 | ニジエ運営 | ニジエ + + + + + + + + + + + From db3ba04091ef9ab404c655e41b440caae5d5664e Mon Sep 17 00:00:00 2001 From: hina Date: Mon, 18 Feb 2019 17:33:52 +0900 Subject: [PATCH 14/52] =?UTF-8?q?=E7=AB=8B=E3=81=A4=E9=B3=A5=E8=B7=A1?= =?UTF-8?q?=E3=82=92=E6=BF=81=E3=81=95=E3=81=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit モックを使用しない場合のsleepを復活 close #102 --- tests/Unit/MetadataResolver/NijieResolverTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/Unit/MetadataResolver/NijieResolverTest.php b/tests/Unit/MetadataResolver/NijieResolverTest.php index adb9b81..97794a9 100644 --- a/tests/Unit/MetadataResolver/NijieResolverTest.php +++ b/tests/Unit/MetadataResolver/NijieResolverTest.php @@ -12,6 +12,10 @@ class NijieResolverTest extends TestCase public function setUp() { parent::setUp(); + + if (!$this->shouldUseMock()) { + sleep(1); + } } public function testStandardPicture() From af964ad82f54a78dc25c7c8acb9391a928c8e3e0 Mon Sep 17 00:00:00 2001 From: eai04191 Date: Sat, 23 Feb 2019 05:29:12 +0900 Subject: [PATCH 15/52] =?UTF-8?q?=E3=83=A2=E3=83=90=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=81=AE=E3=83=8A=E3=83=93=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E3=82=92=E6=95=B4=E3=81=88=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #107 Preview: https://stellaria.network/system/media_attachments/files/000/070/479/original/0991a41baca49811.png https://stellaria.network/system/media_attachments/files/000/070/527/original/4ace1b1df83bc380.png --- public/css/tissue.css | 14 ++ resources/views/layouts/base.blade.php | 180 ++++++++++++++++++------- 2 files changed, 142 insertions(+), 52 deletions(-) diff --git a/public/css/tissue.css b/public/css/tissue.css index 7b9c578..6cbf65b 100644 --- a/public/css/tissue.css +++ b/public/css/tissue.css @@ -66,4 +66,18 @@ .tis-sidebar-info { font-size: small; } +} + +#navbarNav > .d-lg-none > .row > div:first-of-type { + padding-left: 15px; + padding-right: 7.5px; +} + +#navbarNav > .d-lg-none > .row > div { + padding-left: 7.5px; + padding-right: 15px; +} + +#navbarNav > .d-lg-none > .row > .col .btn { + width: 100%; } \ No newline at end of file diff --git a/resources/views/layouts/base.blade.php b/resources/views/layouts/base.blade.php index 97a4acb..7f9272b 100644 --- a/resources/views/layouts/base.blade.php +++ b/resources/views/layouts/base.blade.php @@ -36,68 +36,144 @@
- {{ config('app.name', 'Tissue') }} + {{ config('app.name', 'Tissue') }} + From de740082b75ae42c3f795d04494c5b86979642d3 Mon Sep 17 00:00:00 2001 From: eai04191 Date: Sat, 23 Feb 2019 06:40:37 +0900 Subject: [PATCH 16/52] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AA.form-inline?= =?UTF-8?q?=E3=81=A7=E5=B9=85=E3=81=8C=E5=88=B6=E9=99=90=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=9F=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/layouts/base.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/layouts/base.blade.php b/resources/views/layouts/base.blade.php index 7f9272b..5903545 100644 --- a/resources/views/layouts/base.blade.php +++ b/resources/views/layouts/base.blade.php @@ -133,7 +133,7 @@
--}}
-
+
From a14b49b7d2f33a8ea824215e649f33068b29a7bd Mon Sep 17 00:00:00 2001 From: hina Date: Sat, 23 Feb 2019 16:56:13 +0900 Subject: [PATCH 17/52] =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=83=86=E3=83=8A?= =?UTF-8?q?=E4=BD=BF=E3=81=A3=E3=81=A6=E3=81=84=E3=81=AA=E3=81=84=E3=82=B3?= =?UTF-8?q?=E3=83=B3=E3=82=B9=E3=83=88=E3=83=A9=E3=82=AF=E3=82=BF=E3=81=8C?= =?UTF-8?q?=E6=AE=8B=E3=81=A3=E3=81=A6=E3=81=9F=20fix=20#110?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/MetadataResolver/MetadataResolver.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/MetadataResolver/MetadataResolver.php b/app/MetadataResolver/MetadataResolver.php index 5759bf3..ace71c2 100644 --- a/app/MetadataResolver/MetadataResolver.php +++ b/app/MetadataResolver/MetadataResolver.php @@ -2,6 +2,7 @@ namespace App\MetadataResolver; +use GuzzleHttp\Client; use GuzzleHttp\Exception\ClientException; use GuzzleHttp\Exception\ServerException; @@ -67,7 +68,7 @@ class MetadataResolver implements Resolver // Acceptヘッダには */* を足さないことにする。 $acceptTypes = array_diff(array_keys($this->mimeTypes), ['*/*']); - $client = new \GuzzleHttp\Client(); + $client = app(Client::class); $res = $client->request('GET', $url, [ 'headers' => [ 'Accept' => implode(', ', $acceptTypes) @@ -80,14 +81,14 @@ class MetadataResolver implements Resolver if (isset($this->mimeTypes[$mimeType])) { $class = $this->mimeTypes[$mimeType]; - $parser = new $class(); + $parser = app($class); return $parser->parse($res->getBody()); } if (isset($this->mimeTypes['*/*'])) { $class = $this->mimeTypes['*/*']; - $parser = new $class(); + $parser = app($class); return $parser->parse($res->getBody()); } From dc98334a6d5d4b56607d3c7abc4da64a5792ddb5 Mon Sep 17 00:00:00 2001 From: eai04191 Date: Sat, 23 Feb 2019 22:29:53 +0900 Subject: [PATCH 18/52] =?UTF-8?q?card=E3=82=92=E3=82=B3=E3=83=B3=E3=83=9D?= =?UTF-8?q?=E3=83=BC=E3=83=8D=E3=83=B3=E3=83=88=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/components/card.blade.php | 9 +++++++++ resources/views/ejaculation/show.blade.php | 11 ++--------- resources/views/home.blade.php | 11 ++--------- resources/views/search/index.blade.php | 11 ++--------- resources/views/user/profile.blade.php | 11 ++--------- 5 files changed, 17 insertions(+), 36 deletions(-) create mode 100644 resources/views/components/card.blade.php diff --git a/resources/views/components/card.blade.php b/resources/views/components/card.blade.php new file mode 100644 index 0000000..7fc8b38 --- /dev/null +++ b/resources/views/components/card.blade.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/resources/views/ejaculation/show.blade.php b/resources/views/ejaculation/show.blade.php index b61cf00..05d2695 100644 --- a/resources/views/ejaculation/show.blade.php +++ b/resources/views/ejaculation/show.blade.php @@ -54,15 +54,8 @@ @if (!empty($ejaculation->link))
- + @component('components.card', ['link' => $ejaculation->link]) + @endcomponent

{{ $ejaculation->link }}

diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php index eb55241..ad8c942 100644 --- a/resources/views/home.blade.php +++ b/resources/views/home.blade.php @@ -76,15 +76,8 @@ @if (!empty($ejaculation->link))
- + @component('components.card', ['link' => $ejaculation->link]) + @endcomponent

{{ $ejaculation->link }}

diff --git a/resources/views/search/index.blade.php b/resources/views/search/index.blade.php index 4fc4c28..9192dde 100644 --- a/resources/views/search/index.blade.php +++ b/resources/views/search/index.blade.php @@ -35,15 +35,8 @@ @if (!empty($ejaculation->link))
- + @component('components.card', ['link' => $ejaculation->link]) + @endcomponent

{{ $ejaculation->link }}

diff --git a/resources/views/user/profile.blade.php b/resources/views/user/profile.blade.php index 51c59ae..782c7cf 100644 --- a/resources/views/user/profile.blade.php +++ b/resources/views/user/profile.blade.php @@ -60,15 +60,8 @@ @if (!empty($ejaculation->link))
- + @component('components.card', ['link' => $ejaculation->link]) + @endcomponent

{{ $ejaculation->link }}

From ea12f8c9a6c508d36e700092ff22f069af49c28d Mon Sep 17 00:00:00 2001 From: Eai Date: Tue, 26 Feb 2019 21:51:17 +0900 Subject: [PATCH 19/52] =?UTF-8?q?typo=E3=82=92=E4=BF=AE=E6=AD=A3=20(#109)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/tissue.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/css/tissue.css b/public/css/tissue.css index 7b9c578..338487c 100644 --- a/public/css/tissue.css +++ b/public/css/tissue.css @@ -21,7 +21,7 @@ } .container { - transition: filter .15s liner; + transition: filter .15s linear; } .list-group-item.no-side-border { From d0dd2db1594c9c9b8e57e4ffcdbb05797558f496 Mon Sep 17 00:00:00 2001 From: Eai Date: Tue, 26 Feb 2019 21:59:47 +0900 Subject: [PATCH 20/52] =?UTF-8?q?=E6=A6=82=E6=B3=81=E3=81=AE=E9=80=9A?= =?UTF-8?q?=E7=AE=97=E5=9B=9E=E6=95=B0=E3=82=92number=5Fformat=E3=81=A7?= =?UTF-8?q?=E3=83=95=E3=82=A9=E3=83=BC=E3=83=9E=E3=83=83=E3=83=88=20(#115)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/components/profile-stats.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/components/profile-stats.blade.php b/resources/views/components/profile-stats.blade.php index 4502525..2ef9ce3 100644 --- a/resources/views/components/profile-stats.blade.php +++ b/resources/views/components/profile-stats.blade.php @@ -12,4 +12,4 @@

最長記録: {{ Formatter::formatInterval($summary[0]->longest) }}

最短記録: {{ Formatter::formatInterval($summary[0]->shortest) }}

合計時間: {{ Formatter::formatInterval($summary[0]->total_times) }}

-

通算回数: {{ $summary[0]->total_checkins }}回

\ No newline at end of file +

通算回数: {{ number_format($summary[0]->total_checkins) }}回

\ No newline at end of file From c9cdd267288dc7e4600d8cca1b5c1d3da9a4ab27 Mon Sep 17 00:00:00 2001 From: shibafu Date: Tue, 26 Feb 2019 22:26:22 +0900 Subject: [PATCH 21/52] =?UTF-8?q?=E9=9D=9E=E3=83=AD=E3=82=B0=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E6=99=82=E3=81=AB=E3=81=AF=E3=82=A2=E3=82=AB=E3=82=A6?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC=E3=82=92?= =?UTF-8?q?=E5=87=BA=E5=8A=9B=E3=81=97=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ログイン情報がないのに参照してコケていた --- resources/views/layouts/base.blade.php | 32 ++++++++++++++------------ 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/resources/views/layouts/base.blade.php b/resources/views/layouts/base.blade.php index 5903545..6eeda23 100644 --- a/resources/views/layouts/base.blade.php +++ b/resources/views/layouts/base.blade.php @@ -37,24 +37,26 @@
{{ config('app.name', 'Tissue') }} -