ibandit 0.11.16 → 0.11.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGELOG.md +4 -0
- data/README.md +7 -7
- data/lib/ibandit/local_details_cleaner.rb +1 -1
- data/lib/ibandit/version.rb +1 -1
- data/spec/ibandit/local_details_cleaner_spec.rb +5 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: d185a7140b320e5a5d7e46b3c42276341b61093c
|
|
4
|
+
data.tar.gz: afcd5829a0f4ef9b74fd35ee66b7045c5f985154
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b31920d1c68bb1caaf52a0c0e2b31dedcae5ec91169f57ff525639bcc0f3c2a444701096569b278c536abacf95729cdef80c546178b7f37f7cec70558081ff35
|
|
7
|
+
data.tar.gz: 26f3c276022e91fd683335d454a1e81f5b8d49b3e4ea06e3b74212135350942fec82a96772a351027dd03a35a7782dd676715b8997864fe792a08dd4968e787c
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -522,25 +522,25 @@ iban.iban # => nil
|
|
|
522
522
|
iban = Ibandit::IBAN.new(
|
|
523
523
|
country_code: 'NZ',
|
|
524
524
|
bank_code: '01',
|
|
525
|
-
branch_code: '
|
|
525
|
+
branch_code: '0004',
|
|
526
526
|
account_number: '3333333-44' # 7 digit account number and 2/3-digit account suffix
|
|
527
527
|
)
|
|
528
|
-
iban.pseudo_iban # => "
|
|
528
|
+
iban.pseudo_iban # => "NZZZ0100043333333044"
|
|
529
529
|
iban.iban # => nil
|
|
530
530
|
|
|
531
531
|
iban = Ibandit::IBAN.new(
|
|
532
532
|
country_code: 'NZ',
|
|
533
|
-
account_number: '01-
|
|
533
|
+
account_number: '01-0004-3333333-44'
|
|
534
534
|
)
|
|
535
|
-
iban.pseudo_iban # => "
|
|
535
|
+
iban.pseudo_iban # => "NZZZ0100043333333044"
|
|
536
536
|
iban.bank_code # => "01"
|
|
537
|
-
iban.branch_code # => "
|
|
537
|
+
iban.branch_code # => "0004"
|
|
538
538
|
iban.account_number # => "3333333044"
|
|
539
539
|
|
|
540
|
-
iban = Ibandit::IBAN.new('
|
|
540
|
+
iban = Ibandit::IBAN.new('NZZZ0100043333333044')
|
|
541
541
|
iban.country_code # => "NZ"
|
|
542
542
|
iban.bank_code # => "01"
|
|
543
|
-
iban.branch_code # => "
|
|
543
|
+
iban.branch_code # => "0004"
|
|
544
544
|
iban.account_number # => "3333333044"
|
|
545
545
|
```
|
|
546
546
|
|
|
@@ -455,7 +455,7 @@ module Ibandit
|
|
|
455
455
|
account_number = cleaned_account_number[6..-1]
|
|
456
456
|
end
|
|
457
457
|
|
|
458
|
-
if account_number.length == 9
|
|
458
|
+
if account_number && account_number.length == 9
|
|
459
459
|
# > Some banks (such as BNZ) include three digits of the suffix in their
|
|
460
460
|
# > presentation of the account number to the end customer. Other banks
|
|
461
461
|
# > only show the last two digits of the suffix to the end customer.
|
data/lib/ibandit/version.rb
CHANGED
|
@@ -956,6 +956,11 @@ describe Ibandit::LocalDetailsCleaner do
|
|
|
956
956
|
its([:branch_code]) { is_expected.to eq("2222") }
|
|
957
957
|
its([:account_number]) { is_expected.to eq("3333333044") }
|
|
958
958
|
end
|
|
959
|
+
|
|
960
|
+
context "when the account number is shorter than 6 chars" do
|
|
961
|
+
let(:account_number) { "12345" }
|
|
962
|
+
its([:account_number]) { is_expected.to be_nil }
|
|
963
|
+
end
|
|
959
964
|
end
|
|
960
965
|
|
|
961
966
|
context "without an account number" do
|
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.
|
|
4
|
+
version: 0.11.17
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GoCardless
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-09-
|
|
11
|
+
date: 2018-09-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|
|
@@ -206,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
206
206
|
version: '0'
|
|
207
207
|
requirements: []
|
|
208
208
|
rubyforge_project:
|
|
209
|
-
rubygems_version: 2.
|
|
209
|
+
rubygems_version: 2.6.14
|
|
210
210
|
signing_key:
|
|
211
211
|
specification_version: 4
|
|
212
212
|
summary: Convert national banking details into IBANs, and vice-versa.
|