ibandit 0.11.7 → 0.11.9

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: e7911d5fb9900647ee7257b28020a16529a72693
4
- data.tar.gz: 5ca3914bc9337d79b9c57f1272c6a4e4709f315f
3
+ metadata.gz: f58a9db43e26404863fa70cc4bc0bec905739268
4
+ data.tar.gz: 3011d666acf4c4c777cc6a3da0dec1d06bfe359f
5
5
  SHA512:
6
- metadata.gz: 025c7ef0468f9092dcadb74a79dbd96141b463e8f410e546e8e98d3b914affae4840b5cb8e847980e872a3cd62e250c6326839a83545828cc4734fb84a1a951d
7
- data.tar.gz: 8ec07e2d051f7eb65ff57b3f3cf86e34f252c1f6dff2fa9249fe7bf60fd0873e21c86e20ee69b48058a1ad187db53bda9966b6567ebd8ec52eb3e4a7a9e64868
6
+ metadata.gz: 4f005ab73a2ff0e9ae0de0572c74bf828ced25cb30f57cf7bb9685f9ecdac27115dadbd3fb4e992c2bc9e6016eb5e235128985005496407ff8e1438aa78d1bb2
7
+ data.tar.gz: 8b8b871a7c71c6e145842c86ea18643b3e6cd2bbeed58ee3c9e8c3a7b152bfd64144b1ccffbceccd1975511eee644dd16ae243e334eea1961ce3472cfb9ecbe5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.11.9 - February 8, 2018
2
+
3
+ - Add support for Australian swift national ids
4
+
5
+ ## 0.11.8 - February 8, 2018
6
+
7
+ - Incorrectly published version. Please do not use.
8
+
1
9
  ## 0.11.7 - December 20, 2017
2
10
 
3
11
  - Add support for Australian pseudo-IBANs
data/data/structures.yml CHANGED
@@ -58,6 +58,7 @@ AU:
58
58
  :pseudo_iban_bank_code_length: 0
59
59
  :pseudo_iban_branch_code_length: 6
60
60
  :pseudo_iban_account_number_length: 9
61
+ :national_id_length: 6
61
62
  AZ:
62
63
  :bank_code_position: 5
63
64
  :bank_code_length: 4
data/lib/ibandit/iban.rb CHANGED
@@ -45,7 +45,7 @@ module Ibandit
45
45
  ###################
46
46
 
47
47
  def swift_national_id
48
- return unless decomposable?
48
+ return if swift_bank_code.nil? && swift_branch_code.nil?
49
49
 
50
50
  national_id = swift_bank_code.to_s
51
51
  national_id += swift_branch_code.to_s
@@ -1,3 +1,3 @@
1
1
  module Ibandit
2
- VERSION = "0.11.7".freeze
2
+ VERSION = "0.11.9".freeze
3
3
  end
@@ -175,6 +175,7 @@ describe Ibandit::IBAN do
175
175
  its(:swift_bank_code) { is_expected.to be_nil }
176
176
  its(:swift_branch_code) { is_expected.to eq("123456") }
177
177
  its(:swift_account_number) { is_expected.to eq("123456789") }
178
+ its(:swift_national_id) { is_expected.to eq("123456") }
178
179
  its(:iban) { is_expected.to be_nil }
179
180
  its(:pseudo_iban) { is_expected.to eq("AUZZ123456123456789") }
180
181
  its(:valid?) { is_expected.to eq(true) }
@@ -191,6 +192,7 @@ describe Ibandit::IBAN do
191
192
  its(:swift_bank_code) { is_expected.to be_nil }
192
193
  its(:swift_branch_code) { is_expected.to eq("123456") }
193
194
  its(:swift_account_number) { is_expected.to eq("123456789") }
195
+ its(:swift_national_id) { is_expected.to eq("123456") }
194
196
  its(:iban) { is_expected.to be_nil }
195
197
  its(:pseudo_iban) { is_expected.to eq("AUZZ123456123456789") }
196
198
  its(:valid?) { is_expected.to eq(true) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ibandit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.7
4
+ version: 0.11.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoCardless
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-20 00:00:00.000000000 Z
11
+ date: 2018-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri