ibandit 0.8.0 → 0.8.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: 0bc26110597f8350ef5b91b0b2fbee330c21bc7b
4
- data.tar.gz: 3b1d66ea7ceb6b58f275d164e4e873c34416ddd4
3
+ metadata.gz: 59a4cb64351d1da7fb83dcece27c4b7735788b7b
4
+ data.tar.gz: 048ac84ce134410b1be9d6c72b65b982573fc571
5
5
  SHA512:
6
- metadata.gz: 32ad174ca626b5f73fff4472fc42699146b57d194a871b480cd30765efe7b74d7c918f9f92e75500b2367243521f128282730220818369d6105482ef257f8360
7
- data.tar.gz: 9440bd30011a7d61f2dd2beec9ee115ab27c0ca9af6cea75b2022d48ac3e25dfc49e3bfcdeb44665e2c0fe3ce1c3978494e9cd4233c80d25a51c280e596938ee
6
+ metadata.gz: c2f655c2333c7e9956327caa2d6c87ddc1e6950b897d1714b213fd40afb10a283a52243795f7657c346b81d505e0d0e25580b6d085bb801a628e7ccd0c89570a
7
+ data.tar.gz: 360e7bed76d6f188af247ad8059b3537a2f0f1ffb648e35e4eaf421f53d81afc712dc0923867669ed5783815a7e4ad81966bdc21195ae62aedf4bf37ddcf3aa8
@@ -1,3 +1,6 @@
1
+ ## 0.8.1 - August 14, 2015
2
+ - Clean SWIFT details
3
+
1
4
  ## 0.8.0 - August 14, 2015
2
5
  - Return local details for Sweden
3
6
  - Introduce pseudo-IBANs for Sweden
@@ -3,14 +3,14 @@ module Ibandit
3
3
  def self.clean(local_details)
4
4
  country_code = local_details[:country_code]
5
5
 
6
- unless explicit_swift_details?(country_code)
7
- local_details = swift_details_for(local_details).merge(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 unless can_clean?(country_code, 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
  ###########
@@ -1,3 +1,3 @@
1
1
  module Ibandit
2
- VERSION = '0.8.0'.freeze
2
+ VERSION = '0.8.1'.freeze
3
3
  end
@@ -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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ibandit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grey Baker