Merge branch 'release/4.4.1'

This commit is contained in:
James Cole
2017-04-27 03:32:16 +02:00
12 changed files with 120 additions and 27 deletions

View File

@@ -3,6 +3,7 @@ APP_DEBUG=true
APP_FORCE_SSL=false
APP_FORCE_ROOT=
APP_KEY=TestTestTestTestTestTestTestTest
APP_LOG=daily
APP_LOG_LEVEL=debug
APP_URL=http://localhost

View File

@@ -2,6 +2,14 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## [4.4.1] - 2017-04-27
### Added
- Support for deployment on Heroku
### Fixed
- Bug in new-user routine.
## [4.4.0] - 2017-04-23
### Added
- Firefly III can now handle foreign currencies better, including some code to get the exchange rate live from the web.

1
Procfile Normal file
View File

@@ -0,0 +1 @@
web: vendor/bin/heroku-php-nginx -C nginx_app.conf public/

View File

@@ -10,7 +10,7 @@
## Try it out!
Try out Firefly III on the [demo site](https://firefly-iii.nder.be/).
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/firefly-iii/firefly-iii/tree/master)
## Installation

59
app.json Normal file
View File

@@ -0,0 +1,59 @@
{
"name": "Firefly III",
"description": "A free and open source personal finances manager",
"repository": "https://github.com/firefly-iii/firefly-iii",
"logo": "https://raw.githubusercontent.com/firefly-iii/firefly-iii/master/public/mstile-150x150.png",
"keywords": [
"finance",
"finances",
"manager",
"management",
"euro",
"dollar",
"laravel",
"money",
"currency",
"financials",
"financial",
"budgets",
"administration",
"tool",
"tooling",
"help",
"helper",
"assistant",
"planning",
"organizing",
"bills",
"personal finance",
"budgets",
"budgeting",
"budgeting tool",
"budgeting application",
"transactions",
"self hosted",
"self-hosted",
"transfers",
"management"
],
"website": "https://firefly-iii.github.io/",
"addons": [
{
"plan": "heroku-postgresql"
}
],
"scripts": {
"postdeploy": "export APP_KEY=$(php artisan --no-ansi key:generate --show)"
},
"buildpacks": [
{
"url": "heroku/php"
}
],
"env": {
"APP_KEY": {
"description": "This key is used to encrypt your data.",
"value": "base64:If1gJN4pyycXTq+WS5TjneDympKuu+8SKvTl6RZnhJg="
}
}
}

View File

@@ -112,15 +112,15 @@ class NewUserController extends Controller
private function createAssetAccount(NewUserFormRequest $request, AccountRepositoryInterface $repository): bool
{
$assetAccount = [
'name' => $request->get('bank_name'),
'iban' => null,
'accountType' => 'asset',
'virtualBalance' => 0,
'active' => true,
'accountRole' => 'defaultAsset',
'openingBalance' => round($request->input('bank_balance'), 12),
'openingBalanceDate' => new Carbon,
'openingBalanceCurrency' => intval($request->input('amount_currency_id_bank_balance')),
'name' => $request->get('bank_name'),
'iban' => null,
'accountType' => 'asset',
'virtualBalance' => 0,
'active' => true,
'accountRole' => 'defaultAsset',
'openingBalance' => round($request->input('bank_balance'), 12),
'openingBalanceDate' => new Carbon,
'currency_id' => intval($request->input('amount_currency_id_bank_balance')),
];
$repository->store($assetAccount);
@@ -137,15 +137,15 @@ class NewUserController extends Controller
private function createSavingsAccount(NewUserFormRequest $request, AccountRepositoryInterface $repository): bool
{
$savingsAccount = [
'name' => $request->get('bank_name') . ' savings account',
'iban' => null,
'accountType' => 'asset',
'virtualBalance' => 0,
'active' => true,
'accountRole' => 'savingAsset',
'openingBalance' => round($request->input('savings_balance'), 12),
'openingBalanceDate' => new Carbon,
'openingBalanceCurrency' => intval($request->input('amount_currency_id_savings_balance')),
'name' => $request->get('bank_name') . ' savings account',
'iban' => null,
'accountType' => 'asset',
'virtualBalance' => 0,
'active' => true,
'accountRole' => 'savingAsset',
'openingBalance' => round($request->input('savings_balance'), 12),
'openingBalanceDate' => new Carbon,
'currency_id' => intval($request->input('amount_currency_id_savings_balance')),
];
$repository->store($savingsAccount);

View File

@@ -106,6 +106,9 @@
"php artisan firefly:verify",
"php artisan firefly:instructions update",
"php artisan optimize"
],
"compile": [
"php artisan migrate:refresh --seed --force"
]
},
"config": {

View File

@@ -21,7 +21,7 @@ return [
'fallback_locale' => 'en_US',
'key' => env('APP_KEY'),
'cipher' => 'AES-256-CBC',
'log' => env('APP_LOG', 'daily'),
'log' => env('APP_LOG', 'errorlog'),
'log_level' => env('APP_LOG_LEVEL', 'info'),
'providers' => [

View File

@@ -9,10 +9,25 @@
* See the LICENSE file for details.
*/
// for heroku:
$databaseUrl = getenv('DATABASE_URL');
$host = '';
$username = '';
$password = '';
$database = '';
if (!($databaseUrl === false)) {
$options = parse_url($databaseUrl);
$host = $options['host'];
$username = $options['user'];
$password = $options['pass'];
$database = substr($options['path'], 1);
}
return [
'fetch' => PDO::FETCH_OBJ,
'default' => env('DB_CONNECTION', 'mysql'),
'default' => env('DB_CONNECTION', 'pgsql'),
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
@@ -36,11 +51,11 @@ return [
'pgsql' => [
'driver' => 'pgsql',
'host' => env('DB_HOST', 'localhost'),
'host' => env('DB_HOST', $host),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'database' => env('DB_DATABASE', $database),
'username' => env('DB_USERNAME', $username),
'password' => env('DB_PASSWORD', $password),
'charset' => 'utf8',
'prefix' => '',
'schema' => 'public',

View File

@@ -23,7 +23,7 @@ return [
'is_demo_site' => false,
],
'encryption' => (is_null(env('USE_ENCRYPTION')) || env('USE_ENCRYPTION') === true),
'version' => '4.4.0',
'version' => '4.4.1',
'maxUploadSize' => 5242880,
'allowedMimes' => ['image/png', 'image/jpeg', 'application/pdf'],
'list_length' => 10,

7
nginx_app.conf Normal file
View File

@@ -0,0 +1,7 @@
location / {
try_files $uri @rewriteapp;
}
location @rewriteapp {
rewrite ^(.*)$ /index.php$1 last;
}

View File

@@ -36,7 +36,6 @@ class NewUserControllerTest extends TestCase
$journalRepos->shouldReceive('first')->once()->andReturn(new TransactionJournal);
$accountRepos->shouldReceive('count')->andReturn(0);
$this->be($this->emptyUser());
$response = $this->get(route('new-user.index'));
$response->assertStatus(200);