king_dtaus 2.0.0 → 2.0.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/.rvmrc +1 -0
- data/Gemfile +1 -5
- data/Gemfile.lock +38 -0
- data/README.rdoc +120 -0
- data/Rakefile +1 -7
- data/VERSION +1 -1
- data/king_dtaus.gemspec +11 -12
- data/lib/king_dta/account.rb +29 -30
- data/lib/king_dta/dta.rb +0 -10
- data/lib/king_dta/dtaus.rb +134 -125
- data/lib/king_dta/dtazv.rb +221 -183
- data/lib/king_dta/helper.rb +1 -3
- data/lib/king_dtaus.rb +0 -1
- data/spec/account_spec.rb +150 -64
- data/spec/booking_spec.rb +3 -1
- data/spec/dtaus_spec.rb +12 -35
- data/spec/dtazv_spec.rb +155 -54
- data/spec/dtazv_test.rb +105 -0
- data/spec/spec_helper.rb +65 -43
- metadata +38 -48
- data/.travis.yml +0 -3
- data/README.markdown +0 -128
- /data/{docs/example.output → example.output} +0 -0
metadata
CHANGED
@@ -1,42 +1,28 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: king_dtaus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 961916000
|
5
|
+
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
|
9
|
+
- 1
|
10
|
+
- pre
|
11
|
+
version: 2.0.1.pre
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- Georg Leciejewski
|
14
15
|
- Georg Ledermann
|
15
|
-
- Jan Kus
|
16
16
|
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2011-
|
20
|
+
date: 2011-06-15 00:00:00 +02:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
|
-
type: :runtime
|
25
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
|
-
requirements:
|
28
|
-
- - ">="
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
hash: 3
|
31
|
-
segments:
|
32
|
-
- 0
|
33
|
-
version: "0"
|
34
24
|
name: king_dtaus
|
35
|
-
version_requirements:
|
36
|
-
prerelease: false
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
type: :development
|
39
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
25
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
40
26
|
none: false
|
41
27
|
requirements:
|
42
28
|
- - ">="
|
@@ -45,12 +31,12 @@ dependencies:
|
|
45
31
|
segments:
|
46
32
|
- 0
|
47
33
|
version: "0"
|
48
|
-
name: rspec
|
49
|
-
version_requirements: *id002
|
50
34
|
prerelease: false
|
35
|
+
type: :runtime
|
36
|
+
requirement: *id001
|
51
37
|
- !ruby/object:Gem::Dependency
|
52
|
-
|
53
|
-
|
38
|
+
name: rspec
|
39
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
54
40
|
none: false
|
55
41
|
requirements:
|
56
42
|
- - ">="
|
@@ -59,12 +45,12 @@ dependencies:
|
|
59
45
|
segments:
|
60
46
|
- 0
|
61
47
|
version: "0"
|
62
|
-
name: jeweler
|
63
|
-
version_requirements: *id003
|
64
48
|
prerelease: false
|
65
|
-
- !ruby/object:Gem::Dependency
|
66
49
|
type: :development
|
67
|
-
requirement:
|
50
|
+
requirement: *id002
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
name: jeweler
|
53
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
68
54
|
none: false
|
69
55
|
requirements:
|
70
56
|
- - ">="
|
@@ -73,12 +59,12 @@ dependencies:
|
|
73
59
|
segments:
|
74
60
|
- 0
|
75
61
|
version: "0"
|
76
|
-
name: simplecov
|
77
|
-
version_requirements: *id004
|
78
62
|
prerelease: false
|
79
|
-
- !ruby/object:Gem::Dependency
|
80
63
|
type: :development
|
81
|
-
requirement:
|
64
|
+
requirement: *id003
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
name: simplecov
|
67
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
82
68
|
none: false
|
83
69
|
requirements:
|
84
70
|
- - ">="
|
@@ -87,12 +73,12 @@ dependencies:
|
|
87
73
|
segments:
|
88
74
|
- 0
|
89
75
|
version: "0"
|
90
|
-
name: mocha
|
91
|
-
version_requirements: *id005
|
92
76
|
prerelease: false
|
93
|
-
- !ruby/object:Gem::Dependency
|
94
77
|
type: :development
|
95
|
-
requirement:
|
78
|
+
requirement: *id004
|
79
|
+
- !ruby/object:Gem::Dependency
|
80
|
+
name: mocha
|
81
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
96
82
|
none: false
|
97
83
|
requirements:
|
98
84
|
- - ">="
|
@@ -101,9 +87,9 @@ dependencies:
|
|
101
87
|
segments:
|
102
88
|
- 0
|
103
89
|
version: "0"
|
104
|
-
name: i18n
|
105
|
-
version_requirements: *id006
|
106
90
|
prerelease: false
|
91
|
+
type: :development
|
92
|
+
requirement: *id005
|
107
93
|
description: DTAUS is a text-based format, to create bank transfers for german banks. This gem helps with the creation of those transfer files.
|
108
94
|
email: gl@salesking.eu
|
109
95
|
executables: []
|
@@ -111,17 +97,18 @@ executables: []
|
|
111
97
|
extensions: []
|
112
98
|
|
113
99
|
extra_rdoc_files:
|
114
|
-
- README.
|
100
|
+
- README.rdoc
|
115
101
|
files:
|
116
|
-
- .
|
102
|
+
- .rvmrc
|
117
103
|
- Gemfile
|
104
|
+
- Gemfile.lock
|
118
105
|
- MIT-LICENSE
|
119
|
-
- README.
|
106
|
+
- README.rdoc
|
120
107
|
- Rakefile
|
121
108
|
- VERSION
|
122
109
|
- docs/dtazv.pdf
|
123
110
|
- docs/dtazv_bank_bbk.pdf
|
124
|
-
-
|
111
|
+
- example.output
|
125
112
|
- king_dtaus.gemspec
|
126
113
|
- lib/king_dta/account.rb
|
127
114
|
- lib/king_dta/booking.rb
|
@@ -135,6 +122,7 @@ files:
|
|
135
122
|
- spec/booking_spec.rb
|
136
123
|
- spec/dtaus_spec.rb
|
137
124
|
- spec/dtazv_spec.rb
|
125
|
+
- spec/dtazv_test.rb
|
138
126
|
- spec/helper_spec.rb
|
139
127
|
- spec/spec_helper.rb
|
140
128
|
has_rdoc: true
|
@@ -158,16 +146,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
158
146
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
147
|
none: false
|
160
148
|
requirements:
|
161
|
-
- - "
|
149
|
+
- - ">"
|
162
150
|
- !ruby/object:Gem::Version
|
163
|
-
hash:
|
151
|
+
hash: 25
|
164
152
|
segments:
|
165
|
-
-
|
166
|
-
|
153
|
+
- 1
|
154
|
+
- 3
|
155
|
+
- 1
|
156
|
+
version: 1.3.1
|
167
157
|
requirements: []
|
168
158
|
|
169
159
|
rubyforge_project:
|
170
|
-
rubygems_version: 1.
|
160
|
+
rubygems_version: 1.5.0
|
171
161
|
signing_key:
|
172
162
|
specification_version: 3
|
173
163
|
summary: Generate DTAUS strings and files
|
data/.travis.yml
DELETED
data/README.markdown
DELETED
@@ -1,128 +0,0 @@
|
|
1
|
-
# DTAUS & DTAZV always comes together
|
2
|
-
|
3
|
-
[![Build Status](https://secure.travis-ci.org/salesking/king_dtaus.png)](http://travis-ci.org/salesking/king_dtaus)
|
4
|
-
|
5
|
-
DTAUS & DTAZV are formats for German bank transfers and is short for
|
6
|
-
"Datenträgeraustausch". The format itself totally sucks because it was
|
7
|
-
established in the last century, to be used on floppy disks. Still almost
|
8
|
-
all German banks use it (they only seem innovative at robbing), and it is
|
9
|
-
therefore supported in common banking programs too.
|
10
|
-
|
11
|
-
This gem saves you all the trouble when generating DTAUS- or DTAZV-text.
|
12
|
-
|
13
|
-
We love building payment applications.
|
14
|
-
|
15
|
-
## Install
|
16
|
-
|
17
|
-
gem install king_dtaus
|
18
|
-
|
19
|
-
## Features
|
20
|
-
|
21
|
-
* Create DTAUS debit transfer (Lastschrift)
|
22
|
-
* Create DTAUS credit transfer (Gutschrift)
|
23
|
-
* Create DTAZV debit transfer
|
24
|
-
* 100% test coverage to ensure software quality
|
25
|
-
* works with ruby 1.8 & 1.9.2
|
26
|
-
|
27
|
-
## Version Info
|
28
|
-
|
29
|
-
Version 2 has breaking changes!
|
30
|
-
|
31
|
-
* account attributes now passed in as hash
|
32
|
-
* renamed account.client_xy => owner_xy
|
33
|
-
* renamed account.account_number => bank_account_number
|
34
|
-
* added iban/bic to account
|
35
|
-
* DTAZV added
|
36
|
-
|
37
|
-
If you want to stay with v1 just pin it in your Gemfile:
|
38
|
-
|
39
|
-
gem "king_dtaus", "<2"
|
40
|
-
|
41
|
-
## TODOs
|
42
|
-
|
43
|
-
* some more edge-case tests needed, we need your feedback here!
|
44
|
-
|
45
|
-
## Resources
|
46
|
-
|
47
|
-
* SalesKing: http://salesking.eu
|
48
|
-
* DTAZV-Viewer: http://www.meta-evolutions.de/pages/artikel-20070630-dtazv-datei-betrachter.html
|
49
|
-
* DTA/DTAZV PHP Pear: http://pear.php.net/package/Payment_DTA
|
50
|
-
* Windata ZV-Tools: http://www.windata.de/Site/2Produkte2/ZVTools.aspx
|
51
|
-
* The Swift Codes: http://www.theswiftcodes.com/
|
52
|
-
* StarMoney: http://www.starmoney.de/index.php?id=starmoneybusiness_testen
|
53
|
-
|
54
|
-
## Examples
|
55
|
-
|
56
|
-
Here are some examples how to create a DTA- or DTAZV-File. Also check out the spec/dtazv_test.rb to have a running example of an export.
|
57
|
-
|
58
|
-
### DTA
|
59
|
-
|
60
|
-
# create a new dtaus object
|
61
|
-
dta = KingDta::Dtaus.new('LK')
|
62
|
-
|
63
|
-
# set sender account
|
64
|
-
dta.account = KingDta::Account.new(
|
65
|
-
:bank_account_number => "123456789",
|
66
|
-
:bank_number => "69069096",
|
67
|
-
:owner_name => "Return to Sender",
|
68
|
-
:bank_name => "Money Burner Bank")
|
69
|
-
|
70
|
-
# following should be done in a loop to add multiple bookings
|
71
|
-
# create receiving account
|
72
|
-
receiver = KingDta::Account.new(
|
73
|
-
:bank_account_number => "987456123",
|
74
|
-
:bank_number => "99099096",
|
75
|
-
:owner_name => "Gimme More Lt.",
|
76
|
-
:bank_name => "Banking Bandits")
|
77
|
-
# create booking
|
78
|
-
booking = KingDta::Booking.new(receiver, 100.00 )
|
79
|
-
|
80
|
-
# set booking text if you want to
|
81
|
-
booking.text = "Thanks for your purchase"
|
82
|
-
|
83
|
-
# add booking
|
84
|
-
dta.add( booking )
|
85
|
-
# end loop
|
86
|
-
|
87
|
-
# create datausstring and do with it whatever fits your workflow
|
88
|
-
my_str = dta.create
|
89
|
-
|
90
|
-
### DTAZV
|
91
|
-
|
92
|
-
@dtazv = KingDta::Dtazv.new()
|
93
|
-
|
94
|
-
# sender account
|
95
|
-
@dtazv.account = KingDta::Account.new(
|
96
|
-
:bank_account_number => "123456789",
|
97
|
-
:bank_number => "40050100",
|
98
|
-
:bank_name => "Greedy Fuckers Bank",
|
99
|
-
:owner_name => "Sender name"
|
100
|
-
)
|
101
|
-
|
102
|
-
# receiver account
|
103
|
-
receiver = KingDta::Account.new(
|
104
|
-
:bank_account_number => "987654321",
|
105
|
-
:bank_iban => "PLsome-long-Iban",
|
106
|
-
:bank_bic => "BicCode",
|
107
|
-
:owner_name => "receivers name"
|
108
|
-
)
|
109
|
-
# add bookings, probably in a loop
|
110
|
-
booking = KingDta::Booking.new(receiver, 220.25)
|
111
|
-
@dtazv.add(booking)
|
112
|
-
|
113
|
-
# get output as string
|
114
|
-
@dtazv.create
|
115
|
-
|
116
|
-
also make sure to read the code and the specs
|
117
|
-
|
118
|
-
## Credits
|
119
|
-
|
120
|
-
Bugfixes and enhancements by
|
121
|
-
|
122
|
-
* Georg Ledermann - https://github.com/ledermann
|
123
|
-
* Kim Rudolph - https://github.com/krudolph
|
124
|
-
* Thorsten Böttger - https://github.com/alto
|
125
|
-
* Jan Kus - https://github.com/koos
|
126
|
-
* used https://rubygems.org/gems/DTAUS as a starting point
|
127
|
-
|
128
|
-
Copyright (c) 2009-2011 Georg Leciejewski (SalesKing), Jan Kus (Railslove), released under the MIT license
|
File without changes
|