sepa_king 0.10.0 → 0.10.1

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
2
  SHA1:
3
- metadata.gz: 26e9894eb7ccc0a61f5f5eaba7f787c9c0e19095
4
- data.tar.gz: effbc319d83f8b8967ef06f3055ea1af5a686de5
3
+ metadata.gz: 06ba65debe0037b33312ef3e37e26ee1961f455e
4
+ data.tar.gz: 2a18cefa0543ff2e0f4d3ca80fe85188e97615a2
5
5
  SHA512:
6
- metadata.gz: 7d228d0db0b1fdba496ddf820a9ce9ecb0ee3c9e7b685705353eb9e2022975c103577324e37b8091709cd581d317c01b3d452cebafc0e559a2b8736d024ccf9c
7
- data.tar.gz: a4f437e100aecbe85d63ab94075176cbd348756a1640ed09566aaf855008dfdf2cc4ff0e7eec5caa3ebcd3147bf01a1289ac590dca439b72d16fc89c26be1aca
6
+ metadata.gz: dad5f9e7304d1cba1cc7e241cfd3a5a394d7ca5214a0e64194dd774fb72b10d749d44bba655152e7e92339a3496bd6b51da26da529b6012e5517165d2800cae0
7
+ data.tar.gz: aea41790a245876bf8659a85118034c80f5ed09f7e9d9d7080af65a0de96679f58648e2945ed309abc0d0437aa5e4545ba711e061b697f3b5c3ab4420664ea75
@@ -1,9 +1,9 @@
1
1
  rvm:
2
2
  - 2.0.0
3
3
  - 2.1.10
4
- - 2.2.7
5
- - 2.3.4
6
- - 2.4.1
4
+ - 2.2.8
5
+ - 2.3.5
6
+ - 2.4.2
7
7
  gemfile:
8
8
  - gemfiles/Gemfile-activemodel-3.0.x
9
9
  - gemfiles/Gemfile-activemodel-3.1.x
@@ -23,8 +23,8 @@ matrix:
23
23
  gemfile: gemfiles/Gemfile-activemodel-5.0.x
24
24
  - rvm: 2.1.10
25
25
  gemfile: gemfiles/Gemfile-activemodel-5.0.x
26
- - rvm: 2.4.1
26
+ - rvm: 2.4.2
27
27
  gemfile: gemfiles/Gemfile-activemodel-4.1.x
28
- - rvm: 2.4.1
28
+ - rvm: 2.4.2
29
29
  gemfile: gemfiles/Gemfile-activemodel-4.2.x
30
30
  sudo: false
@@ -15,7 +15,7 @@ module SEPA
15
15
  def schema_compatible?(schema_name)
16
16
  case schema_name
17
17
  when PAIN_001_001_03
18
- self.bic.present? && self.service_level == 'SEPA'
18
+ self.service_level == 'SEPA'
19
19
  when PAIN_001_002_03
20
20
  self.bic.present? && self.service_level == 'SEPA' && self.currency == 'EUR'
21
21
  when PAIN_001_003_03
@@ -1,3 +1,3 @@
1
1
  module SEPA
2
- VERSION = '0.10.0'
2
+ VERSION = '0.10.1'
3
3
  end
@@ -62,6 +62,12 @@ describe SEPA::CreditTransfer do
62
62
  expect(subject.to_xml).to validate_against('pain.001.003.03.xsd')
63
63
  end
64
64
 
65
+ it 'should fail for pain.001.001.03' do
66
+ expect {
67
+ subject.to_xml(SEPA::PAIN_001_001_03)
68
+ }.to raise_error(RuntimeError)
69
+ end
70
+
65
71
  it 'should fail for pain.001.002.03' do
66
72
  expect {
67
73
  subject.to_xml(SEPA::PAIN_001_002_03)
@@ -327,6 +333,32 @@ describe SEPA::CreditTransfer do
327
333
  }.to raise_error(RuntimeError)
328
334
  end
329
335
  end
336
+
337
+ context 'with a transaction without a bic' do
338
+ subject do
339
+ sct = credit_transfer
340
+
341
+ sct.add_transaction name: 'Telekomiker AG',
342
+ iban: 'DE37112589611964645802',
343
+ amount: 102.50
344
+
345
+ sct
346
+ end
347
+
348
+ it 'should validate against pain.001.001.03' do
349
+ expect(subject.to_xml('pain.001.001.03')).to validate_against('pain.001.001.03.xsd')
350
+ end
351
+
352
+ it 'should fail for pain.001.002.03' do
353
+ expect {
354
+ subject.to_xml(SEPA::PAIN_001_002_03)
355
+ }.to raise_error(RuntimeError)
356
+ end
357
+
358
+ it 'should validate against pain.001.003.03' do
359
+ expect(subject.to_xml(SEPA::PAIN_001_003_03)).to validate_against('pain.001.003.03.xsd')
360
+ end
361
+ end
330
362
  end
331
363
  end
332
364
  end
@@ -41,6 +41,7 @@ describe SEPA::CreditTransferTransaction do
41
41
  context 'for pain.001.001.03' do
42
42
  it 'should succeed for valid attributes' do
43
43
  expect(SEPA::CreditTransferTransaction.new(:bic => 'SPUEDE2UXXX', :currency => 'CHF')).to be_schema_compatible('pain.001.001.03')
44
+ expect(SEPA::CreditTransferTransaction.new(:bic => nil)).to be_schema_compatible('pain.001.003.03')
44
45
  end
45
46
  end
46
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sepa_king
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Georg Leciejewski
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-08-17 00:00:00.000000000 Z
12
+ date: 2017-09-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel
@@ -223,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  version: '0'
224
224
  requirements: []
225
225
  rubyforge_project:
226
- rubygems_version: 2.6.12
226
+ rubygems_version: 2.6.13
227
227
  signing_key:
228
228
  specification_version: 4
229
229
  summary: Ruby gem for creating SEPA XML files