Cleanup root folder (fixes #110)
This commit is contained in:
parent
c1c6c2dd97
commit
f9203706f7
21 changed files with 17 additions and 17 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -9,6 +9,6 @@ ffmpeg-*/
|
||||||
alltube-*.zip
|
alltube-*.zip
|
||||||
coverage/
|
coverage/
|
||||||
bower_components/
|
bower_components/
|
||||||
config.yml
|
config/config.yml
|
||||||
docs/
|
docs/
|
||||||
clover.xml
|
clover.xml
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
Before opening a new issue, make sure that:
|
Before opening a new issue, make sure that:
|
||||||
|
|
||||||
* It has not already been [reported](https://github.com/Rudloff/alltube/issues).
|
* It has not already been [reported](https://github.com/Rudloff/alltube/issues).
|
||||||
* You read the [README](README.md) and the [FAQ](FAQ.md).
|
* You read the [README](README.md) and the [FAQ](resources/FAQ.md).
|
||||||
* You can provide **logs**.
|
* You can provide **logs**.
|
||||||
|
|
|
@ -7,7 +7,7 @@ RUN docker-php-ext-install intl
|
||||||
RUN docker-php-ext-install zip
|
RUN docker-php-ext-install zip
|
||||||
RUN a2enmod rewrite
|
RUN a2enmod rewrite
|
||||||
RUN curl -sS https://getcomposer.org/installer | php
|
RUN curl -sS https://getcomposer.org/installer | php
|
||||||
COPY 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 npm install
|
||||||
|
|
|
@ -68,7 +68,7 @@ module.exports = function (grunt) {
|
||||||
options: {
|
options: {
|
||||||
archive: 'alltube-<%= githash.main.tag %>.zip'
|
archive: 'alltube-<%= githash.main.tag %>.zip'
|
||||||
},
|
},
|
||||||
src: ['*.php', '!config.yml', 'dist/**', '.htaccess', 'img/**', 'LICENSE', 'README.md', 'robots.txt', 'sitemap.xml', 'templates/**', 'templates_c/', 'vendor/**', 'classes/**', 'controllers/**', 'bower_components/**', '!vendor/ffmpeg/**', '!vendor/bin/ffmpeg', '!vendor/phpunit/**', '!vendor/squizlabs/**']
|
src: ['*.php', '!config/config.yml', 'dist/**', '.htaccess', 'img/**', 'LICENSE', 'README.md', 'robots.txt', 'resources/sitemap.xml', 'templates/**', 'templates_c/', 'vendor/**', 'classes/**', 'controllers/**', 'bower_components/**', '!vendor/ffmpeg/**', '!vendor/bin/ffmpeg', '!vendor/phpunit/**', '!vendor/squizlabs/**']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
phpdocumentor: {
|
phpdocumentor: {
|
||||||
|
@ -80,7 +80,7 @@ module.exports = function (grunt) {
|
||||||
},
|
},
|
||||||
jsonlint: {
|
jsonlint: {
|
||||||
manifests: {
|
manifests: {
|
||||||
src: ['*.json', '*.webapp'],
|
src: ['*.json', 'resources/*.json'],
|
||||||
options: {
|
options: {
|
||||||
format: true
|
format: true
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ composer install
|
||||||
If you want to use a custom config, you need to create a config file:
|
If you want to use a custom config, you need to create a config file:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cp config.example.yml config.yml
|
cp config/config.example.yml config/config.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
## PHP requirements
|
## PHP requirements
|
||||||
|
@ -168,7 +168,7 @@ You can also have a look at this [example project](https://github.com/Rudloff/al
|
||||||
|
|
||||||
## FAQ
|
## FAQ
|
||||||
|
|
||||||
Please read the [FAQ](FAQ.md) before reporting any issue.
|
Please read the [FAQ](resources/FAQ.md) before reporting any issue.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
|
@ -126,13 +126,13 @@ class Config
|
||||||
*
|
*
|
||||||
* @return Config
|
* @return Config
|
||||||
*/
|
*/
|
||||||
public static function getInstance($yamlfile = 'config.yml')
|
public static function getInstance($yamlfile = 'config/config.yml')
|
||||||
{
|
{
|
||||||
$yamlPath = __DIR__.'/../'.$yamlfile;
|
$yamlPath = __DIR__.'/../'.$yamlfile;
|
||||||
if (is_null(self::$instance) || self::$instance->file != $yamlfile) {
|
if (is_null(self::$instance) || self::$instance->file != $yamlfile) {
|
||||||
if (is_file($yamlfile)) {
|
if (is_file($yamlfile)) {
|
||||||
$options = Yaml::parse(file_get_contents($yamlPath));
|
$options = Yaml::parse(file_get_contents($yamlPath));
|
||||||
} elseif ($yamlfile == 'config.yml' || empty($yamlfile)) {
|
} elseif ($yamlfile == 'config/config.yml' || empty($yamlfile)) {
|
||||||
/*
|
/*
|
||||||
Allow for the default file to be missing in order to
|
Allow for the default file to be missing in order to
|
||||||
not surprise users that did not create a config file
|
not surprise users that did not create a config file
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
"extra": {
|
"extra": {
|
||||||
"paas": {
|
"paas": {
|
||||||
"nginx-includes": [
|
"nginx-includes": [
|
||||||
"nginx.conf"
|
"resources/nginx.conf"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -9,7 +9,7 @@ You can ususally download the video by doing *File > Save to* or *ctrl + S*.
|
||||||
|
|
||||||
## How do I change config parameters?
|
## How do I change config parameters?
|
||||||
|
|
||||||
You need to create a YAML file called `config.yml` at the root of your project.
|
You need to create a YAML file called `config.yml` in the `config/` folder.
|
||||||
Here are the parameters that you can set:
|
Here are the parameters that you can set:
|
||||||
|
|
||||||
* `youtubedl`: path to your youtube-dl binary
|
* `youtubedl`: path to your youtube-dl binary
|
|
@ -1 +1 @@
|
||||||
Sitemap: http://alltubedownload.net/sitemap.xml
|
Sitemap: http://alltubedownload.net/resources/sitemap.xml
|
||||||
|
|
|
@ -20,6 +20,6 @@
|
||||||
<meta name="twitter:creator" content="@Tael67" />
|
<meta name="twitter:creator" content="@Tael67" />
|
||||||
<script type="text/javascript" src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"></script>
|
<script type="text/javascript" src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"></script>
|
||||||
<meta name="theme-color" content="#4F4F4F">
|
<meta name="theme-color" content="#4F4F4F">
|
||||||
<link rel="manifest" href="{base_url}/manifest.json" />
|
<link rel="manifest" href="{base_url}/resources/manifest.json" />
|
||||||
</head>
|
</head>
|
||||||
<body class="{$class}">
|
<body class="{$class}">
|
||||||
|
|
|
@ -24,7 +24,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
|
||||||
*/
|
*/
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->config = Config::getInstance('config_test.yml');
|
$this->config = Config::getInstance('config/config_test.yml');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -83,7 +83,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
|
||||||
Config::destroyInstance();
|
Config::destroyInstance();
|
||||||
putenv('CONVERT=1');
|
putenv('CONVERT=1');
|
||||||
putenv('PYTHON=foo');
|
putenv('PYTHON=foo');
|
||||||
$config = Config::getInstance('config_test.yml');
|
$config = Config::getInstance('config/config_test.yml');
|
||||||
$this->assertEquals($config->convert, true);
|
$this->assertEquals($config->convert, true);
|
||||||
$this->assertEquals($config->python, 'foo');
|
$this->assertEquals($config->python, 'foo');
|
||||||
putenv('CONVERT');
|
putenv('CONVERT');
|
||||||
|
|
|
@ -55,7 +55,7 @@ class FrontControllerTest extends \PHPUnit_Framework_TestCase
|
||||||
$this->request = Request::createFromEnvironment(Environment::mock());
|
$this->request = Request::createFromEnvironment(Environment::mock());
|
||||||
$this->response = new Response();
|
$this->response = new Response();
|
||||||
$this->container['view'] = ViewFactory::create($this->container, $this->request);
|
$this->container['view'] = ViewFactory::create($this->container, $this->request);
|
||||||
$this->controller = new FrontController($this->container, Config::getInstance('config_test.yml'));
|
$this->controller = new FrontController($this->container, Config::getInstance('config/config_test.yml'));
|
||||||
$this->container['router']->map(['GET'], '/', [$this->controller, 'index'])
|
$this->container['router']->map(['GET'], '/', [$this->controller, 'index'])
|
||||||
->setName('index');
|
->setName('index');
|
||||||
$this->container['router']->map(['GET'], '/video', [$this->controller, 'video'])
|
$this->container['router']->map(['GET'], '/video', [$this->controller, 'video'])
|
||||||
|
|
|
@ -25,7 +25,7 @@ class VideoDownloadTest extends \PHPUnit_Framework_TestCase
|
||||||
*/
|
*/
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->download = new VideoDownload(Config::getInstance('config_test.yml'));
|
$this->download = new VideoDownload(Config::getInstance('config/config_test.yml'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue