mt940 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/VERSION +1 -1
- data/lib/mt940/banks/rabobank.rb +7 -1
- data/mt940.gemspec +2 -2
- data/test/fixtures/rabobank.txt +6 -3
- data/test/test_mt940_rabobank.rb +6 -6
- metadata +3 -3
data/CHANGELOG
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.4
|
data/lib/mt940/banks/rabobank.rb
CHANGED
@@ -16,7 +16,13 @@ class MT940::Rabobank < MT940::Base
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def parse_tag_86
|
19
|
-
|
19
|
+
if @line.match(/^:86:(.*)$/)
|
20
|
+
if @transaction.description.nil?
|
21
|
+
@transaction.description= $1.strip
|
22
|
+
else
|
23
|
+
@transaction.description += ' ' +$1.strip
|
24
|
+
end
|
25
|
+
end
|
20
26
|
end
|
21
27
|
|
22
28
|
end
|
data/mt940.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{mt940}
|
8
|
-
s.version = "0.6.
|
8
|
+
s.version = "0.6.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["dovadi"]
|
12
|
-
s.date = %q{2011-07-
|
12
|
+
s.date = %q{2011-07-13}
|
13
13
|
s.description = %q{A basic MT940 parser with implementations for Dutch banks.}
|
14
14
|
s.email = %q{frank.oxener@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/test/fixtures/rabobank.txt
CHANGED
@@ -3,8 +3,11 @@
|
|
3
3
|
:25:1291.99.348EUR
|
4
4
|
:28:00000/00
|
5
5
|
:60F:C110614EUR000000000473,17
|
6
|
-
:61:
|
7
|
-
:86:
|
6
|
+
:61:110527D000000001213,28N0440121470966 W.P. Jansen
|
7
|
+
:86:Terugboeking
|
8
|
+
:86:NIET AKKOORD MET AFSCHRIJVING
|
9
|
+
:86:KOSTEN KINDEROPVANG JUNI
|
10
|
+
:86:20095731
|
8
11
|
:62F:C110615EUR000000000395,82
|
9
12
|
|
10
13
|
:20:940A110616
|
@@ -20,6 +23,6 @@
|
|
20
23
|
:61:110617D000000000044,95N0600733959555 T-MOBILE NETHERLANDS BV
|
21
24
|
:86:BETALINGSKENM. 123456789
|
22
25
|
:86:FACTUURNUMMER 987654321
|
23
|
-
:61:110721D000000000236,56N030NONREF TOMTE TUMMETOT AMERSFOORT
|
26
|
+
:61:110721D000000000236,56N030NONREF TOMTE TUMMETOT AMERSFOORT
|
24
27
|
:86:Betaalautomaat 14:23 pasnr. 065
|
25
28
|
:62F:C110617EUR0000000001250,87
|
data/test/test_mt940_rabobank.rb
CHANGED
@@ -7,7 +7,7 @@ class TestMt940Rabobank < Test::Unit::TestCase
|
|
7
7
|
@transactions = MT940::Base.transactions(file_name)
|
8
8
|
@transaction = @transactions.first
|
9
9
|
end
|
10
|
-
|
10
|
+
|
11
11
|
should 'have the correct number of transactions' do
|
12
12
|
assert_equal 3, @transactions.size
|
13
13
|
end
|
@@ -19,7 +19,7 @@ class TestMt940Rabobank < Test::Unit::TestCase
|
|
19
19
|
|
20
20
|
context 'Contra account' do
|
21
21
|
should 'be determined in case of a GIRO account' do
|
22
|
-
assert_equal '
|
22
|
+
assert_equal '121470966', @transaction.contra_account
|
23
23
|
end
|
24
24
|
|
25
25
|
should 'be determined in case of a regular bank' do
|
@@ -32,19 +32,19 @@ class TestMt940Rabobank < Test::Unit::TestCase
|
|
32
32
|
end
|
33
33
|
|
34
34
|
should 'have an amount' do
|
35
|
-
assert_equal -
|
35
|
+
assert_equal -1213.28, @transaction.amount
|
36
36
|
end
|
37
37
|
|
38
38
|
should 'have a contra_account_owner' do
|
39
|
-
assert_equal '
|
39
|
+
assert_equal 'W.P. Jansen', @transaction.contra_account_owner
|
40
40
|
end
|
41
41
|
|
42
42
|
should 'have a description' do
|
43
|
-
assert_equal '
|
43
|
+
assert_equal 'Terugboeking NIET AKKOORD MET AFSCHRIJVING KOSTEN KINDEROPVANG JUNI 20095731', @transaction.description
|
44
44
|
end
|
45
45
|
|
46
46
|
should 'have a date' do
|
47
|
-
assert_equal Date.new(2011,
|
47
|
+
assert_equal Date.new(2011,5,27), @transaction.date
|
48
48
|
end
|
49
49
|
|
50
50
|
should 'return its bank' do
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 6
|
8
|
-
-
|
9
|
-
version: 0.6.
|
8
|
+
- 4
|
9
|
+
version: 0.6.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- dovadi
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-07-
|
17
|
+
date: 2011-07-13 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|