ibandit 0.11.2 → 0.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -5
- data/CHANGELOG.md +7 -0
- data/lib/ibandit/sweden/local_details_converter.rb +4 -4
- data/lib/ibandit/version.rb +1 -1
- data/spec/ibandit/sweden/local_details_converter_spec.rb +10 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80501a5289264551642783a61e29f3945e5f9887
|
4
|
+
data.tar.gz: 6cdd2b4ca9dcbf371f5a931bed37b50142f8a29d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3169d8e8b92c4249ba37daea8ab1ac5300527d184421fb4b46e4efe7fe484f03bbe05e719ea546a9322067185281e2fef5bda7ef3333910920b5c10ef941ef23
|
7
|
+
data.tar.gz: 9018fcda5c13367d8a82b8059ca685c6fc5912f6aa93460c8307f07acd63e81bce41ee794809a3935d7d2ed9ca56a02221c97ab4cb9458ce317c6a61bb488bf2
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 0.11.3 - March 9, 2017
|
2
|
+
|
3
|
+
- Fix bug: Previously, constructing an `Ibandit::IBAN` object with
|
4
|
+
`country_code: "SE"` and certain 4-digit values for `account_number`
|
5
|
+
would throw `NoMethodError`. The IBAN object can now be successfully
|
6
|
+
constructed (and will return a false value for `valid?`).
|
7
|
+
|
1
8
|
## 0.11.2 - July 4, 2016
|
2
9
|
|
3
10
|
- Handle invalid pseudo-IBANs
|
@@ -76,15 +76,15 @@ module Ibandit
|
|
76
76
|
end
|
77
77
|
|
78
78
|
return serial_number unless bank_info.fetch(:zerofill_serial_number)
|
79
|
-
|
80
|
-
serial_number.rjust(serial_number_length, '0')
|
79
|
+
serial_number && serial_number.rjust(serial_number_length, '0')
|
81
80
|
end
|
82
81
|
|
83
82
|
def swift_account_number
|
84
|
-
if bank_info.fetch(:include_clearing_code)
|
83
|
+
if bank_info.fetch(:include_clearing_code) &&
|
84
|
+
clearing_code && serial_number
|
85
85
|
(clearing_code + serial_number).rjust(17, '0')
|
86
86
|
else
|
87
|
-
serial_number.rjust(17, '0')
|
87
|
+
serial_number && serial_number.rjust(17, '0')
|
88
88
|
end
|
89
89
|
end
|
90
90
|
end
|
data/lib/ibandit/version.rb
CHANGED
@@ -131,6 +131,16 @@ describe Ibandit::Sweden::LocalDetailsConverter do
|
|
131
131
|
its([:swift_bank_code]) { is_expected.to eq('800') }
|
132
132
|
its([:swift_account_number]) { is_expected.to eq('00820169143579630') }
|
133
133
|
end
|
134
|
+
|
135
|
+
context 'in the 8000s range, with a very short input' do
|
136
|
+
let(:account_number) { '8004' }
|
137
|
+
let(:branch_code) { nil }
|
138
|
+
|
139
|
+
its([:account_number]) { is_expected.to be_nil }
|
140
|
+
its([:branch_code]) { is_expected.to eq('8004') }
|
141
|
+
its([:swift_bank_code]) { is_expected.to eq('800') }
|
142
|
+
its([:swift_account_number]) { is_expected.to be_nil }
|
143
|
+
end
|
134
144
|
end
|
135
145
|
|
136
146
|
context 'with a Sparbanken Öresund clearing code' 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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grey Baker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -176,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
176
|
version: '0'
|
177
177
|
requirements: []
|
178
178
|
rubyforge_project:
|
179
|
-
rubygems_version: 2.5.
|
179
|
+
rubygems_version: 2.5.2
|
180
180
|
signing_key:
|
181
181
|
specification_version: 4
|
182
182
|
summary: Convert national banking details into IBANs, and vice-versa.
|