ibandit 1.12.0 → 1.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/tests.yml +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +4 -0
- data/data/german_iban_rules.yml +59 -20
- data/data/raw/BLZ2.txt +322 -362
- data/ibandit.gemspec +1 -1
- data/lib/ibandit/local_details_cleaner.rb +3 -3
- data/lib/ibandit/version.rb +1 -1
- data/spec/ibandit/iban_spec.rb +15 -15
- metadata +5 -5
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", "~> 3.
|
6
|
+
gem.add_development_dependency "gc_ruboconfig", "~> 3.6.2"
|
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"
|
@@ -294,7 +294,7 @@ module Ibandit
|
|
294
294
|
bank_code = local_details[:bank_code]
|
295
295
|
else
|
296
296
|
bic = Ibandit.find_bic("GB", branch_code)
|
297
|
-
bank_code = bic
|
297
|
+
bank_code = bic&.slice(0, 4)
|
298
298
|
end
|
299
299
|
|
300
300
|
account_number = local_details[:account_number].gsub(/[-\s]/, "")
|
@@ -359,7 +359,7 @@ module Ibandit
|
|
359
359
|
bank_code = local_details[:bank_code]
|
360
360
|
else
|
361
361
|
bic = Ibandit.find_bic("IE", branch_code)
|
362
|
-
bank_code = bic
|
362
|
+
bank_code = bic&.slice(0, 4)
|
363
363
|
end
|
364
364
|
|
365
365
|
account_number = local_details[:account_number].gsub(/[-\s]/, "")
|
@@ -426,7 +426,7 @@ module Ibandit
|
|
426
426
|
bank_code = local_details[:bank_code]
|
427
427
|
else
|
428
428
|
bic = Ibandit.find_bic("MT", branch_code)
|
429
|
-
bank_code = bic
|
429
|
+
bank_code = bic&.slice(0, 4)
|
430
430
|
end
|
431
431
|
|
432
432
|
account_number = local_details[:account_number].gsub(/[-\s]/, "")
|
data/lib/ibandit/version.rb
CHANGED
data/spec/ibandit/iban_spec.rb
CHANGED
@@ -946,8 +946,8 @@ describe Ibandit::IBAN do
|
|
946
946
|
iban.valid_check_digits?
|
947
947
|
expect(iban.errors).
|
948
948
|
to include(check_digits: "Verifique os dígitos. A verificação " \
|
949
|
-
"do módulo falhou. '82' esperados, '12'" \
|
950
|
-
"
|
949
|
+
"do módulo falhou. '82' esperados, '12' " \
|
950
|
+
"recebidos.")
|
951
951
|
end
|
952
952
|
end
|
953
953
|
|
@@ -1070,8 +1070,8 @@ describe Ibandit::IBAN do
|
|
1070
1070
|
iban.valid_length?
|
1071
1071
|
expect(iban.errors).
|
1072
1072
|
to include(length: "La longueur ne correspond pas à la " \
|
1073
|
-
"spécification SWIFT (22 caractères attendus," \
|
1074
|
-
"
|
1073
|
+
"spécification SWIFT (22 caractères attendus, " \
|
1074
|
+
"20 reçus)")
|
1075
1075
|
end
|
1076
1076
|
end
|
1077
1077
|
|
@@ -1089,9 +1089,9 @@ describe Ibandit::IBAN do
|
|
1089
1089
|
it "sets errors on the IBAN" do
|
1090
1090
|
iban.valid_length?
|
1091
1091
|
expect(iban.errors).
|
1092
|
-
to include(length: "O comprimento não corresponde à especificação" \
|
1093
|
-
"
|
1094
|
-
"
|
1092
|
+
to include(length: "O comprimento não corresponde à especificação " \
|
1093
|
+
"do código SWIFT (22 caracteres esperados, 20 " \
|
1094
|
+
"recebidos)")
|
1095
1095
|
end
|
1096
1096
|
end
|
1097
1097
|
|
@@ -1099,8 +1099,8 @@ describe Ibandit::IBAN do
|
|
1099
1099
|
it "sets errors on the IBAN" do
|
1100
1100
|
iban.valid_length?
|
1101
1101
|
expect(iban.errors).
|
1102
|
-
to include(length: "La longitud no coincide con la especificación" \
|
1103
|
-
"
|
1102
|
+
to include(length: "La longitud no coincide con la especificación " \
|
1103
|
+
"SWIFT (se esperaban 22 caracteres, pero se " \
|
1104
1104
|
"han recibido 20)")
|
1105
1105
|
end
|
1106
1106
|
end
|
@@ -1148,8 +1148,8 @@ describe Ibandit::IBAN do
|
|
1148
1148
|
it "sets errors on the IBAN" do
|
1149
1149
|
iban.valid_length?
|
1150
1150
|
expect(iban.errors).
|
1151
|
-
to include(length: "Længden modsvarer ikke SWIFT-specifikation" \
|
1152
|
-
"
|
1151
|
+
to include(length: "Længden modsvarer ikke SWIFT-specifikation " \
|
1152
|
+
"(forventede 22 tegn, modtog 20)")
|
1153
1153
|
end
|
1154
1154
|
end
|
1155
1155
|
|
@@ -1588,8 +1588,8 @@ describe Ibandit::IBAN do
|
|
1588
1588
|
it "sets errors on the IBAN" do
|
1589
1589
|
iban.valid_account_number_length?
|
1590
1590
|
expect(iban.errors).
|
1591
|
-
to include(account_number: "je napačne dolžine (biti mora 8" \
|
1592
|
-
"
|
1591
|
+
to include(account_number: "je napačne dolžine (biti mora 8 " \
|
1592
|
+
"znakov)")
|
1593
1593
|
end
|
1594
1594
|
end
|
1595
1595
|
|
@@ -1597,8 +1597,8 @@ describe Ibandit::IBAN do
|
|
1597
1597
|
it "sets errors on the IBAN" do
|
1598
1598
|
iban.valid_account_number_length?
|
1599
1599
|
expect(iban.errors).
|
1600
|
-
to include(account_number: "har forkert længde (skulle være 8" \
|
1601
|
-
"
|
1600
|
+
to include(account_number: "har forkert længde (skulle være 8 " \
|
1601
|
+
"tegn)")
|
1602
1602
|
end
|
1603
1603
|
end
|
1604
1604
|
|
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.
|
4
|
+
version: 1.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GoCardless
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-03-07 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: 3.
|
19
|
+
version: 3.6.2
|
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: 3.
|
26
|
+
version: 3.6.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: nokogiri
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -227,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
227
227
|
- !ruby/object:Gem::Version
|
228
228
|
version: '0'
|
229
229
|
requirements: []
|
230
|
-
rubygems_version: 3.
|
230
|
+
rubygems_version: 3.4.6
|
231
231
|
signing_key:
|
232
232
|
specification_version: 4
|
233
233
|
summary: Convert national banking details into IBANs, and vice-versa.
|