Merge branch 'release-0.10.2'

This commit is contained in:
Pierre Rudloff 2017-10-26 10:22:02 +02:00
commit 48a1a5af1c
14 changed files with 1912 additions and 4191 deletions

View file

@ -7,13 +7,11 @@ addons:
- language-pack-fr - language-pack-fr
install: install:
- composer install - composer install
before_install:
- npm install -g npm@3
script: vendor/bin/phpunit script: vendor/bin/phpunit
after_success: after_success:
- bash <(curl -s https://codecov.io/bash) - bash <(curl -s https://codecov.io/bash)
before_deploy: before_deploy:
- npm install --ignore-scripts - yarn install --ignore-scripts
- ./node_modules/.bin/grunt doc - ./node_modules/.bin/grunt doc
deploy: deploy:
provider: surge provider: surge

View file

@ -1,16 +1,19 @@
FROM php:5.6-apache FROM php:7.0-apache
RUN apt-get update
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash - RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get install -y libicu-dev xz-utils git zlib1g-dev python nodejs RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update
RUN apt-get install -y libicu-dev xz-utils git zlib1g-dev python nodejs libgmp-dev gettext yarn
RUN docker-php-ext-install mbstring RUN docker-php-ext-install mbstring
RUN docker-php-ext-install intl RUN docker-php-ext-install intl
RUN docker-php-ext-install zip RUN docker-php-ext-install zip
RUN docker-php-ext-install gmp
RUN docker-php-ext-install gettext
RUN a2enmod rewrite RUN a2enmod rewrite
RUN curl -sS https://getcomposer.org/installer | php RUN curl -sS https://getcomposer.org/installer | php
COPY resources/php.ini /usr/local/etc/php/ COPY resources/php.ini /usr/local/etc/php/
COPY . /var/www/html/ COPY . /var/www/html/
RUN php composer.phar install --prefer-dist RUN php composer.phar install --prefer-dist
RUN npm install RUN yarn install
RUN ./node_modules/.bin/bower --allow-root install
RUN ./node_modules/.bin/grunt RUN ./node_modules/.bin/grunt
ENV CONVERT=1 ENV CONVERT=1

View file

@ -14,10 +14,10 @@ You just have to unzip it on your server and it should be ready to use.
### From Git ### From Git
In order to get AllTube working, you need to use [npm](https://www.npmjs.com/) and [Composer](https://getcomposer.org/): In order to get AllTube working, you need to use [Yarn](https://yarnpkg.com/) and [Composer](https://getcomposer.org/):
```bash ```bash
npm install yarn install
composer install composer install
``` ```
@ -35,11 +35,11 @@ If your web server is Apache, you need to set the `AllowOverride` setting to `Al
#### Update #### Update
When updating from Git, you need to run npm and Composer again: When updating from Git, you need to run yarn and Composer again:
```bash ```bash
git pull git pull
npm install yarn install
composer install composer install
``` ```

View file

@ -1,6 +0,0 @@
{
"name": "alltube",
"dependencies": {
"opensans-googlefont": "*"
}
}

View file

@ -88,6 +88,11 @@ class Locale
return strtolower($this->region); return strtolower($this->region);
} }
/**
* Get country information from locale.
*
* @return \Rinvex\Country\Country
*/
public function getCountry() public function getCountry()
{ {
return country($this->getIso3166()); return country($this->getIso3166());

View file

@ -23,7 +23,7 @@
"squizlabs/php_codesniffer": "~3.1.0", "squizlabs/php_codesniffer": "~3.1.0",
"phpunit/phpunit": "~5.7.2", "phpunit/phpunit": "~5.7.2",
"ffmpeg/ffmpeg": "dev-release", "ffmpeg/ffmpeg": "dev-release",
"rg3/youtube-dl": "~2017.09.24", "rg3/youtube-dl": "~2017.10.20",
"rudloff/rtmpdump-bin": "~2.3.0", "rudloff/rtmpdump-bin": "~2.3.0",
"heroku/heroku-buildpack-php": "*" "heroku/heroku-buildpack-php": "*"
}, },
@ -39,10 +39,10 @@
"type": "package", "type": "package",
"package": { "package": {
"name": "rg3/youtube-dl", "name": "rg3/youtube-dl",
"version": "2017.09.24", "version": "2017.10.20",
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://github.com/rg3/youtube-dl/archive/2017.09.24.zip" "url": "https://github.com/rg3/youtube-dl/archive/2017.10.20.zip"
} }
} }
}, },

182
composer.lock generated
View file

@ -4,8 +4,7 @@
"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#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "7e096080c78c8f3cea32ccf12bd08c48", "content-hash": "be0203be4eb5ef4d1b03fed10aa1b9f1",
"content-hash": "48556c24568c8fbce9e5464185302c3e",
"packages": [ "packages": [
{ {
"name": "aura/session", "name": "aura/session",
@ -67,7 +66,7 @@
"session", "session",
"sessions" "sessions"
], ],
"time": "2016-10-03 20:28:32" "time": "2016-10-03T20:28:32+00:00"
}, },
{ {
"name": "barracudanetworks/archivestream-php", "name": "barracudanetworks/archivestream-php",
@ -107,7 +106,7 @@
"tar", "tar",
"zip" "zip"
], ],
"time": "2017-01-13 14:52:38" "time": "2017-01-13T14:52:38+00:00"
}, },
{ {
"name": "container-interop/container-interop", "name": "container-interop/container-interop",
@ -138,7 +137,7 @@
], ],
"description": "Promoting the interoperability of container objects (DIC, SL, etc.)", "description": "Promoting the interoperability of container objects (DIC, SL, etc.)",
"homepage": "https://github.com/container-interop/container-interop", "homepage": "https://github.com/container-interop/container-interop",
"time": "2017-02-14 19:40:03" "time": "2017-02-14T19:40:03+00:00"
}, },
{ {
"name": "guzzlehttp/guzzle", "name": "guzzlehttp/guzzle",
@ -203,7 +202,7 @@
"rest", "rest",
"web service" "web service"
], ],
"time": "2017-06-22 18:50:49" "time": "2017-06-22T18:50:49+00:00"
}, },
{ {
"name": "guzzlehttp/promises", "name": "guzzlehttp/promises",
@ -254,7 +253,7 @@
"keywords": [ "keywords": [
"promise" "promise"
], ],
"time": "2016-12-20 10:07:11" "time": "2016-12-20T10:07:11+00:00"
}, },
{ {
"name": "guzzlehttp/psr7", "name": "guzzlehttp/psr7",
@ -319,7 +318,7 @@
"uri", "uri",
"url" "url"
], ],
"time": "2017-03-20 17:10:46" "time": "2017-03-20T17:10:46+00:00"
}, },
{ {
"name": "mathmarques/smarty-view", "name": "mathmarques/smarty-view",
@ -369,7 +368,7 @@
"template", "template",
"view" "view"
], ],
"time": "2016-08-25 19:04:49" "time": "2016-08-25T19:04:49+00:00"
}, },
{ {
"name": "nikic/fast-route", "name": "nikic/fast-route",
@ -412,7 +411,7 @@
"router", "router",
"routing" "routing"
], ],
"time": "2017-01-19 11:35:12" "time": "2017-01-19T11:35:12+00:00"
}, },
{ {
"name": "pimple/pimple", "name": "pimple/pimple",
@ -462,7 +461,7 @@
"container", "container",
"dependency injection" "dependency injection"
], ],
"time": "2017-07-23 07:32:15" "time": "2017-07-23T07:32:15+00:00"
}, },
{ {
"name": "psr/container", "name": "psr/container",
@ -511,7 +510,7 @@
"container-interop", "container-interop",
"psr" "psr"
], ],
"time": "2017-02-14 16:28:37" "time": "2017-02-14T16:28:37+00:00"
}, },
{ {
"name": "psr/http-message", "name": "psr/http-message",
@ -561,7 +560,7 @@
"request", "request",
"response" "response"
], ],
"time": "2016-08-06 14:39:51" "time": "2016-08-06T14:39:51+00:00"
}, },
{ {
"name": "ptachoire/process-builder-chain", "name": "ptachoire/process-builder-chain",
@ -597,7 +596,7 @@
} }
], ],
"description": "Add ability to chain symfony processes", "description": "Add ability to chain symfony processes",
"time": "2016-04-10 08:33:20" "time": "2016-04-10T08:33:20+00:00"
}, },
{ {
"name": "rinvex/country", "name": "rinvex/country",
@ -671,7 +670,7 @@
"rinvex", "rinvex",
"svg" "svg"
], ],
"time": "2016-11-27 05:53:11" "time": "2016-11-27T05:53:11+00:00"
}, },
{ {
"name": "slim/slim", "name": "slim/slim",
@ -742,7 +741,7 @@
"micro", "micro",
"router" "router"
], ],
"time": "2017-03-19 17:55:20" "time": "2017-03-19T17:55:20+00:00"
}, },
{ {
"name": "smarty-gettext/smarty-gettext", "name": "smarty-gettext/smarty-gettext",
@ -796,7 +795,7 @@
], ],
"description": "Gettext plugin enabling internationalization in Smarty Package files", "description": "Gettext plugin enabling internationalization in Smarty Package files",
"homepage": "https://github.com/smarty-gettext/smarty-gettext", "homepage": "https://github.com/smarty-gettext/smarty-gettext",
"time": "2017-05-12 12:14:46" "time": "2017-05-12T12:14:46+00:00"
}, },
{ {
"name": "smarty/smarty", "name": "smarty/smarty",
@ -849,20 +848,20 @@
"keywords": [ "keywords": [
"templating" "templating"
], ],
"time": "2016-12-14 21:57:25" "time": "2016-12-14T21:57:25+00:00"
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
"version": "v3.3.9", "version": "v3.3.10",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/process.git", "url": "https://github.com/symfony/process.git",
"reference": "b7666e9b438027a1ea0e1ee813ec5042d5d7f6f0" "reference": "fdf89e57a723a29baf536e288d6e232c059697b1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/b7666e9b438027a1ea0e1ee813ec5042d5d7f6f0", "url": "https://api.github.com/repos/symfony/process/zipball/fdf89e57a723a29baf536e288d6e232c059697b1",
"reference": "b7666e9b438027a1ea0e1ee813ec5042d5d7f6f0", "reference": "fdf89e57a723a29baf536e288d6e232c059697b1",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -898,20 +897,20 @@
], ],
"description": "Symfony Process Component", "description": "Symfony Process Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2017-07-29 21:54:42" "time": "2017-10-02T06:42:24+00:00"
}, },
{ {
"name": "symfony/yaml", "name": "symfony/yaml",
"version": "v3.3.9", "version": "v3.3.10",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/yaml.git", "url": "https://github.com/symfony/yaml.git",
"reference": "1d8c2a99c80862bdc3af94c1781bf70f86bccac0" "reference": "8c7bf1e7d5d6b05a690b715729cb4cd0c0a99c46"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/1d8c2a99c80862bdc3af94c1781bf70f86bccac0", "url": "https://api.github.com/repos/symfony/yaml/zipball/8c7bf1e7d5d6b05a690b715729cb4cd0c0a99c46",
"reference": "1d8c2a99c80862bdc3af94c1781bf70f86bccac0", "reference": "8c7bf1e7d5d6b05a690b715729cb4cd0c0a99c46",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -953,7 +952,7 @@
], ],
"description": "Symfony Yaml Component", "description": "Symfony Yaml Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2017-07-29 21:54:42" "time": "2017-10-05T14:43:42+00:00"
}, },
{ {
"name": "zonuexe/http-accept-language", "name": "zonuexe/http-accept-language",
@ -994,7 +993,7 @@
} }
], ],
"description": "HTTP Accept-Language Header parser", "description": "HTTP Accept-Language Header parser",
"time": "2014-10-19 09:22:18" "time": "2014-10-19T09:22:18+00:00"
} }
], ],
"packages-dev": [ "packages-dev": [
@ -1050,7 +1049,7 @@
"constructor", "constructor",
"instantiate" "instantiate"
], ],
"time": "2015-06-14 21:17:01" "time": "2015-06-14T21:17:01+00:00"
}, },
{ {
"name": "ffmpeg/ffmpeg", "name": "ffmpeg/ffmpeg",
@ -1068,16 +1067,16 @@
}, },
{ {
"name": "heroku/heroku-buildpack-php", "name": "heroku/heroku-buildpack-php",
"version": "v124", "version": "v125",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/heroku/heroku-buildpack-php.git", "url": "https://github.com/heroku/heroku-buildpack-php.git",
"reference": "ae364349c513e569d7d4614ab3b1767eb883b858" "reference": "880d625f715680aca2969562b8a5a69f4a289b7f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/heroku/heroku-buildpack-php/zipball/ae364349c513e569d7d4614ab3b1767eb883b858", "url": "https://api.github.com/repos/heroku/heroku-buildpack-php/zipball/880d625f715680aca2969562b8a5a69f4a289b7f",
"reference": "ae364349c513e569d7d4614ab3b1767eb883b858", "reference": "880d625f715680aca2969562b8a5a69f4a289b7f",
"shasum": "" "shasum": ""
}, },
"bin": [ "bin": [
@ -1108,41 +1107,44 @@
"nginx", "nginx",
"php" "php"
], ],
"time": "2017-09-07 23:07:36" "time": "2017-10-04T22:42:04+00:00"
}, },
{ {
"name": "myclabs/deep-copy", "name": "myclabs/deep-copy",
"version": "1.6.1", "version": "1.7.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/myclabs/DeepCopy.git", "url": "https://github.com/myclabs/DeepCopy.git",
"reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102" "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102", "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e",
"reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102", "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.4.0" "php": "^5.6 || ^7.0"
}, },
"require-dev": { "require-dev": {
"doctrine/collections": "1.*", "doctrine/collections": "^1.0",
"phpunit/phpunit": "~4.1" "doctrine/common": "^2.6",
"phpunit/phpunit": "^4.1"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"DeepCopy\\": "src/DeepCopy/" "DeepCopy\\": "src/DeepCopy/"
} },
"files": [
"src/DeepCopy/deep_copy.php"
]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
"description": "Create deep copies (clones) of your objects", "description": "Create deep copies (clones) of your objects",
"homepage": "https://github.com/myclabs/DeepCopy",
"keywords": [ "keywords": [
"clone", "clone",
"copy", "copy",
@ -1150,7 +1152,7 @@
"object", "object",
"object graph" "object graph"
], ],
"time": "2017-04-12 18:52:22" "time": "2017-10-19T19:58:43+00:00"
}, },
{ {
"name": "phpdocumentor/reflection-common", "name": "phpdocumentor/reflection-common",
@ -1204,7 +1206,7 @@
"reflection", "reflection",
"static analysis" "static analysis"
], ],
"time": "2017-09-11 18:02:19" "time": "2017-09-11T18:02:19+00:00"
}, },
{ {
"name": "phpdocumentor/reflection-docblock", "name": "phpdocumentor/reflection-docblock",
@ -1249,7 +1251,7 @@
} }
], ],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
"time": "2017-08-30 18:51:59" "time": "2017-08-30T18:51:59+00:00"
}, },
{ {
"name": "phpdocumentor/type-resolver", "name": "phpdocumentor/type-resolver",
@ -1296,7 +1298,7 @@
"email": "me@mikevanriel.com" "email": "me@mikevanriel.com"
} }
], ],
"time": "2017-07-14 14:27:02" "time": "2017-07-14T14:27:02+00:00"
}, },
{ {
"name": "phpspec/prophecy", "name": "phpspec/prophecy",
@ -1359,7 +1361,7 @@
"spy", "spy",
"stub" "stub"
], ],
"time": "2017-09-04 11:05:03" "time": "2017-09-04T11:05:03+00:00"
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",
@ -1422,7 +1424,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2017-04-02 07:44:40" "time": "2017-04-02T07:44:40+00:00"
}, },
{ {
"name": "phpunit/php-file-iterator", "name": "phpunit/php-file-iterator",
@ -1469,7 +1471,7 @@
"filesystem", "filesystem",
"iterator" "iterator"
], ],
"time": "2016-10-03 07:40:28" "time": "2016-10-03T07:40:28+00:00"
}, },
{ {
"name": "phpunit/php-text-template", "name": "phpunit/php-text-template",
@ -1510,7 +1512,7 @@
"keywords": [ "keywords": [
"template" "template"
], ],
"time": "2015-06-21 13:50:34" "time": "2015-06-21T13:50:34+00:00"
}, },
{ {
"name": "phpunit/php-timer", "name": "phpunit/php-timer",
@ -1559,7 +1561,7 @@
"keywords": [ "keywords": [
"timer" "timer"
], ],
"time": "2017-02-26 11:10:40" "time": "2017-02-26T11:10:40+00:00"
}, },
{ {
"name": "phpunit/php-token-stream", "name": "phpunit/php-token-stream",
@ -1608,20 +1610,20 @@
"keywords": [ "keywords": [
"tokenizer" "tokenizer"
], ],
"time": "2017-08-20 05:47:52" "time": "2017-08-20T05:47:52+00:00"
}, },
{ {
"name": "phpunit/phpunit", "name": "phpunit/phpunit",
"version": "5.7.22", "version": "5.7.23",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git", "url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "10df877596c9906d4110b5b905313829043f2ada" "reference": "78532d5269d984660080d8e0f4c99c5c2ea65ffe"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/10df877596c9906d4110b5b905313829043f2ada", "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/78532d5269d984660080d8e0f4c99c5c2ea65ffe",
"reference": "10df877596c9906d4110b5b905313829043f2ada", "reference": "78532d5269d984660080d8e0f4c99c5c2ea65ffe",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1690,7 +1692,7 @@
"testing", "testing",
"xunit" "xunit"
], ],
"time": "2017-09-24 07:23:38" "time": "2017-10-15T06:13:55+00:00"
}, },
{ {
"name": "phpunit/phpunit-mock-objects", "name": "phpunit/phpunit-mock-objects",
@ -1749,14 +1751,14 @@
"mock", "mock",
"xunit" "xunit"
], ],
"time": "2017-06-30 09:13:00" "time": "2017-06-30T09:13:00+00:00"
}, },
{ {
"name": "rg3/youtube-dl", "name": "rg3/youtube-dl",
"version": "2017.09.24", "version": "2017.10.20",
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://github.com/rg3/youtube-dl/archive/2017.09.24.zip", "url": "https://github.com/rg3/youtube-dl/archive/2017.10.20.zip",
"reference": null, "reference": null,
"shasum": null "shasum": null
}, },
@ -1788,7 +1790,7 @@
"GPL-2.0" "GPL-2.0"
], ],
"description": "rtmpdump binary for Linux 64 bit", "description": "rtmpdump binary for Linux 64 bit",
"time": "2016-04-12 19:17:32" "time": "2016-04-12T19:17:32+00:00"
}, },
{ {
"name": "sebastian/code-unit-reverse-lookup", "name": "sebastian/code-unit-reverse-lookup",
@ -1833,7 +1835,7 @@
], ],
"description": "Looks up which function or method a line of code belongs to", "description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
"time": "2017-03-04 06:30:41" "time": "2017-03-04T06:30:41+00:00"
}, },
{ {
"name": "sebastian/comparator", "name": "sebastian/comparator",
@ -1897,7 +1899,7 @@
"compare", "compare",
"equality" "equality"
], ],
"time": "2017-01-29 09:50:25" "time": "2017-01-29T09:50:25+00:00"
}, },
{ {
"name": "sebastian/diff", "name": "sebastian/diff",
@ -1949,7 +1951,7 @@
"keywords": [ "keywords": [
"diff" "diff"
], ],
"time": "2017-05-22 07:24:03" "time": "2017-05-22T07:24:03+00:00"
}, },
{ {
"name": "sebastian/environment", "name": "sebastian/environment",
@ -1999,7 +2001,7 @@
"environment", "environment",
"hhvm" "hhvm"
], ],
"time": "2016-11-26 07:53:53" "time": "2016-11-26T07:53:53+00:00"
}, },
{ {
"name": "sebastian/exporter", "name": "sebastian/exporter",
@ -2066,7 +2068,7 @@
"export", "export",
"exporter" "exporter"
], ],
"time": "2016-11-19 08:54:04" "time": "2016-11-19T08:54:04+00:00"
}, },
{ {
"name": "sebastian/global-state", "name": "sebastian/global-state",
@ -2117,7 +2119,7 @@
"keywords": [ "keywords": [
"global state" "global state"
], ],
"time": "2015-10-12 03:26:01" "time": "2015-10-12T03:26:01+00:00"
}, },
{ {
"name": "sebastian/object-enumerator", "name": "sebastian/object-enumerator",
@ -2163,7 +2165,7 @@
], ],
"description": "Traverses array structures and object graphs to enumerate all referenced objects", "description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/", "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
"time": "2017-02-18 15:18:39" "time": "2017-02-18T15:18:39+00:00"
}, },
{ {
"name": "sebastian/recursion-context", "name": "sebastian/recursion-context",
@ -2216,7 +2218,7 @@
], ],
"description": "Provides functionality to recursively process PHP variables", "description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context", "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
"time": "2016-11-19 07:33:16" "time": "2016-11-19T07:33:16+00:00"
}, },
{ {
"name": "sebastian/resource-operations", "name": "sebastian/resource-operations",
@ -2258,7 +2260,7 @@
], ],
"description": "Provides a list of PHP built-in functions that operate on resources", "description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations", "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
"time": "2015-07-28 20:34:47" "time": "2015-07-28T20:34:47+00:00"
}, },
{ {
"name": "sebastian/version", "name": "sebastian/version",
@ -2301,20 +2303,20 @@
], ],
"description": "Library that helps with managing the version number of Git-hosted PHP projects", "description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version", "homepage": "https://github.com/sebastianbergmann/version",
"time": "2016-10-03 07:35:21" "time": "2016-10-03T07:35:21+00:00"
}, },
{ {
"name": "squizlabs/php_codesniffer", "name": "squizlabs/php_codesniffer",
"version": "3.1.0", "version": "3.1.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "3c2d0a0fe39684ba0c1eb842a6a775d0b938d699" "reference": "d667e245d5dcd4d7bf80f26f2c947d476b66213e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/3c2d0a0fe39684ba0c1eb842a6a775d0b938d699", "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/d667e245d5dcd4d7bf80f26f2c947d476b66213e",
"reference": "3c2d0a0fe39684ba0c1eb842a6a775d0b938d699", "reference": "d667e245d5dcd4d7bf80f26f2c947d476b66213e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2352,20 +2354,20 @@
"phpcs", "phpcs",
"standards" "standards"
], ],
"time": "2017-09-19 22:47:14" "time": "2017-10-16T22:40:25+00:00"
}, },
{ {
"name": "symfony/polyfill-mbstring", "name": "symfony/polyfill-mbstring",
"version": "v1.5.0", "version": "v1.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git", "url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803" "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7c8fae0ac1d216eb54349e6a8baa57d515fe8803", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
"reference": "7c8fae0ac1d216eb54349e6a8baa57d515fe8803", "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2377,7 +2379,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.5-dev" "dev-master": "1.6-dev"
} }
}, },
"autoload": { "autoload": {
@ -2411,20 +2413,20 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2017-06-14 15:44:48" "time": "2017-10-11T12:05:26+00:00"
}, },
{ {
"name": "symfony/var-dumper", "name": "symfony/var-dumper",
"version": "v3.3.9", "version": "v3.3.10",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/var-dumper.git", "url": "https://github.com/symfony/var-dumper.git",
"reference": "89fcb5a73e0ede2be2512234c4e40457bb22b35f" "reference": "03e3693a36701f1c581dd24a6d6eea2eba2113f6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/89fcb5a73e0ede2be2512234c4e40457bb22b35f", "url": "https://api.github.com/repos/symfony/var-dumper/zipball/03e3693a36701f1c581dd24a6d6eea2eba2113f6",
"reference": "89fcb5a73e0ede2be2512234c4e40457bb22b35f", "reference": "03e3693a36701f1c581dd24a6d6eea2eba2113f6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2479,7 +2481,7 @@
"debug", "debug",
"dump" "dump"
], ],
"time": "2017-08-27 14:52:21" "time": "2017-10-02T06:42:24+00:00"
}, },
{ {
"name": "webmozart/assert", "name": "webmozart/assert",
@ -2529,7 +2531,7 @@
"check", "check",
"validate" "validate"
], ],
"time": "2016-11-23 20:04:58" "time": "2016-11-23T20:04:58+00:00"
} }
], ],
"aliases": [], "aliases": [],

View file

@ -2,13 +2,13 @@
font-family: 'Open Sans'; font-family: 'Open Sans';
font-style: normal; font-style: normal;
font-weight: 300; font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(../bower_components/opensans-googlefont/OpenSans-Light.ttf); src: local('Open Sans Light'), local('OpenSans-Light'), url(../node_modules/open-sans-fontface/fonts/Light/OpenSans-Regular.ttf);
} }
@font-face { @font-face {
font-family: 'Open Sans'; font-family: 'Open Sans';
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(../bower_components/opensans-googlefont/OpenSans-Regular.ttf); src: local('Open Sans'), local('OpenSans'), url(../node_modules/open-sans-fontface/fonts/Regular/OpenSans-Regular.ttf);
} }
.small-font { .small-font {

View file

@ -24,6 +24,10 @@ if ($config->uglyUrls) {
$container['router'] = new UglyRouter(); $container['router'] = new UglyRouter();
} }
$container['view'] = ViewFactory::create($container); $container['view'] = ViewFactory::create($container);
if (!class_exists('Locale')) {
die('You need to install the intl extension for PHP.');
}
$container['locale'] = new LocaleManager($_COOKIE); $container['locale'] = new LocaleManager($_COOKIE);
$app->add(new LocaleMiddleware($container)); $app->add(new LocaleMiddleware($container));
@ -51,4 +55,9 @@ $app->get(
'/locale/{locale}', '/locale/{locale}',
[$controller, 'locale'] [$controller, 'locale']
)->setName('locale'); )->setName('locale');
try {
$app->run(); $app->run();
} catch (\SmartyException $e) {
die('Smarty could not compile the template file: '.$e->getMessage());
}

4064
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,30 +1,30 @@
{ {
"name": "alltube", "name": "alltube",
"description": "HTML GUI for youtube-dl", "description": "HTML GUI for youtube-dl",
"version": "0.10.1", "version": "0.10.2",
"author": "Pierre Rudloff", "author": "Pierre Rudloff",
"bugs": "https://github.com/Rudloff/alltube/issues", "bugs": "https://github.com/Rudloff/alltube/issues",
"dependencies": { "dependencies": {
"bower": "~1.8.0",
"grunt": "~1.0.1", "grunt": "~1.0.1",
"grunt-contrib-csslint": "~2.0.0", "grunt-contrib-csslint": "~2.0.0",
"grunt-contrib-cssmin": "~2.2.0", "grunt-contrib-cssmin": "~2.2.1",
"grunt-contrib-uglify": "~3.0.0", "grunt-contrib-uglify": "~3.1.0",
"grunt-potomo": "~3.5.0" "grunt-potomo": "~3.5.0",
"open-sans-fontface": "~1.4.0"
}, },
"devDependencies": { "devDependencies": {
"grunt-contrib-compress": "~1.4.1", "grunt-contrib-compress": "~1.4.1",
"grunt-contrib-watch": "~1.0.0", "grunt-contrib-watch": "~1.0.0",
"grunt-fixpack": "~0.1.0", "grunt-fixpack": "~0.1.0",
"grunt-githash": "~0.1.3", "grunt-githash": "~0.1.3",
"grunt-jslint": "~1.1.14", "grunt-jslint": "~1.1.15",
"grunt-jsonlint": "~1.1.0", "grunt-jsonlint": "~1.1.0",
"grunt-phpcs": "~0.4.0", "grunt-phpcs": "~0.4.0",
"grunt-phpdocumentor": "~0.4.1", "grunt-phpdocumentor": "~0.4.1",
"grunt-phpunit": "~0.3.6" "grunt-phpunit": "~0.3.6"
}, },
"engines": { "engines": {
"npm": "~3" "yarn": ">= 1.0.0"
}, },
"homepage": "https://www.alltubedownload.net/", "homepage": "https://www.alltubedownload.net/",
"keywords": [ "keywords": [
@ -40,6 +40,6 @@
"url": "https://github.com/Rudloff/alltube.git" "url": "https://github.com/Rudloff/alltube.git"
}, },
"scripts": { "scripts": {
"postinstall": "node node_modules/.bin/bower install && node node_modules/.bin/grunt" "postinstall": "grunt"
} }
} }

View file

@ -70,7 +70,7 @@ You probably don't have the minified files (in the `dist` folder).
You need to either: You need to either:
* Use a [release package](https://github.com/Rudloff/alltube/releases) * Use a [release package](https://github.com/Rudloff/alltube/releases)
* Run `npm install` (see detailed instructions in the [README](../README.md#from-git)) * Run `yarn install` (see detailed instructions in the [README](../README.md#from-git))
## I get a 404 error on every page except the index ## I get a 404 error on every page except the index

View file

@ -64,6 +64,15 @@ class LocaleMiddlewareTest extends \PHPUnit_Framework_TestCase
$this->assertNull($this->middleware->testLocale([])); $this->assertNull($this->middleware->testLocale([]));
} }
/**
* Mock function that does nothing.
*
* @return void
*/
public function nothing()
{
}
/** /**
* Test the __invoke() function. * Test the __invoke() function.
* *
@ -75,8 +84,7 @@ class LocaleMiddlewareTest extends \PHPUnit_Framework_TestCase
$this->middleware->__invoke( $this->middleware->__invoke(
$request->withHeader('Accept-Language', 'fr-FR'), $request->withHeader('Accept-Language', 'fr-FR'),
new Response(), new Response(),
function () { [$this, 'nothing']
}
); );
} }
@ -91,8 +99,7 @@ class LocaleMiddlewareTest extends \PHPUnit_Framework_TestCase
$this->middleware->__invoke( $this->middleware->__invoke(
$request->withoutHeader('Accept-Language'), $request->withoutHeader('Accept-Language'),
new Response(), new Response(),
function () { [$this, 'nothing']
}
); );
} }

1767
yarn.lock Normal file

File diff suppressed because it is too large Load diff