ynab_convert 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/ynab_convert/processor/ubs_chequing.rb +12 -2
- data/lib/ynab_convert/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 58ad75b7f1c6b3093257d8ffb95068967324a621be48bc6e08063548d4a9f2bd
|
|
4
|
+
data.tar.gz: 70bc35076e068aece838b52853f5b7f7656199b67e5b2f3ca78a4aec66037ffb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 56621762f02d97515a0f3ce829d5b7bfe9ffb1fe862a6b0e92197ac2b555abe84102900f7eef28f67c7c0570efdf0bc3ea8005c8adb68f9c598a7f0fba94f6e9
|
|
7
|
+
data.tar.gz: 86a99a7d007c05b7aa3f6e6f3ed211ac009989bd8e31fefbef0db3d9a503dc765ecea825b9e1f6d237d2e26c7c59a455010f975183085037cf8bd2dcb95e8a04
|
data/Gemfile.lock
CHANGED
|
@@ -59,12 +59,22 @@ module Processor
|
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
def transaction_payee(row)
|
|
62
|
-
# Transaction description is spread over 3 columns
|
|
62
|
+
# Transaction description is spread over 3 columns.
|
|
63
|
+
# Moreover, UBS thought wise to append a bunch of junk information after
|
|
64
|
+
# the transaction details within the third description field. *Most* of
|
|
65
|
+
# this junk starts after the meaningful data and starts with ", OF",
|
|
66
|
+
# ", ON", ", ESR", two digits then five groups of five digits then ", TN"
|
|
67
|
+
# so we discard it; YNAB4 being unable to automatically categorize new
|
|
68
|
+
# transactions at the same store/payee because the payee always looks
|
|
69
|
+
# different (thanks to the variable nature of the appended junk).
|
|
70
|
+
# See `spec/fixtures/ubs_chequing/statement.csv` L18 and L2.
|
|
71
|
+
junk_desc_regex = /, (O[FN]|ESR|\d{2} \d{5} \d{5} \d{5} \d{5} \d{5}, TN)/
|
|
72
|
+
|
|
63
73
|
[
|
|
64
74
|
row[headers[:payee_line_1]],
|
|
65
75
|
row[headers[:payee_line_2]],
|
|
66
76
|
row[headers[:payee_line_3]]
|
|
67
|
-
].join(' ')
|
|
77
|
+
].join(' ').split(junk_desc_regex).first
|
|
68
78
|
end
|
|
69
79
|
|
|
70
80
|
def register_custom_converters
|
data/lib/ynab_convert/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ynab_convert
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- coaxial
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-03-
|
|
11
|
+
date: 2022-03-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|