epics 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,18 @@
1
+ RSpec.describe Epics::AZV do
2
+
3
+ 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') }
4
+ let(:document) { 'DTAZV' }
5
+
6
+ subject { described_class.new(client, document) }
7
+
8
+ describe '#to_xml' do
9
+ specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
10
+ end
11
+
12
+ describe '#to_transfer_xml' do
13
+ before { subject.transaction_id = SecureRandom.hex(16) }
14
+
15
+ specify { expect(subject.to_transfer_xml).to be_a_valid_ebics_doc }
16
+ end
17
+
18
+ end
@@ -1,5 +1,4 @@
1
1
  RSpec.describe Epics::C54 do
2
-
3
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') }
4
3
 
5
4
  subject { described_class.new(client, "2014-09-01", "2014-09-30") }
@@ -7,5 +6,4 @@ RSpec.describe Epics::C54 do
7
6
  describe '#to_xml' do
8
7
  specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
9
8
  end
10
-
11
9
  end
@@ -4,8 +4,30 @@ RSpec.describe Epics::HAA do
4
4
 
5
5
  subject { described_class.new(client) }
6
6
 
7
+ before do
8
+ allow(subject).to receive(:nonce) { "95149241ead8ae7dbb72cabe966bf0e3" }
9
+ allow(subject).to receive(:timestamp) { "2017-10-17T19:56:33Z" }
10
+ end
11
+
7
12
  describe '#to_xml' do
8
13
  specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
14
+
15
+ describe 'validate against fixture' do
16
+ let(:signature_order_data) { Nokogiri::XML(File.read(File.join( File.dirname(__FILE__), '..', 'fixtures', 'xml', 'haa.xml'))) }
17
+
18
+ it "will match exactly" do
19
+ expect(Nokogiri::XML(subject.to_xml)).to be_equivalent_to(signature_order_data)
20
+ end
21
+ end
9
22
  end
10
23
 
11
- end
24
+ describe '#to_receipt_xml' do
25
+ describe 'validate against fixture' do
26
+ let(:signature_order_data) { Nokogiri::XML(File.read(File.join( File.dirname(__FILE__), '..', 'fixtures', 'xml', 'haa_receipt.xml'))) }
27
+
28
+ it "will match exactly" do
29
+ expect(Nokogiri::XML(subject.to_receipt_xml)).to be_equivalent_to(signature_order_data)
30
+ end
31
+ end
32
+ end
33
+ end
@@ -1,5 +1,4 @@
1
1
  RSpec.describe Epics::HIA do
2
-
3
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') }
4
3
 
5
4
  subject { described_class.new(client) }
@@ -8,8 +7,7 @@ RSpec.describe Epics::HIA do
8
7
  specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
9
8
 
10
9
  describe 'validate against fixture' do
11
-
12
- let(:hia) { Nokogiri::XML(File.read(File.join( File.dirname(__FILE__), '..', 'fixtures', 'xml', 'hia.xml'))) }
10
+ let(:hia) { Nokogiri::XML(File.read(File.join( File.dirname(__FILE__), '..', 'fixtures', 'xml', RUBY_ENGINE, 'hia.xml'))) }
13
11
 
14
12
  it "will match exactly" do
15
13
  expect(Nokogiri::XML(subject.to_xml)).to be_equivalent_to(hia)
@@ -30,5 +28,4 @@ RSpec.describe Epics::HIA do
30
28
  end
31
29
  end
32
30
  end
33
-
34
31
  end
@@ -1,5 +1,4 @@
1
1
  RSpec.describe Epics::INI do
2
-
3
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') }
4
3
 
5
4
  before { allow(subject).to receive(:timestamp) { "2014-10-10T11:16:00Z" } }
@@ -10,8 +9,7 @@ RSpec.describe Epics::INI do
10
9
  specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
11
10
 
12
11
  describe 'validate against fixture' do
13
-
14
- let(:signature_order_data) { Nokogiri::XML(File.read(File.join( File.dirname(__FILE__), '..', 'fixtures', 'xml', 'ini.xml'))) }
12
+ let(:signature_order_data) { Nokogiri::XML(File.read(File.join( File.dirname(__FILE__), '..', 'fixtures', 'xml', RUBY_ENGINE, 'ini.xml'))) }
15
13
 
16
14
  it "will match exactly" do
17
15
  expect(Nokogiri::XML(subject.to_xml)).to be_equivalent_to(signature_order_data)
@@ -20,7 +18,6 @@ RSpec.describe Epics::INI do
20
18
  end
21
19
 
22
20
  describe '#key_signature' do
23
-
24
21
  specify { expect(subject.key_signature).to be_a_valid_ebics_doc }
25
22
 
26
23
  describe 'validate against fixture' do
@@ -32,5 +29,4 @@ RSpec.describe Epics::INI do
32
29
  end
33
30
  end
34
31
  end
35
-
36
- end
32
+ end
@@ -1,5 +1,4 @@
1
1
  RSpec.describe Epics::PTK do
2
-
3
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') }
4
3
 
5
4
  subject { described_class.new(client, "2014-09-01", "2014-09-30") }
@@ -7,5 +6,4 @@ RSpec.describe Epics::PTK do
7
6
  describe '#to_xml' do
8
7
  specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
9
8
  end
10
-
11
- end
9
+ end
@@ -0,0 +1,9 @@
1
+ RSpec.describe Epics::VMK 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
+
4
+ subject { described_class.new(client, "2014-09-01", "2014-09-30") }
5
+
6
+ describe '#to_xml' do
7
+ specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
8
+ end
9
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
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-09-26 00:00:00.000000000 Z
11
+ date: 2017-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: gyoku
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: faraday
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -214,7 +200,6 @@ files:
214
200
  - spec/.DS_Store
215
201
  - spec/client_spec.rb
216
202
  - spec/error_spec.rb
217
- - spec/fixtures/.DS_Store
218
203
  - spec/fixtures/SIZBN001.key
219
204
  - spec/fixtures/a006.pem
220
205
  - spec/fixtures/bank_e.pem
@@ -226,7 +211,8 @@ files:
226
211
  - spec/fixtures/xml/cd1_transfer_response.xml
227
212
  - spec/fixtures/xml/ebics_business_nok.xml
228
213
  - spec/fixtures/xml/ebics_technical_nok.xml
229
- - spec/fixtures/xml/hia.xml
214
+ - spec/fixtures/xml/haa.xml
215
+ - spec/fixtures/xml/haa_receipt.xml
230
216
  - spec/fixtures/xml/hia_request_order_data.xml
231
217
  - spec/fixtures/xml/hpb.xml
232
218
  - spec/fixtures/xml/hpb_request.xml
@@ -234,8 +220,11 @@ files:
234
220
  - spec/fixtures/xml/hpb_response_order.xml
235
221
  - spec/fixtures/xml/hpb_response_order_without_ns.xml
236
222
  - spec/fixtures/xml/htd_order_data.xml
237
- - spec/fixtures/xml/ini.xml
238
223
  - spec/fixtures/xml/ini_response_h004_ns.xml
224
+ - spec/fixtures/xml/jruby/hia.xml
225
+ - spec/fixtures/xml/jruby/ini.xml
226
+ - spec/fixtures/xml/ruby/hia.xml
227
+ - spec/fixtures/xml/ruby/ini.xml
239
228
  - spec/fixtures/xml/signature_pub_key_order_data.xml
240
229
  - spec/fixtures/xml/sta_response.xml
241
230
  - spec/fixtures/xml/sta_response_continued.xml
@@ -245,6 +234,7 @@ files:
245
234
  - spec/key_spec.rb
246
235
  - spec/mgf_spec.rb
247
236
  - spec/middleware/parse_ebics_spec.rb
237
+ - spec/orders/azv_spec.rb
248
238
  - spec/orders/c52_spec.rb
249
239
  - spec/orders/c53_spec.rb
250
240
  - spec/orders/c54_spec.rb
@@ -262,6 +252,7 @@ files:
262
252
  - spec/orders/ini_spec.rb
263
253
  - spec/orders/ptk_spec.rb
264
254
  - spec/orders/sta_spec.rb
255
+ - spec/orders/vmk_spec.rb
265
256
  - spec/response_spec.rb
266
257
  - spec/signer_spec.rb
267
258
  - spec/spec_helper.rb
@@ -302,7 +293,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
302
293
  version: '0'
303
294
  requirements: []
304
295
  rubyforge_project:
305
- rubygems_version: 2.5.1
296
+ rubygems_version: 2.7.2
306
297
  signing_key:
307
298
  specification_version: 4
308
299
  summary: a ruby implementation of the EBICS protocol
@@ -310,7 +301,6 @@ test_files:
310
301
  - spec/.DS_Store
311
302
  - spec/client_spec.rb
312
303
  - spec/error_spec.rb
313
- - spec/fixtures/.DS_Store
314
304
  - spec/fixtures/SIZBN001.key
315
305
  - spec/fixtures/a006.pem
316
306
  - spec/fixtures/bank_e.pem
@@ -322,7 +312,8 @@ test_files:
322
312
  - spec/fixtures/xml/cd1_transfer_response.xml
323
313
  - spec/fixtures/xml/ebics_business_nok.xml
324
314
  - spec/fixtures/xml/ebics_technical_nok.xml
325
- - spec/fixtures/xml/hia.xml
315
+ - spec/fixtures/xml/haa.xml
316
+ - spec/fixtures/xml/haa_receipt.xml
326
317
  - spec/fixtures/xml/hia_request_order_data.xml
327
318
  - spec/fixtures/xml/hpb.xml
328
319
  - spec/fixtures/xml/hpb_request.xml
@@ -330,8 +321,11 @@ test_files:
330
321
  - spec/fixtures/xml/hpb_response_order.xml
331
322
  - spec/fixtures/xml/hpb_response_order_without_ns.xml
332
323
  - spec/fixtures/xml/htd_order_data.xml
333
- - spec/fixtures/xml/ini.xml
334
324
  - spec/fixtures/xml/ini_response_h004_ns.xml
325
+ - spec/fixtures/xml/jruby/hia.xml
326
+ - spec/fixtures/xml/jruby/ini.xml
327
+ - spec/fixtures/xml/ruby/hia.xml
328
+ - spec/fixtures/xml/ruby/ini.xml
335
329
  - spec/fixtures/xml/signature_pub_key_order_data.xml
336
330
  - spec/fixtures/xml/sta_response.xml
337
331
  - spec/fixtures/xml/sta_response_continued.xml
@@ -341,6 +335,7 @@ test_files:
341
335
  - spec/key_spec.rb
342
336
  - spec/mgf_spec.rb
343
337
  - spec/middleware/parse_ebics_spec.rb
338
+ - spec/orders/azv_spec.rb
344
339
  - spec/orders/c52_spec.rb
345
340
  - spec/orders/c53_spec.rb
346
341
  - spec/orders/c54_spec.rb
@@ -358,6 +353,7 @@ test_files:
358
353
  - spec/orders/ini_spec.rb
359
354
  - spec/orders/ptk_spec.rb
360
355
  - spec/orders/sta_spec.rb
356
+ - spec/orders/vmk_spec.rb
361
357
  - spec/response_spec.rb
362
358
  - spec/signer_spec.rb
363
359
  - spec/spec_helper.rb
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <ebicsUnsecuredRequest xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns="urn:org:ebics:H004" Version="H004" Revision="1"><header authenticate="true"><static><HostID>SIZBN001</HostID><PartnerID>EBICS</PartnerID><UserID>EBIX</UserID><Product Language="de">EPICS - a ruby ebics kernel</Product><OrderDetails><OrderType>HIA</OrderType><OrderAttribute>DZNNN</OrderAttribute></OrderDetails><SecurityMedium>0000</SecurityMedium></static><mutable/></header><body><DataTransfer><OrderData>eJytlEmTo0YQhe/+FR3tQx8UbhYBWkLSBAKEQIhdiNaNTYCAAqpY9etH7vaMu+05OXyrfC+rIiPfF7X6NhT5UxdBlJZg/UK84i9PEQjKMAXx+qVtrn/MX75tflvtJdaM6jZCjQbDCPJe4z09bgK0DNH6OWmaaolhfd+/9tPXEsYYieM4hi+wR0+I0vj354/u9XMLwfLRsIz8NEDLPY5Tz5sV2zZJBJo08JrHGHrrH6JRAtdys/o4O17eRptViJamxX6pj2XY5i3aVMk1psUOo3qIxEYji3I6PQ1BymG8VfS4GfrbhKM7R0d1XHQ5H18Iv0LiuUeulm5P9HaofE7tmq1izW4mRjVWrKY8PBeyrhxxeox3h3syJthcDcm6uXANJntGC5B1VStJKSb+IiEuaWuYgNNQh+R6Fp04WMvgRCtXjD2fBTpe6LmnBSecUM1a9o5mr0mUNKFbnFAIOZQXzBy6bJbEuaRYfY+P7SEs6drGuEzTWaalIiq960O310WZZsKQIaB51Q9dCDurbZlY0O5lbjFHpo2gyDNQOqbZMWmN68wkOJEOFO4mGgee5ytS9erofmYJyE9xc/ClN4Wc1jNH0RwcMLNpd0v53IOusV6vsE9L/nPhwlCV4JHVhjXY7bv7U3mvvgSEfYnva8rOB3MbF8fJFfZr75/6ZzIEEMCx+q+8EDC7XXaMTXEMs6C4ItX8qpcW84wCsVfz0baSDGdeABIzBRYKNxD3HpBlP1RpouJGzAIEfkmbWkeIKvRqzAJbHlV+0O7hJSPIPrxLZWmn43iUS2muTpB93p5zsbPngklehL3mX2RWPNdbBmnmzRZMva6RMZ+gkxpYpeVeA3B0oB9XvmNhCoqNPgc1WRXIrKc0nznXCT49JW9oamRVc088wxV3hc/zPlVW9lARl1iu7zmzn4g8n+xYejLcCY7WPUpTyJuqcWNrtgzej8WeiAMm0Aq3e7MPI2c5b5NsjvV6WDNwR4y5F9jCeZf46YS4sHPTkfXauGsRE7vD0d3tyoMdAcJustgtmP+Zl78T/sGD8M7Kv/XP2hcaPNiACEr8RthKnPV4/6ewOqEfhrvC/ipW2C/+uc13G17GFA==</OrderData></DataTransfer></body></ebicsUnsecuredRequest>
@@ -1,2 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <ebicsUnsecuredRequest xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns="urn:org:ebics:H004" Version="H004" Revision="1"><header authenticate="true"><static><HostID>SIZBN001</HostID><PartnerID>EBICS</PartnerID><UserID>EBIX</UserID><Product Language="de">EPICS - a ruby ebics kernel</Product><OrderDetails><OrderType>INI</OrderType><OrderAttribute>DZNNN</OrderAttribute></OrderDetails><SecurityMedium>0000</SecurityMedium></static><mutable/></header><body><DataTransfer><OrderData>eJxlUktzokAQvu+vSGUPHrbiDIoGLCTFS3nICiERzA0yIyI6wDCA5tevm+y6cVPVh/ke3VPV/UkPx8P+psW0zgoy7XF92LvB5LVAGUmnvYZt7oTeg/xNCrKUxKyh2GsSB5+WFGGqxyy+ObeTeoLq6e2WsXICQNd1/W7YL2gKBhBCAEVw9qA6S7/ffrivrDjJXut3dwAhdyv//5NFNoUsfbxX8b7BsoTqyWOgXGG3QM2+qWWOHxX3LwKOSEkZOy7SZw2JniPEjt3EC3s0hMSMNFtwsuW95zYHZK9iVC+TRLfMSNy+0lUknsJnytcOq8DuzTjhTKWP5ewYzZnlDHI14QWzjDehUflcEidAyXiwCnW+Nte+1qmh4Fin2iHWunz015xOTP+HOYw2s22gkt1qTgULkkRPtQHvqE2bV+LM04QiAGnukwN1XkYDinaLMBhWwxwxzW/dU97xc9i1P/25vQ9AeHS1PIB0A21o7bq1Ehz3XLLnRXvQtu0iqDqdKbY3i0OryaFrmqkxHqXEg1tuvKwg5+1cxWuOilluqwVJW5cEYY7XOmIF3Yg7rBgHaizQGlkzQN9MWtnddCqBT0v+vXDjWBYEEyYrvqK+qxfmHV0d6Ck74IDFh1IeQI6/4+C5njhuwo0nEL5I4J8ugatLX7Kw+giorEA4lsAX+hN1lZqYMoKppcuGamnBefiFkJ7rv0IkgT/gy5hLzOVfAqASnw==</OrderData></DataTransfer></body></ebicsUnsecuredRequest>