ibandit 0.8.6 → 0.8.7

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: a9da0a143368692ae76fb170942e63b07bef17e4
4
- data.tar.gz: 13e9cdf6f0ac038abac5e3b48d8e74c1737964a7
3
+ metadata.gz: d17b62b63ca200b4466aa2b829ece380d72e75e5
4
+ data.tar.gz: c2ed6424bdf45139c76ab789b20486ad8e6d01c7
5
5
  SHA512:
6
- metadata.gz: 2c4b615dd3dc89444e33590ef8cb96c003183ef8517f4d21c06bd435ef1a8ea300f60856f64a7570dca7fc5c1734e1438c2b0803c3721f880cf0f069f1daaf6a
7
- data.tar.gz: cd28f0b97c3712069122c14fc3d814b6d255f2353820190bbebcd41b012c7371481bc090c981fe4ef107bbb0f9f079d7d236954f8ef19ee832547588a8150e07
6
+ metadata.gz: c565399245d02f68432d5cf2c02accd63512d35d0dbe0d7b1108650080516be41550b9065f9a5800a4284fb3c3cfab14fb2c15ad457d467afc6382e7f2dead08
7
+ data.tar.gz: 1f646383896e595c8c1491a1dd4259d60733922207aad86008e9a049b5cfb604805938dd0b9ec166161f15c7770ed641f6d7727a2a0438840ba56ba8bcfc8c24
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.8.7 - December 8, 2015
2
+
3
+ - Handle bad characters gracefully when constructing Italian IBANs
4
+
1
5
  ## 0.8.6 - December 6, 2015
2
6
 
3
7
  - Add details of Swedish validation scheme to Swedish data file
@@ -34,7 +34,7 @@ module Ibandit
34
34
  when 65..90 then char.ord - 65 # A..Z
35
35
  else
36
36
  raise InvalidCharacterError,
37
- "Unexpected non-alphanumeric character '#{char}'"
37
+ "Unexpected character '#{char}'"
38
38
  end
39
39
  end
40
40
  end
@@ -15,6 +15,8 @@ module Ibandit
15
15
  end
16
16
 
17
17
  assemble_iban(country_code, bban)
18
+ rescue InvalidCharacterError
19
+ nil
18
20
  end
19
21
 
20
22
  ##############################
@@ -1,3 +1,3 @@
1
1
  module Ibandit
2
- VERSION = '0.8.6'.freeze
2
+ VERSION = '0.8.7'.freeze
3
3
  end
@@ -498,6 +498,11 @@ describe Ibandit::IBANAssembler do
498
498
  it { is_expected.to eq('IT64Y0542811101000000123456') }
499
499
  end
500
500
 
501
+ context 'with a bad character' do
502
+ before { args[:account_number] = '000000123hhh' }
503
+ it { is_expected.to be_nil }
504
+ end
505
+
501
506
  context 'without a bank_code' do
502
507
  before { args.delete(:bank_code) }
503
508
  it { is_expected.to be_nil }
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.6
4
+ version: 0.8.7
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-06 00:00:00.000000000 Z
11
+ date: 2015-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec