Browse Source

Remove some CSV references

pull/1/head
James Cole 4 years ago
parent
commit
65adb56646
No known key found for this signature in database GPG Key ID: BDE6667570EADBD5
  1. 12
      .env.example
  2. 2
      .github/support.md
  3. 3
      README.md
  4. 2
      app/Http/Controllers/TokenController.php
  5. 10
      app/Services/CSV/Conversion/Task/Accounts.php
  6. 10
      app/Services/Import/Task/Accounts.php
  7. 2
      config/app.php
  8. 2
      config/mail.php
  9. 2
      resources/views/emails/import/finished.blade.php
  10. 10
      sonar-project.properties

12
.env.example

@ -13,7 +13,7 @@ FIREFLY_III_URL=
# Imagine Firefly III can be reached at "http://172.16.0.2:8082" (internal Docker network or something).
# But you have a fancy URL: "https://personal-finances.bill.microsoft.com/"
#
# In those cases, you can overrule the URL so when the CSV importer links back to Firefly III, it uses the correct URL.
# In those cases, you can overrule the URL so when the data importer links back to Firefly III, it uses the correct URL.
#
# 1) Make sure you ADD http:// or https://
# 2) Make sure you REMOVE any trailing slash from the end of the URL.
@ -59,9 +59,9 @@ USE_CACHE=false
#
# When you're running Firefly III under a (self-signed) certificate,
# the CSV importer may have trouble verifying the TLS connection.
# the data importer may have trouble verifying the TLS connection.
#
# You have a few options to make sure the CSV importer can connect
# You have a few options to make sure the data importer can connect
# to Firefly III:
# - 'true': will verify all certificates. The most secure option and the default.
# - 'file.pem': refer to a file (you must provide it) to your custom root or intermediate certificates.
@ -69,7 +69,7 @@ USE_CACHE=false
VERIFY_TLS_SECURITY=true
#
# If you want, you can set a directory here where the CSV importer will look for import configurations.
# If you want, you can set a directory here where the data importer will look for import configurations.
# This is a separate setting from the /import directory that the auto-import uses.
# Setting this variable isn't necessary. The default value is "storage/configurations".
#
@ -102,13 +102,13 @@ TRUSTED_PROXIES=
TZ=Europe/Amsterdam
#
# Use ASSET_URL when you're running the CSV importer in a sub-directory.
# Use ASSET_URL when you're running the data importer in a sub-directory.
#
ASSET_URL=
#
# Email settings.
# The CSV importer can send you a message with all errors, warnings and messages
# The data importer can send you a message with all errors, warnings and messages
# after a successful import. This is disabled by default
#
ENABLE_MAIL_REPORT=false

2
.github/support.md

@ -1,7 +1,7 @@
# Welcome to the Firefly III Data Importer on Github!
:+1::tada: Thank you for taking the time to contribute something to the Firefly III CSV importer!
:+1::tada: Thank you for taking the time to contribute something to the Firefly III Data Importer!
## Bugs

3
README.md

@ -1 +1,2 @@
# Universal importer
# Firefly III Data Importer

2
app/Http/Controllers/TokenController.php

@ -58,7 +58,7 @@ class TokenController extends Controller
*/
public function index(Request $request)
{
$pageTitle = 'CSV importer';
$pageTitle = 'Data importer';
Log::debug(sprintf('Now at %s', __METHOD__));
$configToken = (string) config('importer.access_token');
$clientId = (int) config('importer.client_id');

10
app/Services/CSV/Conversion/Task/Accounts.php

@ -117,7 +117,7 @@ class Accounts extends AbstractTask
if ('revenue' === $destination['type'] && 'withdrawal' === $transaction['type']) {
Log::warning('The found destination account is of type revenue but this is a withdrawal. Out of cheese error.');
Log::debug(
sprintf('CSV importer will submit name "%s" and IBAN "%s" and let Firefly III sort it out.', $destination['name'], $destination['iban'])
sprintf('Data importer will submit name "%s" and IBAN "%s" and let Firefly III sort it out.', $destination['name'], $destination['iban'])
);
$transaction['destination_id'] = null;
$transaction['destination_name'] = $destination['name'];
@ -131,7 +131,7 @@ class Accounts extends AbstractTask
*/
if ('expense' === $source['type'] && 'deposit' === $transaction['type']) {
Log::warning('The found source account is of type expense but this is a deposit. Out of cheese error.');
Log::debug(sprintf('CSV importer will submit name "%s" and IBAN "%s" and let Firefly III sort it out.', $source['name'], $source['iban']));
Log::debug(sprintf('Data importer will submit name "%s" and IBAN "%s" and let Firefly III sort it out.', $source['name'], $source['iban']));
$transaction['source_id'] = null;
$transaction['source_name'] = $source['name'];
$transaction['source_iban'] = $source['iban'];
@ -234,8 +234,8 @@ class Accounts extends AbstractTask
return $return;
}
// If the IBAN search result is NULL, but the IBAN itself is not null,
// CSV importer will return an array with the IBAN (and optionally the name).
// this prevents a situation where the CSV importer
// data importer will return an array with the IBAN (and optionally the name).
// this prevents a situation where the data importer
// find by name, return only if it's an asset or liability account.
@ -374,7 +374,7 @@ class Accounts extends AbstractTask
// to fix issue #4293, Firefly III will ignore this account if it's an expense or a revenue account.
if (in_array($account->type, ['expense', 'revenue'], true)) {
Log::debug('[a] CSV importer will pretend not to have found anything. Firefly III must handle the IBAN.');
Log::debug('[a] Data importer will pretend not to have found anything. Firefly III must handle the IBAN.');
return null;
}

10
app/Services/Import/Task/Accounts.php

@ -118,7 +118,7 @@ class Accounts extends AbstractTask
if ('revenue' === $destination['type'] && 'withdrawal' === $transaction['type']) {
Log::warning('The found destination account is of type revenue but this is a withdrawal. Out of cheese error.');
Log::debug(
sprintf('CSV importer will submit name "%s" and IBAN "%s" and let Firefly III sort it out.', $destination['name'], $destination['iban'])
sprintf('Data importer will submit name "%s" and IBAN "%s" and let Firefly III sort it out.', $destination['name'], $destination['iban'])
);
$transaction['destination_id'] = null;
$transaction['destination_name'] = $destination['name'];
@ -132,7 +132,7 @@ class Accounts extends AbstractTask
*/
if ('expense' === $source['type'] && 'deposit' === $transaction['type']) {
Log::warning('The found source account is of type expense but this is a deposit. Out of cheese error.');
Log::debug(sprintf('CSV importer will submit name "%s" and IBAN "%s" and let Firefly III sort it out.', $source['name'], $source['iban']));
Log::debug(sprintf('Data importer will submit name "%s" and IBAN "%s" and let Firefly III sort it out.', $source['name'], $source['iban']));
$transaction['source_id'] = null;
$transaction['source_name'] = $source['name'];
$transaction['source_iban'] = $source['iban'];
@ -235,8 +235,8 @@ class Accounts extends AbstractTask
return $return;
}
// If the IBAN search result is NULL, but the IBAN itself is not null,
// CSV importer will return an array with the IBAN (and optionally the name).
// this prevents a situation where the CSV importer
// data importer will return an array with the IBAN (and optionally the name).
// this prevents a situation where the data importer
// find by name, return only if it's an asset or liability account.
@ -375,7 +375,7 @@ class Accounts extends AbstractTask
// to fix issue #4293, Firefly III will ignore this account if it's an expense or a revenue account.
if (in_array($account->type, ['expense', 'revenue'], true)) {
Log::debug('[a] CSV importer will pretend not to have found anything. Firefly III must handle the IBAN.');
Log::debug('[a] Data importer will pretend not to have found anything. Firefly III must handle the IBAN.');
return null;
}

2
config/app.php

@ -141,7 +141,7 @@ return [
| will not be safe. Please do this before deploying an application!
|
*/
// not used by CSV importer.
// not used by data importer.
'key' => 'PSPGRY5PWJ6D1UMZLBL5BNAZIN4I1QSD',
'cipher' => 'AES-256-CBC',

2
config/mail.php

@ -105,7 +105,7 @@ return [
'from' => [
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
'name' => env('MAIL_FROM_NAME', 'Firefly III CSV Importer'),
'name' => env('MAIL_FROM_NAME', 'Firefly III Data Importer'),
],
'destination' => env('MAIL_DESTINATION', 'badly_configured@example.com'),
'enable_mail_report' => env('ENABLE_MAIL_REPORT', false),

2
resources/views/emails/import/finished.blade.php

@ -52,6 +52,6 @@ Go to Firefly III
@endcomponent
Enjoy!<br>
Firefly III CSV importer, v{{ config('csv_importer.version') }}
Firefly III Data Importer, v{{ config('importer.version') }}
@endcomponent

10
sonar-project.properties

@ -1,18 +1,18 @@
# must be unique in a given SonarQube instance
sonar.projectKey=csv-importer
sonar.projectKey=data-importer
# --- optional properties ---
# defaults to project key
#sonar.projectName=My project
# defaults to 'not provided'
sonar.projectVersion=2.2.4
sonar.projectVersion=0.1.0
# Path is relative to the sonar-project.properties file. Defaults to .
sonar.sources=app,bootstrap,database,resources/js,resources/views,routes,tests
# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8
# exclusions
# sonar.coverage.exclusions=frontend/src/classic/adminlte.js
# sonar.coverage.exclusions=frontend/src/classic/adminlte.js
Loading…
Cancel
Save