clieop 0.1.3 → 0.1.4
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.
- data/clieop.gemspec +5 -5
- data/lib/clieop/file.rb +1 -1
- data/lib/clieop/record.rb +2 -2
- data/lib/clieop.rb +1 -1
- data/spec/clieop/file_spec.rb +5 -0
- data/spec/clieop/record_spec.rb +10 -1
- metadata +7 -3
data/clieop.gemspec
CHANGED
@@ -3,18 +3,18 @@ Gem::Specification.new do |s|
|
|
3
3
|
|
4
4
|
# Do not set version and date yourself, this will be done automatically
|
5
5
|
# by the gem release script.
|
6
|
-
s.version = "0.1.
|
6
|
+
s.version = "0.1.4"
|
7
7
|
s.date = "2010-06-02"
|
8
8
|
|
9
9
|
s.summary = "A pure Ruby implementation to write CLIEOP files"
|
10
10
|
s.description = "This library is a pure Ruby, MIT licensed implementation of the CLIEOP03 transaction format. CLIEOP03 can be used to communicate direct debt transactions with your (Dutch) bank."
|
11
11
|
|
12
|
-
s.authors = ['Willem van Bergen']
|
13
|
-
s.email = ['willem@vanbergen.org']
|
12
|
+
s.authors = ['Willem van Bergen', 'Leon Berenschot']
|
13
|
+
s.email = ['willem@vanbergen.org', 'LeipeLeon@gmail.com']
|
14
14
|
s.homepage = 'http://github.com/wvanbergen/clieop/wikis'
|
15
15
|
|
16
16
|
# Do not set files and test_files yourself, this will be done automatically
|
17
17
|
# by the gem release script.
|
18
|
-
s.files = %w(spec/spec_helper.rb spec/clieop/batch_spec.rb .gitignore lib/clieop/record.rb MIT-LICENSE doc/clieop03.pdf lib/clieop/file.rb lib/clieop/batch.rb lib/clieop.rb init.rb Rakefile clieop.gemspec README.rdoc tasks/github-gem.rake spec/clieop_spec.rb spec/clieop/record_spec.rb)
|
19
|
-
s.test_files = %w(spec/clieop/batch_spec.rb spec/clieop_spec.rb spec/clieop/record_spec.rb)
|
18
|
+
s.files = %w(spec/spec_helper.rb spec/clieop/batch_spec.rb .gitignore lib/clieop/record.rb MIT-LICENSE doc/clieop03.pdf lib/clieop/file.rb lib/clieop/batch.rb lib/clieop.rb init.rb Rakefile clieop.gemspec README.rdoc tasks/github-gem.rake spec/clieop_spec.rb spec/clieop/record_spec.rb spec/clieop/file_spec.rb)
|
19
|
+
s.test_files = %w(spec/clieop/batch_spec.rb spec/clieop_spec.rb spec/clieop/record_spec.rb spec/clieop/file_spec.rb)
|
20
20
|
end
|
data/lib/clieop/file.rb
CHANGED
data/lib/clieop/record.rb
CHANGED
@@ -19,7 +19,7 @@ module Clieop
|
|
19
19
|
:batch_header => [
|
20
20
|
[:record_code, :numeric, 4, 10],
|
21
21
|
[:record_variant, :alpha, 1, 'B'],
|
22
|
-
[:transaction_group, :
|
22
|
+
[:transaction_group, :numeric, 2],
|
23
23
|
[:acount_nr, :numeric, 10],
|
24
24
|
[:serial_nr, :numeric, 4],
|
25
25
|
[:currency, :alpha, 3, 'EUR']
|
@@ -47,7 +47,7 @@ module Clieop
|
|
47
47
|
:transaction_info => [
|
48
48
|
[:record_code, :numeric, 4, 100],
|
49
49
|
[:record_variant, :alpha, 1, 'A'],
|
50
|
-
[:transaction_type, :
|
50
|
+
[:transaction_type, :numeric, 4, 1002],
|
51
51
|
[:amount, :numeric, 12],
|
52
52
|
[:from_account, :numeric, 10],
|
53
53
|
[:to_account, :numeric, 10],
|
data/lib/clieop.rb
CHANGED
data/spec/clieop/record_spec.rb
CHANGED
@@ -15,7 +15,7 @@ describe Clieop::Record do
|
|
15
15
|
record.to_clieop.should match(/9999A /)
|
16
16
|
end
|
17
17
|
|
18
|
-
it "should generate :batch_header" do
|
18
|
+
it "should generate :batch_header for direct debit" do
|
19
19
|
record = Clieop::Record.new(:batch_header,
|
20
20
|
:transaction_group => 10,
|
21
21
|
:acount_nr => 1234567890,
|
@@ -24,6 +24,15 @@ describe Clieop::Record do
|
|
24
24
|
record.to_clieop.should match(/0010B1012345678900001EUR /)
|
25
25
|
end
|
26
26
|
|
27
|
+
it "should generate :batch_header for payment" do
|
28
|
+
record = Clieop::Record.new(:batch_header,
|
29
|
+
:transaction_group => 0,
|
30
|
+
:acount_nr => 1234567890,
|
31
|
+
:serial_nr => 1
|
32
|
+
)
|
33
|
+
record.to_clieop.should match(/0010B0012345678900001EUR /)
|
34
|
+
end
|
35
|
+
|
27
36
|
# TODO Also do calculations
|
28
37
|
it "should generate :batch_footer" do
|
29
38
|
record = Clieop::Record.new(:batch_footer,
|
metadata
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clieop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 4
|
10
|
+
version: 0.1.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Willem van Bergen
|
14
|
+
- Leon Berenschot
|
14
15
|
autorequire:
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
@@ -22,6 +23,7 @@ dependencies: []
|
|
22
23
|
description: This library is a pure Ruby, MIT licensed implementation of the CLIEOP03 transaction format. CLIEOP03 can be used to communicate direct debt transactions with your (Dutch) bank.
|
23
24
|
email:
|
24
25
|
- willem@vanbergen.org
|
26
|
+
- LeipeLeon@gmail.com
|
25
27
|
executables: []
|
26
28
|
|
27
29
|
extensions: []
|
@@ -45,6 +47,7 @@ files:
|
|
45
47
|
- tasks/github-gem.rake
|
46
48
|
- spec/clieop_spec.rb
|
47
49
|
- spec/clieop/record_spec.rb
|
50
|
+
- spec/clieop/file_spec.rb
|
48
51
|
has_rdoc: true
|
49
52
|
homepage: http://github.com/wvanbergen/clieop/wikis
|
50
53
|
licenses: []
|
@@ -83,3 +86,4 @@ test_files:
|
|
83
86
|
- spec/clieop/batch_spec.rb
|
84
87
|
- spec/clieop_spec.rb
|
85
88
|
- spec/clieop/record_spec.rb
|
89
|
+
- spec/clieop/file_spec.rb
|