mt940 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/mt940/base.rb +2 -1
- data/lib/mt940/version.rb +1 -1
- data/test/mt940_abnamro_test.rb +2 -2
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4974b89c12da285719a0002bc6e59fe132940b3
|
4
|
+
data.tar.gz: f35f1ab7264f07e3a55196bb9adadebc083779fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb4dc9a5a936a255a97dcc605de144481cf72a49956f8d9f85ee583e3192ad72b5751adeb8549db4f8d443512f95e0dfc407566cf83700de83a98a03767253e7
|
7
|
+
data.tar.gz: 84ea5616194fd6b27c65d296dc9178a155431b7a1b0552bd3ee51a9885f0c8f7499365f245efd16d742534114fb562454469dafddffdcf9f92fff8bb8103fd86
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/lib/mt940/base.rb
CHANGED
@@ -13,13 +13,14 @@ module MT940
|
|
13
13
|
@transactions, @lines = [], []
|
14
14
|
@bank = self.class.to_s.split('::').last
|
15
15
|
file.readlines.each do |line|
|
16
|
+
line.encode!('UTF-8', 'UTF-8', :invalid => :replace)
|
16
17
|
begin_of_line?(line) ? @lines << line : @lines[-1] += line
|
17
18
|
end
|
18
19
|
end
|
19
20
|
|
20
21
|
def parse
|
21
22
|
@lines.each do |line|
|
22
|
-
@line = line.strip.gsub(/\n/,'')
|
23
|
+
@line = line.strip.gsub(/\n|\r/,'').gsub(/\s{2,}/,' ')
|
23
24
|
if @line.match(/^:(\d{2}F?):/)
|
24
25
|
case $1
|
25
26
|
when '25'
|
data/lib/mt940/version.rb
CHANGED
data/test/mt940_abnamro_test.rb
CHANGED
@@ -29,11 +29,11 @@ class TestMt940Abnamro < Test::Unit::TestCase
|
|
29
29
|
|
30
30
|
context 'Description' do
|
31
31
|
should 'have the correct description in case of a GIRO account' do
|
32
|
-
assert_equal ' KPN - DIGITENNE
|
32
|
+
assert_equal ' KPN - DIGITENNE BETALINGSKENM. 0000000421886595314606715 BETREFT FACTUUR D.D. 20-05-2011INCL. 1,44 BTW', @transaction.description
|
33
33
|
end
|
34
34
|
|
35
35
|
should 'have the correct description in case of a regular bank' do
|
36
|
-
assert_equal ' MYCOM DEN HAAG
|
36
|
+
assert_equal ' MYCOM DEN HAAG S-GRAVEN,PAS999', @transactions.last.description
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mt940
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Oxener
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A basic MT940 parser with implementations for Dutch banks.
|
14
14
|
email: frank.oxener@gmail.com
|
@@ -102,4 +102,3 @@ test_files:
|
|
102
102
|
- test/mt940_ing_test.rb
|
103
103
|
- test/mt940_rabobank_test.rb
|
104
104
|
- test/mt940_triodos_test.rb
|
105
|
-
has_rdoc:
|