ynab_convert 1.0.4 → 1.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ad8f2a7b8c6b00d895032525413d35d4879da80be21e0b9fc852e1d413dbaa0
4
- data.tar.gz: 99b9168cb23390fe15deec8f0c9c3c27cda183f95867b2849d79fa4e4a704c4d
3
+ metadata.gz: 3d04e0b626a2fc75009e2eb5aee5d7693b0c7882bc82a493380ea697df2f0dc1
4
+ data.tar.gz: e79c99994f87108164b22a75a4a5fb806380bd56af092405a653d40487bdbd71
5
5
  SHA512:
6
- metadata.gz: 630775dd15ab4f65a32c6dbe9617bea36c0721ff9d5cca49ee986f4e04831fa9335b41b996b2b3f69bbce630e452ae9045d3d98ec9b3d6862c84f6fb0077a1a6
7
- data.tar.gz: 3bdf9b06d5327815fc31b8b3b9a9f6fb52e606ae6dc900501ff8fdf0671c110effe02dd5ca625fed0c3bbeb884b9572ff18ce7b9e46b8c21dd61d0a4b685956c
6
+ metadata.gz: 0f99dbb991b1cb948579e5531e2deb2a6353fca1b16709822122c24a2afe40854e12136a8eec8c0167e807c3ce32e4d4cf659c8380fa1700654d535e3ac8e44e
7
+ data.tar.gz: 250e64b972b77f55e4805ec8ba53b45bcc348bd3e2e7447dc781d5487979205a4f9d0f157730920e69d08e86f3c06618e6a1921aeb387fb994d6b08bbc642793
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ynab_convert (1.0.4)
4
+ ynab_convert (1.0.7)
5
5
  i18n
6
6
  slop
7
7
 
@@ -59,12 +59,26 @@ 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", ", QRR", two digits then five groups of five digits
67
+ # then ", TN" so we discard it; YNAB4 being unable to automatically
68
+ # categorize new transactions at the same store/payee because the payee
69
+ # always looks different (thanks to the variable nature of the appended
70
+ # junk).
71
+ # See `spec/fixtures/ubs_chequing/statement.csv` L2 and L18--22
72
+
73
+ # rubocop:disable Metrics/LineLength
74
+ junk_desc_regex = /,? (O[FN]|ESR|QRR|\d{2} \d{5} \d{5} \d{5} \d{5} \d{5}, TN)/
75
+ # rubocop:enable Metrics/LineLength
76
+
63
77
  [
64
78
  row[headers[:payee_line_1]],
65
79
  row[headers[:payee_line_2]],
66
80
  row[headers[:payee_line_3]]
67
- ].join(' ')
81
+ ].join(' ').split(junk_desc_regex).first
68
82
  end
69
83
 
70
84
  def register_custom_converters
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YnabConvert
4
- VERSION = '1.0.4'
4
+ VERSION = '1.0.7'
5
5
  end
data/ynab_convert.gemspec CHANGED
@@ -13,6 +13,11 @@ Gem::Specification.new do |spec|
13
13
  spec.summary = 'Convert online banking CSV files to YNAB 4 format.'
14
14
  spec.homepage = 'https://github.com/coaxial/ynab_convert'
15
15
  spec.license = 'MIT'
16
+ spec.description = <<~DESC
17
+ Utility to convert CSV statements into the YNAB4 format for easier
18
+ transation import. Supports several banks and can easily be extended to
19
+ add more.
20
+ DESC
16
21
 
17
22
  spec.required_ruby_version = '~> 2.6'
18
23
 
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
4
+ version: 1.0.7
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-05 00:00:00.000000000 Z
11
+ date: 2022-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -192,7 +192,10 @@ dependencies:
192
192
  - - ">="
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
- description:
195
+ description: |
196
+ Utility to convert CSV statements into the YNAB4 format for easier
197
+ transation import. Supports several banks and can easily be extended to
198
+ add more.
196
199
  email:
197
200
  - hi@64b.it
198
201
  executables: