Skip to content

Commit

Permalink
Merge branch 'dev' into 0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
DariusIII committed Mar 9, 2018
2 parents 8a227ec + de4414d commit 0084c6d
Show file tree
Hide file tree
Showing 15 changed files with 364 additions and 154 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ test.php

/.idea/
/vendor/*
/resources/covers/*
/resources/nzb/*
/resources/tmp/*
!/resources/tmp/unrar/
/public/assets/*
!/public/assets/js/
!/public/assets/css/
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,6 @@ before_script:


script:
- vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
- vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
after_success:
- travis_retry php vendor/bin/php-coveralls
12 changes: 12 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
2018-03-09 DariusIII
* Chg: Update groupfixrelnames query
* Chg: Revert change that was not tested in groupfixrelnames.php
* Chg: Update phpunit.xml
* Chg: Possible fix for code coverage report
* Chg: Update laravel/tinker to version 1.0.5
2018-03-08 DariusIII
* Chg: Add code coverage report
* Chg: Remove MiscSorter processed releases check from groupfixrelnames.php
* Chg: Update nntmux install command
* Chg: Update ytake-laravel-smarty.php
* Chg: Uningnore folders and remove gitmodules file (unused because it is related to li3 we do not use anymore)
* Chg: Update erusev/parsedown to latest version
* Fix: Fix displaying of flag images
2018-03-07 DariusIII
* Chg: Update laravel/framework to version 5.6.9 and laravel/tinker to version 1.0.4
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<a href="https://packagist.org/packages/nntmux/newznab-tmux"><img src="https://poser.pugx.org/nntmux/newznab-tmux/v/stable.svg" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/nntmux/newznab-tmux"><img src="https://poser.pugx.org/nntmux/newznab-tmux/license.svg" alt="License"></a>
<a href="https://styleci.io/repos/22602573"><img src="https://styleci.io/repos/22602573/shield?branch=dev" alt="StyleCI"></a>
<a href='https://coveralls.io/github/NNTmux/newznab-tmux?branch=0.x'><img src='https://coveralls.io/repos/github/NNTmux/newznab-tmux/badge.svg?branch=dev' alt='Coverage Status' /></a>
</p>


Expand Down
35 changes: 8 additions & 27 deletions app/Console/Commands/InstallNntmux.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ public function __construct()
*/
public function handle()
{
if (! \defined('NN_INSTALLER')) {
\define('NN_INSTALLER', true);
}

$error = false;

if (env('DB_SYSTEM') !== 'mysql') {
Expand Down Expand Up @@ -126,7 +122,7 @@ public function handle()
}

if (! $error && $this->addAdminUser()) {
@file_put_contents(NN_ROOT.'_install/install.lock', '');
@file_put_contents(base_path().'_install/install.lock', '');
$this->info('Generating application key');
$process = new Process('php artisan key:generate --force');
$process->setTimeout(600);
Expand Down Expand Up @@ -179,10 +175,10 @@ protected function updatePatch(): bool
*/
protected function updatePaths()
{
$covers_path = NN_RES.'covers'.DS;
$nzb_path = NN_RES.'nzb'.DS;
$tmp_path = NN_RES.'tmp'.DS;
$unrar_path = $tmp_path.'unrar'.DS;
$covers_path = base_path().'resources/covers/';
$nzb_path = base_path().'resources/nzb/';
$tmp_path = base_path().'resources/tmp/';
$unrar_path = $tmp_path.'unrar/';

$nzbPathCheck = is_writable($nzb_path);
if ($nzbPathCheck === false) {
Expand All @@ -191,11 +187,6 @@ protected function updatePaths()
return false;
}

$lastChar = substr($nzb_path, \strlen($nzb_path) - 1);
if ($lastChar !== '/') {
$nzb_path .= '/';
}

if (! file_exists($unrar_path)) {
$this->info('Creating missing '.$unrar_path.' folder');
if (! @mkdir($unrar_path) && ! is_dir($unrar_path)) {
Expand All @@ -210,27 +201,17 @@ protected function updatePaths()
return false;
}

$lastChar = substr($unrar_path, \strlen($unrar_path) - 1);
if ($lastChar !== '/') {
$unrar_path .= '/';
}

$coversPathCheck = is_writable($covers_path);
if ($coversPathCheck === false) {
$this->warn($covers_path.' is not writable. Please fix folder permissions');

return false;
}

$lastChar = substr($covers_path, \strlen($covers_path) - 1);
if ($lastChar !== '/') {
$covers_path .= '/';
}

return [
'nzb_path' => $nzb_path,
'covers_path' => $covers_path,
'unrar_path' => $unrar_path,
'nzb_path' => str_finish($nzb_path, '/'),
'covers_path' => str_finish($covers_path, '/'),
'unrar_path' => str_finish($unrar_path, '/'),
];
}

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
"moontoast/math": "^1.1",
"nunomaduro/collision": "^1.1",
"orangehill/iseed": "^2.5",
"php-coveralls/php-coveralls": "^2.0",
"phpunit/phpunit": "^7.0",
"xethron/migrations-generator": "^2.0"
},
Expand Down
Loading

0 comments on commit 0084c6d

Please sign in to comment.