ibandit 0.8.7 → 0.8.8

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: d17b62b63ca200b4466aa2b829ece380d72e75e5
4
- data.tar.gz: c2ed6424bdf45139c76ab789b20486ad8e6d01c7
3
+ metadata.gz: 101e32709372c4aa77b414ffd6a51e72b76d01c0
4
+ data.tar.gz: 18864657f16536a50ef7037a1e0c3d583c94693f
5
5
  SHA512:
6
- metadata.gz: c565399245d02f68432d5cf2c02accd63512d35d0dbe0d7b1108650080516be41550b9065f9a5800a4284fb3c3cfab14fb2c15ad457d467afc6382e7f2dead08
7
- data.tar.gz: 1f646383896e595c8c1491a1dd4259d60733922207aad86008e9a049b5cfb604805938dd0b9ec166161f15c7770ed641f6d7727a2a0438840ba56ba8bcfc8c24
6
+ metadata.gz: a7d31438134017276eea2e49cd41861cc9f52da897e3954a0315bb8f405867e864935c4b9538eff7dd44bff0fc0db41f4d4750aab916ea0ce49bf9acad63fa6b
7
+ data.tar.gz: 3069f177708f23613f0d3d7e35837ae77b6366aed8aaae399e3a9f7fd24b281634d9515c0a55068deb1ebbe0659b5a9fdfe786725838a166be7c7a22056d0cad
data/.travis.yml CHANGED
@@ -9,9 +9,12 @@ rvm:
9
9
  - 2.0
10
10
  - 2.1
11
11
  - 2.2
12
+ - 2.3.0
12
13
  - jruby
13
14
  - rbx-2
14
15
 
16
+ sudo: false
17
+
15
18
  script:
16
19
  - bundle exec rubocop
17
20
  - bundle exec rspec spec
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.8.8 - January 22, 2016
2
+
3
+ - Strip whitespace from Spanish account numbers
4
+
1
5
  ## 0.8.7 - December 8, 2015
2
6
 
3
7
  - Handle bad characters gracefully when constructing Italian IBANs
@@ -191,9 +191,10 @@ module Ibandit
191
191
  if local_details[:bank_code] && local_details[:branch_code]
192
192
  bank_code = local_details[:bank_code]
193
193
  branch_code = local_details[:branch_code]
194
- account_number = local_details[:account_number]
194
+ account_number = local_details[:account_number].gsub(/[-\s]/, '')
195
195
  else
196
- cleaned_account_number = local_details[:account_number].tr('-', '')
196
+ cleaned_account_number =
197
+ local_details[:account_number].gsub(/[-\s]/, '')
197
198
 
198
199
  bank_code = cleaned_account_number.slice(0, 4)
199
200
  branch_code = cleaned_account_number.slice(4, 4)
@@ -1,3 +1,3 @@
1
1
  module Ibandit
2
- VERSION = '0.8.7'.freeze
2
+ VERSION = '0.8.8'.freeze
3
3
  end
@@ -305,6 +305,11 @@ describe Ibandit::LocalDetailsCleaner do
305
305
  its([:account_number]) { is_expected.to eq('180000012345') }
306
306
  end
307
307
 
308
+ context 'with spaces in the account number' do
309
+ let(:account_number) { '18 0000012345' }
310
+ its([:account_number]) { is_expected.to eq('180000012345') }
311
+ end
312
+
308
313
  context 'without an account number' do
309
314
  let(:account_number) { nil }
310
315
  it { is_expected.to eq(local_details_with_swift) }
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.8.7
4
+ version: 0.8.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grey Baker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-08 00:00:00.000000000 Z
11
+ date: 2016-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec