ibandit 0.8.0 → 0.8.1
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/ibandit/local_details_cleaner.rb +5 -5
- data/lib/ibandit/version.rb +1 -1
- data/spec/ibandit/local_details_cleaner_spec.rb +3 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59a4cb64351d1da7fb83dcece27c4b7735788b7b
|
4
|
+
data.tar.gz: 048ac84ce134410b1be9d6c72b65b982573fc571
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2f655c2333c7e9956327caa2d6c87ddc1e6950b897d1714b213fd40afb10a283a52243795f7657c346b81d505e0d0e25580b6d085bb801a628e7ccd0c89570a
|
7
|
+
data.tar.gz: 360e7bed76d6f188af247ad8059b3537a2f0f1ffb648e35e4eaf421f53d81afc712dc0923867669ed5783815a7e4ad81966bdc21195ae62aedf4bf37ddcf3aa8
|
data/CHANGELOG.md
CHANGED
@@ -3,14 +3,14 @@ module Ibandit
|
|
3
3
|
def self.clean(local_details)
|
4
4
|
country_code = local_details[:country_code]
|
5
5
|
|
6
|
-
|
7
|
-
local_details =
|
6
|
+
if can_clean?(country_code, local_details)
|
7
|
+
local_details = local_details.merge(
|
8
|
+
public_send(:"clean_#{country_code.downcase}_details", local_details))
|
8
9
|
end
|
9
10
|
|
10
|
-
return local_details
|
11
|
+
return local_details if explicit_swift_details?(country_code)
|
11
12
|
|
12
|
-
local_details.merge(
|
13
|
-
public_send(:"clean_#{country_code.downcase}_details", local_details))
|
13
|
+
swift_details_for(local_details).merge(local_details)
|
14
14
|
end
|
15
15
|
|
16
16
|
###########
|
data/lib/ibandit/version.rb
CHANGED
@@ -375,6 +375,7 @@ describe Ibandit::LocalDetailsCleaner do
|
|
375
375
|
context 'with the sort code is hyphenated' do
|
376
376
|
let(:branch_code) { '20-00-00' }
|
377
377
|
its([:branch_code]) { is_expected.to eq('200000') }
|
378
|
+
its([:swift_branch_code]) { is_expected.to eq('200000') }
|
378
379
|
end
|
379
380
|
|
380
381
|
context 'with the sort code spaced' do
|
@@ -385,6 +386,7 @@ describe Ibandit::LocalDetailsCleaner do
|
|
385
386
|
context 'with a short account number' do
|
386
387
|
let(:account_number) { '579135' }
|
387
388
|
its([:account_number]) { is_expected.to eq('00579135') }
|
389
|
+
its([:swift_account_number]) { is_expected.to eq('00579135') }
|
388
390
|
end
|
389
391
|
|
390
392
|
context 'with a too-short account number' do
|
@@ -421,6 +423,7 @@ describe Ibandit::LocalDetailsCleaner do
|
|
421
423
|
after { Ibandit.bic_finder = nil }
|
422
424
|
|
423
425
|
its([:bank_code]) { is_expected.to eq('BARC') }
|
426
|
+
its([:swift_bank_code]) { is_expected.to eq('BARC') }
|
424
427
|
end
|
425
428
|
end
|
426
429
|
|