epics 2.4.0 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/.semaphore/semaphore.yml +3 -12
  3. data/CHANGELOG.md +14 -0
  4. data/epics.gemspec +9 -4
  5. data/lib/epics/azv.rb +9 -26
  6. data/lib/epics/b2b.rb +11 -3
  7. data/lib/epics/c2s.rb +11 -7
  8. data/lib/epics/c52.rb +12 -37
  9. data/lib/epics/c53.rb +12 -37
  10. data/lib/epics/c54.rb +12 -37
  11. data/lib/epics/c5n.rb +17 -0
  12. data/lib/epics/ccs.rb +11 -7
  13. data/lib/epics/cct.rb +9 -34
  14. data/lib/epics/cd1.rb +9 -26
  15. data/lib/epics/cdb.rb +9 -34
  16. data/lib/epics/cdd.rb +9 -34
  17. data/lib/epics/cds.rb +11 -7
  18. data/lib/epics/cdz.rb +12 -41
  19. data/lib/epics/cip.rb +13 -0
  20. data/lib/epics/client.rb +40 -19
  21. data/lib/epics/crz.rb +12 -41
  22. data/lib/epics/generic_request.rb +8 -3
  23. data/lib/epics/generic_upload_request.rb +2 -2
  24. data/lib/epics/haa.rb +8 -25
  25. data/lib/epics/hac.rb +12 -41
  26. data/lib/epics/header_request.rb +60 -0
  27. data/lib/epics/hia.rb +6 -16
  28. data/lib/epics/hkd.rb +8 -25
  29. data/lib/epics/hpb.rb +8 -18
  30. data/lib/epics/hpd.rb +8 -25
  31. data/lib/epics/htd.rb +8 -25
  32. data/lib/epics/ini.rb +6 -16
  33. data/lib/epics/letter_renderer.rb +22 -0
  34. data/lib/epics/ptk.rb +12 -41
  35. data/lib/epics/sta.rb +12 -41
  36. data/lib/epics/version.rb +1 -1
  37. data/lib/epics/vmk.rb +12 -41
  38. data/lib/epics/wss.rb +13 -0
  39. data/lib/epics/xct.rb +9 -26
  40. data/lib/epics/xds.rb +11 -3
  41. data/lib/epics/xe2.rb +11 -3
  42. data/lib/epics/xe3.rb +11 -3
  43. data/lib/epics/z52.rb +12 -37
  44. data/lib/epics/z53.rb +12 -37
  45. data/lib/epics/z54.rb +12 -37
  46. data/lib/epics.rb +8 -0
  47. data/lib/letter/ini.erb +260 -150
  48. data/lib/letter/locales/de.yml +19 -0
  49. data/lib/letter/locales/en.yml +19 -0
  50. data/lib/letter/locales/fr.yml +19 -0
  51. data/spec/client_spec.rb +1 -1
  52. data/spec/fixtures/xml/cip.xml +86 -0
  53. data/spec/fixtures/xml/htd_order_data.xml +7 -1
  54. data/spec/hpb_spec.rb +4 -4
  55. data/spec/orders/c52_spec.rb +1 -1
  56. data/spec/orders/c53_spec.rb +1 -1
  57. data/spec/orders/c54_spec.rb +1 -1
  58. data/spec/orders/c5n_spec.rb +9 -0
  59. data/spec/orders/cdz_spec.rb +1 -1
  60. data/spec/orders/cip_spec.rb +23 -0
  61. data/spec/orders/crz_spec.rb +1 -1
  62. data/spec/orders/hac_spec.rb +1 -1
  63. data/spec/orders/ptk_spec.rb +1 -1
  64. data/spec/orders/sta_spec.rb +1 -1
  65. data/spec/orders/vmk_spec.rb +1 -1
  66. data/spec/orders/wss_spec.rb +9 -0
  67. data/spec/orders/z52_spec.rb +1 -1
  68. data/spec/orders/z53_spec.rb +1 -1
  69. data/spec/orders/z54_spec.rb +1 -1
  70. metadata +44 -11
@@ -2,7 +2,7 @@ RSpec.describe Epics::C53 do
2
2
 
3
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
4
 
5
- subject { described_class.new(client, "2014-09-01", "2014-09-30") }
5
+ subject { described_class.new(client, from: "2014-09-01", to: "2014-09-30") }
6
6
 
7
7
  describe '#to_xml' do
8
8
  specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
@@ -1,7 +1,7 @@
1
1
  RSpec.describe Epics::C54 do
2
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
3
 
4
- subject { described_class.new(client, "2014-09-01", "2014-09-30") }
4
+ subject { described_class.new(client, from: "2014-09-01", to: "2014-09-30") }
5
5
 
6
6
  describe '#to_xml' do
7
7
  specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
@@ -0,0 +1,9 @@
1
+ RSpec.describe Epics::C5N 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, from: "2014-09-01", to: "2014-09-01") }
5
+
6
+ describe '#to_xml' do
7
+ specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
8
+ end
9
+ end
@@ -2,7 +2,7 @@ RSpec.describe Epics::CDZ do
2
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
3
 
4
4
  context 'with date range' do
5
- subject { described_class.new(client, "2014-09-01", "2014-09-30") }
5
+ subject { described_class.new(client, from: "2014-09-01", to: "2014-09-30") }
6
6
 
7
7
  describe '#to_xml' do
8
8
  specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
@@ -0,0 +1,23 @@
1
+ RSpec.describe Epics::CIP 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) { File.read( File.join( File.dirname(__FILE__), '..', 'fixtures', 'xml', 'cip.xml') ) }
5
+ subject { described_class.new(client, document) }
6
+
7
+ describe 'order attributes' do
8
+ it { expect(subject.header.to_s).to include('<OrderAttribute>OZHNN</OrderAttribute>') }
9
+ it { expect(subject.header.to_s).to include('<OrderType>CIP</OrderType>') }
10
+ end
11
+
12
+ describe '#to_xml' do
13
+ specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
14
+ end
15
+
16
+ describe '#to_transfer_xml' do
17
+ before { subject.transaction_id = SecureRandom.hex(16) }
18
+
19
+ specify { expect(subject.to_transfer_xml).to be_a_valid_ebics_doc }
20
+ end
21
+
22
+ end
23
+
@@ -2,7 +2,7 @@ RSpec.describe Epics::CRZ do
2
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
3
 
4
4
  context 'with date range' do
5
- subject { described_class.new(client, "2014-09-01", "2014-09-30") }
5
+ subject { described_class.new(client, from: "2014-09-01", to: "2014-09-30") }
6
6
 
7
7
  describe '#to_xml' do
8
8
  specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
@@ -2,7 +2,7 @@ RSpec.describe Epics::HAC do
2
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
3
 
4
4
  context 'with date range' do
5
- subject(:order) { described_class.new(client, "2014-09-01", "2014-09-30") }
5
+ subject(:order) { described_class.new(client, from: "2014-09-01", to: "2014-09-30") }
6
6
 
7
7
  describe '#to_xml' do
8
8
  specify { expect(order.to_xml).to be_a_valid_ebics_doc }
@@ -1,7 +1,7 @@
1
1
  RSpec.describe Epics::PTK do
2
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
3
 
4
- subject { described_class.new(client, "2014-09-01", "2014-09-30") }
4
+ subject { described_class.new(client, from: "2014-09-01", to: "2014-09-30") }
5
5
 
6
6
  describe '#to_xml' do
7
7
  specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
@@ -2,7 +2,7 @@ RSpec.describe Epics::STA do
2
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
3
 
4
4
  context 'with date range' do
5
- subject(:order) { described_class.new(client, "2014-09-01", "2014-09-30") }
5
+ subject(:order) { described_class.new(client, from: "2014-09-01", to: "2014-09-30") }
6
6
 
7
7
  describe '#to_xml' do
8
8
  specify { expect(order.to_xml).to be_a_valid_ebics_doc }
@@ -1,7 +1,7 @@
1
1
  RSpec.describe Epics::VMK do
2
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
3
 
4
- subject { described_class.new(client, "2014-09-01", "2014-09-30") }
4
+ subject { described_class.new(client, from: "2014-09-01", to: "2014-09-30") }
5
5
 
6
6
  describe '#to_xml' do
7
7
  specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
@@ -0,0 +1,9 @@
1
+ RSpec.describe Epics::WSS 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) }
5
+
6
+ describe '#to_xml' do
7
+ specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
8
+ end
9
+ end
@@ -2,7 +2,7 @@ RSpec.describe Epics::Z52 do
2
2
 
3
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
4
 
5
- subject { described_class.new(client, "2014-09-01", "2014-09-30") }
5
+ subject { described_class.new(client, from: "2014-09-01", to: "2014-09-30") }
6
6
 
7
7
  describe '#to_xml' do
8
8
  specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
@@ -2,7 +2,7 @@ RSpec.describe Epics::Z53 do
2
2
 
3
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
4
 
5
- subject { described_class.new(client, "2014-09-01", "2014-09-30") }
5
+ subject { described_class.new(client, from: "2014-09-01", to: "2014-09-30") }
6
6
 
7
7
  describe '#to_xml' do
8
8
  specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
@@ -1,7 +1,7 @@
1
1
  RSpec.describe Epics::Z54 do
2
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
3
 
4
- subject { described_class.new(client, "2014-09-01", "2014-09-30") }
4
+ subject { described_class.new(client, from: "2014-09-01", to: "2014-09-30") }
5
5
 
6
6
  describe '#to_xml' do
7
7
  specify { expect(subject.to_xml).to be_a_valid_ebics_doc }
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: 2.4.0
4
+ version: 2.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: 2024-06-21 00:00:00.000000000 Z
11
+ date: 2024-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -24,20 +24,34 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.10.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: i18n
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.1.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 1.1.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: nokogiri
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
45
  - - ">="
32
46
  - !ruby/object:Gem::Version
33
- version: 1.16.5
47
+ version: 1.16.7
34
48
  type: :runtime
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
52
  - - ">="
39
53
  - !ruby/object:Gem::Version
40
- version: 1.16.5
54
+ version: 1.16.7
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rubyzip
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -58,28 +72,28 @@ dependencies:
58
72
  requirements:
59
73
  - - ">="
60
74
  - !ruby/object:Gem::Version
61
- version: 3.2.8
75
+ version: 3.3.7
62
76
  type: :runtime
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
80
  - - ">="
67
81
  - !ruby/object:Gem::Version
68
- version: 3.2.8
82
+ version: 3.3.7
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: bundler
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - ">="
74
88
  - !ruby/object:Gem::Version
75
- version: 2.4.12
89
+ version: 2.5.19
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
94
  - - ">="
81
95
  - !ruby/object:Gem::Version
82
- version: 2.4.12
96
+ version: 2.5.19
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: equivalent-xml
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -184,6 +198,7 @@ files:
184
198
  - lib/epics/c52.rb
185
199
  - lib/epics/c53.rb
186
200
  - lib/epics/c54.rb
201
+ - lib/epics/c5n.rb
187
202
  - lib/epics/ccs.rb
188
203
  - lib/epics/cct.rb
189
204
  - lib/epics/cd1.rb
@@ -191,6 +206,7 @@ files:
191
206
  - lib/epics/cdd.rb
192
207
  - lib/epics/cds.rb
193
208
  - lib/epics/cdz.rb
209
+ - lib/epics/cip.rb
194
210
  - lib/epics/client.rb
195
211
  - lib/epics/crz.rb
196
212
  - lib/epics/error.rb
@@ -198,6 +214,7 @@ files:
198
214
  - lib/epics/generic_upload_request.rb
199
215
  - lib/epics/haa.rb
200
216
  - lib/epics/hac.rb
217
+ - lib/epics/header_request.rb
201
218
  - lib/epics/hia.rb
202
219
  - lib/epics/hkd.rb
203
220
  - lib/epics/hpb.rb
@@ -205,6 +222,7 @@ files:
205
222
  - lib/epics/htd.rb
206
223
  - lib/epics/ini.rb
207
224
  - lib/epics/key.rb
225
+ - lib/epics/letter_renderer.rb
208
226
  - lib/epics/middleware/parse_ebics.rb
209
227
  - lib/epics/middleware/xmlsig.rb
210
228
  - lib/epics/ptk.rb
@@ -213,6 +231,7 @@ files:
213
231
  - lib/epics/sta.rb
214
232
  - lib/epics/version.rb
215
233
  - lib/epics/vmk.rb
234
+ - lib/epics/wss.rb
216
235
  - lib/epics/xct.rb
217
236
  - lib/epics/xds.rb
218
237
  - lib/epics/xe2.rb
@@ -221,6 +240,9 @@ files:
221
240
  - lib/epics/z53.rb
222
241
  - lib/epics/z54.rb
223
242
  - lib/letter/ini.erb
243
+ - lib/letter/locales/de.yml
244
+ - lib/letter/locales/en.yml
245
+ - lib/letter/locales/fr.yml
224
246
  - spec/.DS_Store
225
247
  - spec/client_spec.rb
226
248
  - spec/error_spec.rb
@@ -237,6 +259,7 @@ files:
237
259
  - spec/fixtures/xml/cdb.xml
238
260
  - spec/fixtures/xml/cdb_init_response.xml
239
261
  - spec/fixtures/xml/cdb_transfer_response.xml
262
+ - spec/fixtures/xml/cip.xml
240
263
  - spec/fixtures/xml/ebics_business_nok.xml
241
264
  - spec/fixtures/xml/ebics_technical_nok.xml
242
265
  - spec/fixtures/xml/haa.xml
@@ -270,12 +293,14 @@ files:
270
293
  - spec/orders/c52_spec.rb
271
294
  - spec/orders/c53_spec.rb
272
295
  - spec/orders/c54_spec.rb
296
+ - spec/orders/c5n_spec.rb
273
297
  - spec/orders/ccs_spec.rb
274
298
  - spec/orders/cct_spec.rb
275
299
  - spec/orders/cd1_spec.rb
276
300
  - spec/orders/cdb_spec.rb
277
301
  - spec/orders/cdd_spec.rb
278
302
  - spec/orders/cdz_spec.rb
303
+ - spec/orders/cip_spec.rb
279
304
  - spec/orders/crz_spec.rb
280
305
  - spec/orders/haa_spec.rb
281
306
  - spec/orders/hac_spec.rb
@@ -288,6 +313,7 @@ files:
288
313
  - spec/orders/ptk_spec.rb
289
314
  - spec/orders/sta_spec.rb
290
315
  - spec/orders/vmk_spec.rb
316
+ - spec/orders/wss_spec.rb
291
317
  - spec/orders/xds_spec.rb
292
318
  - spec/orders/xe2_spec.rb
293
319
  - spec/orders/xe3_spec.rb
@@ -311,7 +337,10 @@ files:
311
337
  homepage: https://github.com/railslove/epics
312
338
  licenses:
313
339
  - LGPL-3.0
314
- metadata: {}
340
+ metadata:
341
+ changelog_uri: https://github.com/railslove/epics/blob/master/CHANGELOG.md
342
+ source_code_uri: https://github.com/railslove/epics
343
+ bug_tracker_uri: https://github.com/railslove/epics/issues
315
344
  post_install_message: "\n\e[32m************************************************************\n\e[0mThanks
316
345
  for using Epics - your epic EBICS client!\nEpics provides a full production-tested
317
346
  implementation of the Electronic Banking Internet Communication Standard.\nRailslove
@@ -326,14 +355,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
326
355
  requirements:
327
356
  - - ">="
328
357
  - !ruby/object:Gem::Version
329
- version: '2.7'
358
+ version: '3.1'
330
359
  required_rubygems_version: !ruby/object:Gem::Requirement
331
360
  requirements:
332
361
  - - ">="
333
362
  - !ruby/object:Gem::Version
334
363
  version: '0'
335
364
  requirements: []
336
- rubygems_version: 3.5.11
365
+ rubygems_version: 3.5.19
337
366
  signing_key:
338
367
  specification_version: 4
339
368
  summary: a ruby implementation of the EBICS protocol
@@ -354,6 +383,7 @@ test_files:
354
383
  - spec/fixtures/xml/cdb.xml
355
384
  - spec/fixtures/xml/cdb_init_response.xml
356
385
  - spec/fixtures/xml/cdb_transfer_response.xml
386
+ - spec/fixtures/xml/cip.xml
357
387
  - spec/fixtures/xml/ebics_business_nok.xml
358
388
  - spec/fixtures/xml/ebics_technical_nok.xml
359
389
  - spec/fixtures/xml/haa.xml
@@ -387,12 +417,14 @@ test_files:
387
417
  - spec/orders/c52_spec.rb
388
418
  - spec/orders/c53_spec.rb
389
419
  - spec/orders/c54_spec.rb
420
+ - spec/orders/c5n_spec.rb
390
421
  - spec/orders/ccs_spec.rb
391
422
  - spec/orders/cct_spec.rb
392
423
  - spec/orders/cd1_spec.rb
393
424
  - spec/orders/cdb_spec.rb
394
425
  - spec/orders/cdd_spec.rb
395
426
  - spec/orders/cdz_spec.rb
427
+ - spec/orders/cip_spec.rb
396
428
  - spec/orders/crz_spec.rb
397
429
  - spec/orders/haa_spec.rb
398
430
  - spec/orders/hac_spec.rb
@@ -405,6 +437,7 @@ test_files:
405
437
  - spec/orders/ptk_spec.rb
406
438
  - spec/orders/sta_spec.rb
407
439
  - spec/orders/vmk_spec.rb
440
+ - spec/orders/wss_spec.rb
408
441
  - spec/orders/xds_spec.rb
409
442
  - spec/orders/xe2_spec.rb
410
443
  - spec/orders/xe3_spec.rb