ibandit 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/data/german_iban_rules.yml +9 -3
- data/data/raw/BLZ2.txt +448 -494
- data/ibandit.gemspec +1 -1
- data/lib/ibandit/german_details_converter.rb +4 -2
- data/lib/ibandit/local_details_cleaner.rb +2 -1
- data/lib/ibandit/version.rb +1 -1
- data/spec/ibandit/german_details_converter_spec.rb +2 -2
- data/spec/ibandit/iban_spec.rb +2 -2
- metadata +4 -4
data/ibandit.gemspec
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
require File.expand_path("lib/ibandit/version", __dir__)
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
|
-
gem.add_development_dependency "gc_ruboconfig", "~> 2.
|
6
|
+
gem.add_development_dependency "gc_ruboconfig", "~> 2.29.0"
|
7
7
|
gem.add_development_dependency "nokogiri", "~> 1.6"
|
8
8
|
gem.add_development_dependency "pry", "~> 0.13"
|
9
9
|
gem.add_development_dependency "pry-byebug", "~> 3.9"
|
@@ -270,13 +270,15 @@ module Ibandit
|
|
270
270
|
when "13"
|
271
271
|
if unpadded_account_number.size.between?(6, 7)
|
272
272
|
unpadded_account_number + "00"
|
273
|
-
else
|
273
|
+
else
|
274
|
+
@account_number
|
274
275
|
end
|
275
276
|
when "76"
|
276
277
|
case unpadded_account_number.size
|
277
278
|
when 7..8
|
278
279
|
if Check76.new(@account_number).valid? then @account_number
|
279
|
-
else
|
280
|
+
else
|
281
|
+
unpadded_account_number + "00"
|
280
282
|
end
|
281
283
|
when 5..6 then unpadded_account_number + "00"
|
282
284
|
else @account_number
|
@@ -42,7 +42,8 @@ module Ibandit
|
|
42
42
|
%i[account_number]
|
43
43
|
when "GB", "IE", "MT"
|
44
44
|
if Ibandit.bic_finder.nil? then %i[bank_code branch_code account_number]
|
45
|
-
else
|
45
|
+
else
|
46
|
+
%i[branch_code account_number]
|
46
47
|
end
|
47
48
|
when "AU"
|
48
49
|
%i[branch_code account_number]
|
data/lib/ibandit/version.rb
CHANGED
@@ -19,7 +19,7 @@ describe Ibandit::GermanDetailsConverter do
|
|
19
19
|
|
20
20
|
convertor.fetch("valid", []).each do |tuple|
|
21
21
|
context "bank code: #{tuple['bank_code']} account number " \
|
22
|
-
|
22
|
+
"#{tuple['account_number']}" do
|
23
23
|
let(:bank_code) do
|
24
24
|
tuple["bank_code"]
|
25
25
|
end
|
@@ -44,7 +44,7 @@ describe Ibandit::GermanDetailsConverter do
|
|
44
44
|
|
45
45
|
convertor.fetch("invalid", []).each do |tuple|
|
46
46
|
context "bank code: #{tuple['bank_code']} account number " \
|
47
|
-
|
47
|
+
"#{tuple['account_number']}" do
|
48
48
|
let(:bank_code) { tuple["bank_code"] || "00000000" }
|
49
49
|
let(:account_number) { tuple["account_number"] }
|
50
50
|
|
data/spec/ibandit/iban_spec.rb
CHANGED
@@ -1061,7 +1061,7 @@ describe Ibandit::IBAN do
|
|
1061
1061
|
iban.valid_length?
|
1062
1062
|
expect(iban.errors).
|
1063
1063
|
to include(length: "Length doesn't match SWIFT specification " \
|
1064
|
-
|
1064
|
+
"(expected 22 characters, received 20)")
|
1065
1065
|
end
|
1066
1066
|
end
|
1067
1067
|
|
@@ -1313,7 +1313,7 @@ describe Ibandit::IBAN do
|
|
1313
1313
|
iban.valid_branch_code_length?
|
1314
1314
|
expect(iban.errors).
|
1315
1315
|
to include(branch_code: "is the wrong length (should be 6 " \
|
1316
|
-
|
1316
|
+
"characters)")
|
1317
1317
|
end
|
1318
1318
|
end
|
1319
1319
|
|
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: 1.7.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GoCardless
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gc_ruboconfig
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.29.0
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.29.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: nokogiri
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|