cmxl 1.4.1 → 1.4.2
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/CHANGELOG.mdown +15 -11
- data/lib/cmxl/fields/account_balance.rb +1 -1
- data/lib/cmxl/statement.rb +1 -1
- data/lib/cmxl/version.rb +1 -1
- data/spec/fields/account_balance_spec.rb +7 -0
- data/spec/fixtures/lines/account_balance_debit_broken.txt +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3e78d30d71b355b7ac3b69166d19b07f8c2476b0060fe62963367f817bfcef0
|
4
|
+
data.tar.gz: 92e4ddeb3db1528466f80c60817bf851fb8ff736a27a360db7752b5ace03d1e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7b08fef90747fb155744813e72e3e771d5e86d45d5e61a48742cb20d59aedb14663474f7a06600bcedaad7858d1f3d4706c4c7748e7444aff62564da796daf0
|
7
|
+
data.tar.gz: 1f0d3b254dc14f10a37c275ccfb949356e5b37fa533aa0558fc0dbf11593e9f049d1593beae5bb4ce4e356732233b895d4b36c5a84d514944d47500ccb948243
|
data/CHANGELOG.mdown
CHANGED
@@ -1,37 +1,41 @@
|
|
1
|
+
# 1.4.2
|
2
|
+
|
3
|
+
- `[ENHANCEMENT]` handles broken account data without blowing up
|
4
|
+
|
1
5
|
# 1.4.1
|
2
6
|
|
3
|
-
- [BUGFIX] changes entry date calculation for transaction
|
7
|
+
- `[BUGFIX]` changes entry date calculation for transaction
|
4
8
|
Thanks to [@grncdr](https://github.com/grncdr)
|
5
9
|
|
6
10
|
# 1.4.0
|
7
11
|
|
8
|
-
- [FEATURE] adds ability to parse non-numerical tags ([#23](https://github.com/railslove/cmxl/issues/23)) \
|
12
|
+
- `[FEATURE]` adds ability to parse non-numerical tags ([#23](https://github.com/railslove/cmxl/issues/23)) \
|
9
13
|
Thanks to [@prometh07](https://github.com/prometh07)
|
10
14
|
|
11
15
|
# 1.3.0
|
12
16
|
|
13
|
-
- [FEATURE] adds MT942 compatibility
|
17
|
+
- `[FEATURE]` adds MT942 compatibility
|
14
18
|
|
15
19
|
# 1.2.0
|
16
20
|
|
17
|
-
- [FEATURE] strips mt940 header if configured ([#9](https://github.com/railslove/cmxl/issues/9))
|
21
|
+
- `[FEATURE]` strips mt940 header if configured ([#9](https://github.com/railslove/cmxl/issues/9))
|
18
22
|
```ruby
|
19
23
|
Cmxl.config[:strip_headers] = true
|
20
24
|
```
|
21
25
|
|
22
26
|
# 1.1.1
|
23
27
|
|
24
|
-
- [BUGFIX] prevents short bank references from swallowing supplementary details delimiter
|
28
|
+
- `[BUGFIX]` prevents short bank references from swallowing supplementary details delimiter
|
25
29
|
|
26
30
|
# 1.1.0
|
27
31
|
|
28
|
-
- [FEATURE] adds support for supplementary details in transactions (Field 61, Subfield 9) ([#18](https://github.com/railslove/cmxl/issues/18))
|
32
|
+
- `[FEATURE]` adds support for supplementary details in transactions (Field 61, Subfield 9) ([#18](https://github.com/railslove/cmxl/issues/18))
|
29
33
|
|
30
34
|
# 1.0.0
|
31
35
|
|
32
|
-
- [FEATURE] adds support for storno transactions ([#14](https://github.com/railslove/cmxl/issues/14))
|
33
|
-
- [NOTE] full backwards compatibility
|
34
|
-
- [NOTE] same as release 0.2.2, fixing versioning
|
36
|
+
- `[FEATURE]` adds support for storno transactions ([#14](https://github.com/railslove/cmxl/issues/14))
|
37
|
+
- `[NOTE]` full backwards compatibility
|
38
|
+
- `[NOTE]` same as release 0.2.2, fixing versioning
|
35
39
|
|
36
40
|
# 0.2.1
|
37
41
|
|
@@ -48,8 +52,8 @@
|
|
48
52
|
|
49
53
|
# 0.1.3
|
50
54
|
|
51
|
-
- [BUGFIX] fixed the statement details parser. It failed in case of empty values in the SEPA details
|
55
|
+
- `[BUGFIX]` fixed the statement details parser. It failed in case of empty values in the SEPA details
|
52
56
|
|
53
57
|
# 0.1.2
|
54
58
|
|
55
|
-
- [BUGFIX] fixed the statement details parser. It failed in case of empty values in the sub fields
|
59
|
+
- `[BUGFIX]` fixed the statement details parser. It failed in case of empty values in the sub fields
|
@@ -2,7 +2,7 @@ module Cmxl
|
|
2
2
|
module Fields
|
3
3
|
class AccountBalance < Field
|
4
4
|
self.tag = 60
|
5
|
-
self.parser = /(?<funds_code>\A[a-zA-Z]{1})(?<date>\d{6})(?<currency>[a-zA-Z]{3})(?<amount>[\d|,|\.]{
|
5
|
+
self.parser = /(?<funds_code>\A[a-zA-Z]{1})(?<date>\d{6})(?<currency>[a-zA-Z]{3})(?<amount>[\d|,|\.]{1,15})/i
|
6
6
|
|
7
7
|
def date
|
8
8
|
to_date(data['date'])
|
data/lib/cmxl/statement.rb
CHANGED
data/lib/cmxl/version.rb
CHANGED
@@ -39,4 +39,11 @@ describe Cmxl::Fields::AccountBalance do
|
|
39
39
|
it { expect(subject.amount_in_cents).to eql(14_764) }
|
40
40
|
it { expect(subject.sign).to eql(-1) }
|
41
41
|
end
|
42
|
+
|
43
|
+
context 'broken debit' do
|
44
|
+
subject { Cmxl::Fields::AccountBalance.parse(fixture_line(:account_balance_debit_broken)) }
|
45
|
+
|
46
|
+
it { expect(subject.amount).to eql(0.0) }
|
47
|
+
it { expect(subject.amount_in_cents).to eql(0) }
|
48
|
+
end
|
42
49
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
:60F:D140829EUR0,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cmxl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Bumann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -143,6 +143,7 @@ files:
|
|
143
143
|
- spec/fields/vmk_summary_spec.rb
|
144
144
|
- spec/fixtures/lines/account_balance_credit.txt
|
145
145
|
- spec/fixtures/lines/account_balance_debit.txt
|
146
|
+
- spec/fixtures/lines/account_balance_debit_broken.txt
|
146
147
|
- spec/fixtures/lines/account_identification_iban.txt
|
147
148
|
- spec/fixtures/lines/account_identification_legacy.txt
|
148
149
|
- spec/fixtures/lines/available_balance.txt
|
@@ -218,6 +219,7 @@ test_files:
|
|
218
219
|
- spec/fields/vmk_summary_spec.rb
|
219
220
|
- spec/fixtures/lines/account_balance_credit.txt
|
220
221
|
- spec/fixtures/lines/account_balance_debit.txt
|
222
|
+
- spec/fixtures/lines/account_balance_debit_broken.txt
|
221
223
|
- spec/fixtures/lines/account_identification_iban.txt
|
222
224
|
- spec/fixtures/lines/account_identification_legacy.txt
|
223
225
|
- spec/fixtures/lines/available_balance.txt
|