epics 1.5.2 → 1.6.0
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 +5 -5
- data/CHANGELOG.md +6 -0
- data/README.md +10 -8
- data/epics.gemspec +3 -3
- data/lib/epics.rb +2 -0
- data/lib/epics/b2b.rb +5 -0
- data/lib/epics/cdz.rb +42 -0
- data/lib/epics/client.rb +2 -4
- data/lib/epics/version.rb +1 -1
- data/spec/client_spec.rb +12 -0
- data/spec/fixtures/test_with_general_purpose_bit_3.zip +0 -0
- data/spec/orders/b2b_spec.rb +9 -0
- data/spec/orders/cdz_spec.rb +8 -0
- metadata +18 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e99c6268999de95d2fdfcb15b8301be4d286de06
|
4
|
+
data.tar.gz: 682e7d256cab820ca8484fdfe4dd8d87357042e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12e343da135bd0b38e060bf0f9b5d046bd49596dd42188483b457f7d017863a418e9a6a5b32c0ecb8ffd1530c11a5629769c184362044019d0d9f26d69d61f10
|
7
|
+
data.tar.gz: 8f6f9eaf6f37c9099f3dd5d6dedfedc7a94b6118c928842356bea811327b1a1141e5c47012c87691b5c33531fcf5c082da4bf209c4efb9e5670a83a94c555920
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -8,7 +8,7 @@ Communication Standard).
|
|
8
8
|
|
9
9
|
The client supports the complete initialization process comprising INI, HIA and HPB including the
|
10
10
|
INI letter generation. It offers support for the most common download and upload order types
|
11
|
-
(STA HAA HTD HPD
|
11
|
+
(STA HAA HTD HPD PTK HAC HKD C52 C53 C54 CD1 CDD CCT VMK B2B).
|
12
12
|
|
13
13
|
|
14
14
|
## Installation
|
@@ -98,7 +98,7 @@ To get a list of all supported order types.
|
|
98
98
|
|
99
99
|
We have many years of experience in developing innovative applications for the finance sector and
|
100
100
|
integrating applications with financial institutions. - you might want to have a look at our
|
101
|
-
[portfolio](http://www.railslove.com/portfolio)
|
101
|
+
[portfolio](http://www.railslove.com/portfolio)
|
102
102
|
__If you need help we are happy to provide consulting or development services. Contact us:
|
103
103
|
[team@railslove.com](mailto:team@railslove.com)__
|
104
104
|
|
@@ -134,7 +134,7 @@ Currently this EPICS implementation supports the following order types:
|
|
134
134
|
* HAA (available order types)
|
135
135
|
* HTD (user properties and settings)
|
136
136
|
* HPD (the available bank parameters)
|
137
|
-
*
|
137
|
+
* PTK (customer usage report in text format)
|
138
138
|
* HAC (customer usage report in xml format)
|
139
139
|
* VMK (customer usage report in xml format)
|
140
140
|
* ... more coming soon
|
@@ -208,23 +208,25 @@ This gem provides a full implementation of the Electronic Banking Internet Commu
|
|
208
208
|
and works with any bank that supports this standard. Please ask your bank if they support EBICS and
|
209
209
|
what order types are available.
|
210
210
|
|
211
|
-
Besides EBCIS being a standard, some server implementations are slighty different.
|
212
|
-
But most banks use the same EBICS server implementations. Commonly used and supported by Epics are:
|
211
|
+
Besides EBCIS being a standard, some server implementations are slighty different.
|
212
|
+
But most banks use the same EBICS server implementations. Commonly used and supported by Epics are:
|
213
213
|
|
214
214
|
* Business-Logics EBICS, Banking-Server
|
215
|
-
* Travic Corporate
|
215
|
+
* Travic Corporate
|
216
216
|
|
217
217
|
Used for example by the following tested institutions:
|
218
218
|
|
219
219
|
* Handelsbank
|
220
220
|
* Deutsche Bank
|
221
221
|
* Commerzbank
|
222
|
-
* Kreissparkasse Mayen
|
222
|
+
* Kreissparkasse Mayen
|
223
223
|
* Postbank
|
224
224
|
* Sozialbank
|
225
|
-
* Sparkassen
|
225
|
+
* Sparkassen
|
226
226
|
* Volksbanken Raiffeisenbanken
|
227
227
|
* Hypo Vereinsbank
|
228
|
+
* BAWAG P.S.K. (AT)
|
229
|
+
* Bank Frick (LI)
|
228
230
|
|
229
231
|
Is Epics working with your institution? Please help us to grow this list of supported banks:
|
230
232
|
|
data/epics.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
STA HAA HTD HPD PKT HAC HKD C52 C53 C54
|
20
20
|
|
21
21
|
And the following upload orders:
|
22
|
-
CD1 CDD CCT
|
22
|
+
CD1 CDD CCT B2B CDS CCS CDZ
|
23
23
|
description
|
24
24
|
|
25
25
|
spec.homepage = "https://github.com/railslove/epics"
|
@@ -42,11 +42,11 @@ Gem::Specification.new do |spec|
|
|
42
42
|
if RUBY_VERSION < '2.1'
|
43
43
|
spec.add_dependency "nokogiri", '< 1.7.0'
|
44
44
|
else
|
45
|
-
spec.add_dependency "nokogiri"
|
45
|
+
spec.add_dependency "nokogiri", "~>1.8.2"
|
46
46
|
end
|
47
47
|
|
48
48
|
spec.add_dependency "faraday"
|
49
|
-
spec.add_dependency "rubyzip", ">= 1.
|
49
|
+
spec.add_dependency "rubyzip", ">= 1.2.1"
|
50
50
|
|
51
51
|
spec.add_development_dependency "bundler", ">= 1.6.2"
|
52
52
|
spec.add_development_dependency "rake", "~> 10.0"
|
data/lib/epics.rb
CHANGED
data/lib/epics/b2b.rb
ADDED
data/lib/epics/cdz.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
class Epics::CDZ < Epics::GenericRequest
|
2
|
+
attr_accessor :from, :to
|
3
|
+
|
4
|
+
def initialize(client, from, to)
|
5
|
+
super(client)
|
6
|
+
self.from = from
|
7
|
+
self.to = to
|
8
|
+
end
|
9
|
+
|
10
|
+
def header
|
11
|
+
Nokogiri::XML::Builder.new do |xml|
|
12
|
+
xml.header(authenticate: true) {
|
13
|
+
xml.static {
|
14
|
+
xml.HostID host_id
|
15
|
+
xml.Nonce nonce
|
16
|
+
xml.Timestamp timestamp
|
17
|
+
xml.PartnerID partner_id
|
18
|
+
xml.UserID user_id
|
19
|
+
xml.Product("EPICS - a ruby ebics kernel", 'Language' => 'de')
|
20
|
+
xml.OrderDetails {
|
21
|
+
xml.OrderType 'CDZ'
|
22
|
+
xml.OrderAttribute 'DZHNN'
|
23
|
+
xml.StandardOrderParams {
|
24
|
+
xml.DateRange {
|
25
|
+
xml.Start from
|
26
|
+
xml.End to
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
xml.BankPubKeyDigests {
|
31
|
+
xml.Authentication(client.bank_x.public_digest, Version: 'X002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256")
|
32
|
+
xml.Encryption(client.bank_e.public_digest, Version: 'E002', Algorithm: "http://www.w3.org/2001/04/xmlenc#sha256" )
|
33
|
+
}
|
34
|
+
xml.SecurityMedium '0000'
|
35
|
+
}
|
36
|
+
xml.mutable {
|
37
|
+
xml.TransactionPhase 'Initialisation'
|
38
|
+
}
|
39
|
+
}
|
40
|
+
end.doc.root
|
41
|
+
end
|
42
|
+
end
|
data/lib/epics/client.rb
CHANGED
@@ -224,10 +224,8 @@ class Epics::Client
|
|
224
224
|
|
225
225
|
def download_and_unzip(order_type, *args)
|
226
226
|
[].tap do |entries|
|
227
|
-
Zip::
|
228
|
-
|
229
|
-
entries << stream.read
|
230
|
-
end
|
227
|
+
Zip::File.open_buffer(StringIO.new(download(order_type, *args))).each do |zipfile|
|
228
|
+
entries << zipfile.get_input_stream.read
|
231
229
|
end
|
232
230
|
end
|
233
231
|
end
|
data/lib/epics/version.rb
CHANGED
data/spec/client_spec.rb
CHANGED
@@ -195,4 +195,16 @@ RSpec.describe Epics::Client do
|
|
195
195
|
end
|
196
196
|
end
|
197
197
|
end
|
198
|
+
|
199
|
+
describe '#C53/C52/C54 types with zipped data with general purpose bit flag 3 set' do
|
200
|
+
before do
|
201
|
+
allow(subject).to receive(:download).and_return( File.read(File.join(File.dirname(__FILE__), 'fixtures', 'test_with_general_purpose_bit_3.zip') ))
|
202
|
+
end
|
203
|
+
|
204
|
+
it 'will unzip the returned data' do
|
205
|
+
%w(C52 C53 C54).each do |c|
|
206
|
+
expect(subject.send(c, :today, :yesterday)).to eq(["ebics is great\n"])
|
207
|
+
end
|
208
|
+
end
|
209
|
+
end
|
198
210
|
end
|
Binary file
|
@@ -0,0 +1,9 @@
|
|
1
|
+
RSpec.describe Epics::B2B do
|
2
|
+
let(:client) { Epics::Client.new( File.open(File.join( File.dirname(__FILE__), '..', 'fixtures', 'SIZBN001.key')), 'secret' , 'https://194.180.18.30/ebicsweb/ebicsweb', 'SIZBN001', 'EBIX', 'EBICS') }
|
3
|
+
let(:document) { File.read( File.join( File.dirname(__FILE__), '..', 'fixtures', 'xml', 'cd1.xml') ) }
|
4
|
+
subject { described_class.new(client, document) }
|
5
|
+
|
6
|
+
describe '#to_xml' do
|
7
|
+
specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
RSpec.describe Epics::CDZ do
|
2
|
+
let(:client) { Epics::Client.new( File.open(File.join( File.dirname(__FILE__), '..', 'fixtures', 'SIZBN001.key')), 'secret' , 'https://194.180.18.30/ebicsweb/ebicsweb', 'SIZBN001', 'EBIX', 'EBICS') }
|
3
|
+
subject { described_class.new(client, "2014-09-01", "2014-09-30") }
|
4
|
+
|
5
|
+
describe '#to_xml' do
|
6
|
+
specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
|
7
|
+
end
|
8
|
+
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: epics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lars Brillert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.8.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.8.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: faraday
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.2.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.2.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: bundler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -146,7 +146,7 @@ description: |2
|
|
146
146
|
STA HAA HTD HPD PKT HAC HKD C52 C53 C54
|
147
147
|
|
148
148
|
And the following upload orders:
|
149
|
-
CD1 CDD CCT
|
149
|
+
CD1 CDD CCT B2B CDS CCS CDZ
|
150
150
|
email:
|
151
151
|
- lars@railslove.com
|
152
152
|
executables: []
|
@@ -165,6 +165,7 @@ files:
|
|
165
165
|
- epics.gemspec
|
166
166
|
- lib/epics.rb
|
167
167
|
- lib/epics/azv.rb
|
168
|
+
- lib/epics/b2b.rb
|
168
169
|
- lib/epics/c52.rb
|
169
170
|
- lib/epics/c53.rb
|
170
171
|
- lib/epics/c54.rb
|
@@ -174,6 +175,7 @@ files:
|
|
174
175
|
- lib/epics/cdb.rb
|
175
176
|
- lib/epics/cdd.rb
|
176
177
|
- lib/epics/cds.rb
|
178
|
+
- lib/epics/cdz.rb
|
177
179
|
- lib/epics/client.rb
|
178
180
|
- lib/epics/error.rb
|
179
181
|
- lib/epics/generic_request.rb
|
@@ -205,6 +207,7 @@ files:
|
|
205
207
|
- spec/fixtures/bank_e.pem
|
206
208
|
- spec/fixtures/e002.pem
|
207
209
|
- spec/fixtures/test.zip
|
210
|
+
- spec/fixtures/test_with_general_purpose_bit_3.zip
|
208
211
|
- spec/fixtures/x002.pem
|
209
212
|
- spec/fixtures/xml/cd1.xml
|
210
213
|
- spec/fixtures/xml/cd1_init_response.xml
|
@@ -235,6 +238,7 @@ files:
|
|
235
238
|
- spec/mgf_spec.rb
|
236
239
|
- spec/middleware/parse_ebics_spec.rb
|
237
240
|
- spec/orders/azv_spec.rb
|
241
|
+
- spec/orders/b2b_spec.rb
|
238
242
|
- spec/orders/c52_spec.rb
|
239
243
|
- spec/orders/c53_spec.rb
|
240
244
|
- spec/orders/c54_spec.rb
|
@@ -242,6 +246,7 @@ files:
|
|
242
246
|
- spec/orders/cd1_spec.rb
|
243
247
|
- spec/orders/cdb_spec.rb
|
244
248
|
- spec/orders/cdd_spec.rb
|
249
|
+
- spec/orders/cdz_spec.rb
|
245
250
|
- spec/orders/haa_spec.rb
|
246
251
|
- spec/orders/hac_spec.rb
|
247
252
|
- spec/orders/hia_spec.rb
|
@@ -293,7 +298,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
293
298
|
version: '0'
|
294
299
|
requirements: []
|
295
300
|
rubyforge_project:
|
296
|
-
rubygems_version: 2.
|
301
|
+
rubygems_version: 2.5.1
|
297
302
|
signing_key:
|
298
303
|
specification_version: 4
|
299
304
|
summary: a ruby implementation of the EBICS protocol
|
@@ -306,6 +311,7 @@ test_files:
|
|
306
311
|
- spec/fixtures/bank_e.pem
|
307
312
|
- spec/fixtures/e002.pem
|
308
313
|
- spec/fixtures/test.zip
|
314
|
+
- spec/fixtures/test_with_general_purpose_bit_3.zip
|
309
315
|
- spec/fixtures/x002.pem
|
310
316
|
- spec/fixtures/xml/cd1.xml
|
311
317
|
- spec/fixtures/xml/cd1_init_response.xml
|
@@ -336,6 +342,7 @@ test_files:
|
|
336
342
|
- spec/mgf_spec.rb
|
337
343
|
- spec/middleware/parse_ebics_spec.rb
|
338
344
|
- spec/orders/azv_spec.rb
|
345
|
+
- spec/orders/b2b_spec.rb
|
339
346
|
- spec/orders/c52_spec.rb
|
340
347
|
- spec/orders/c53_spec.rb
|
341
348
|
- spec/orders/c54_spec.rb
|
@@ -343,6 +350,7 @@ test_files:
|
|
343
350
|
- spec/orders/cd1_spec.rb
|
344
351
|
- spec/orders/cdb_spec.rb
|
345
352
|
- spec/orders/cdd_spec.rb
|
353
|
+
- spec/orders/cdz_spec.rb
|
346
354
|
- spec/orders/haa_spec.rb
|
347
355
|
- spec/orders/hac_spec.rb
|
348
356
|
- spec/orders/hia_spec.rb
|