epics 1.5.2 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: c23596e08bddabf190c3c9f36dfd96b2459d004b9fd763221fa6deed515bd9cb
4
- data.tar.gz: c10f4cf0616ddc843060ae2dfaa335361e1ee1cb23c1ab2fb528dffc396af38d
2
+ SHA1:
3
+ metadata.gz: e99c6268999de95d2fdfcb15b8301be4d286de06
4
+ data.tar.gz: 682e7d256cab820ca8484fdfe4dd8d87357042e2
5
5
  SHA512:
6
- metadata.gz: 7e827b56d080fc333b4f7e62529ecb92b69dab761b6d062fb2be2dced424de4d307580731419c74946a16398557639bd0381efacb275e74a1cd1e90973934a13
7
- data.tar.gz: 9ad2bff98ea64beb46dbfed89c0c411dc3bf787bcb6f4c4e91e20573d4fbee09ffe13d323321ac3850956ca4b18524faa0867a57ca32007ceccb905466283a44
6
+ metadata.gz: 12e343da135bd0b38e060bf0f9b5d046bd49596dd42188483b457f7d017863a418e9a6a5b32c0ecb8ffd1530c11a5629769c184362044019d0d9f26d69d61f10
7
+ data.tar.gz: 8f6f9eaf6f37c9099f3dd5d6dedfedc7a94b6118c928842356bea811327b1a1141e5c47012c87691b5c33531fcf5c082da4bf209c4efb9e5670a83a94c555920
@@ -1,3 +1,9 @@
1
+ ### 1.6.0
2
+
3
+ * [BUGFIX] allow unstreamable zipfile handling
4
+ * [ENHANCEMENT] adds CDZ order type
5
+ * updates dependencies
6
+
1
7
  ### 1.5.2
2
8
 
3
9
  * [COMPATIBILITY] be removing the `goyku` dependency we're more recilent against old versions of that gem
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 PKT HAC HKD C52 C53 C54 CD1 CDD CCT VMK).
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
- * PKT (customer usage report in text format)
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
 
@@ -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.0.0"
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"
@@ -35,7 +35,9 @@ require "epics/cct"
35
35
  require "epics/ccs"
36
36
  require "epics/cdb"
37
37
  require "epics/cdd"
38
+ require "epics/b2b"
38
39
  require "epics/cds"
40
+ require "epics/cdz"
39
41
  require "epics/hia"
40
42
  require "epics/ini"
41
43
  require "epics/signer"
@@ -0,0 +1,5 @@
1
+ class Epics::B2B < Epics::CDD
2
+ def order_type
3
+ 'B2B'
4
+ end
5
+ end
@@ -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
@@ -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::InputStream.open(StringIO.new( download(order_type, *args) )) do |stream|
228
- while stream.get_next_entry
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
@@ -1,3 +1,3 @@
1
1
  module Epics
2
- VERSION = "1.5.2"
2
+ VERSION = "1.6.0"
3
3
  end
@@ -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
@@ -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.5.2
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: 2017-11-24 00:00:00.000000000 Z
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: '0'
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: '0'
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.0.0
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.0.0
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.7.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