ibandit 1.8.0 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -0
- data/CHANGELOG.md +12 -0
- data/README.md +4 -4
- data/bin/build_structure_file.rb +1 -1
- data/data/german_iban_rules.yml +12 -69
- data/data/raw/BLZ2.txt +522 -837
- data/ibandit.gemspec +2 -1
- data/lib/ibandit/check_digit.rb +1 -1
- data/lib/ibandit/iban.rb +3 -3
- data/lib/ibandit/version.rb +1 -1
- data/lib/ibandit.rb +1 -1
- data/spec/ibandit/structure_spec.rb +1 -1
- metadata +6 -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", "~> 2.
|
6
|
+
gem.add_development_dependency "gc_ruboconfig", "~> 3.2.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"
|
@@ -28,4 +28,5 @@ Gem::Specification.new do |gem|
|
|
28
28
|
gem.require_paths = ["lib"]
|
29
29
|
gem.summary = "Convert national banking details into IBANs, and vice-versa."
|
30
30
|
gem.version = Ibandit::VERSION.dup
|
31
|
+
gem.metadata["rubygems_mfa_required"] = "true"
|
31
32
|
end
|
data/lib/ibandit/check_digit.rb
CHANGED
data/lib/ibandit/iban.rb
CHANGED
@@ -405,9 +405,9 @@ module Ibandit
|
|
405
405
|
code_digits = swift_bank_code.chars.map(&:to_i)
|
406
406
|
mod =
|
407
407
|
(
|
408
|
-
3 * (code_digits[0] + code_digits[3] + code_digits[6]) +
|
409
|
-
7 * (code_digits[1] + code_digits[4] + code_digits[7]) +
|
410
|
-
1 * (code_digits[2] + code_digits[5] + code_digits[8])
|
408
|
+
(3 * (code_digits[0] + code_digits[3] + code_digits[6])) +
|
409
|
+
(7 * (code_digits[1] + code_digits[4] + code_digits[7])) +
|
410
|
+
(1 * (code_digits[2] + code_digits[5] + code_digits[8]))
|
411
411
|
) % 10
|
412
412
|
|
413
413
|
@errors[:bank_code] = Ibandit.translate(:is_invalid) unless mod.zero?
|
data/lib/ibandit/version.rb
CHANGED
data/lib/ibandit.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
require "spec_helper"
|
4
4
|
|
5
5
|
describe "structures.yml" do
|
6
|
-
structure_file =
|
6
|
+
structure_file = File.read(File.expand_path("../../data/structures.yml", __dir__))
|
7
7
|
structures = YAML.safe_load(structure_file, permitted_classes: [Range, Symbol])
|
8
8
|
|
9
9
|
structures.each do |country, rules|
|
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.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GoCardless
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01
|
11
|
+
date: 2022-06-01 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: 3.2.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: 3.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: nokogiri
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -210,7 +210,8 @@ files:
|
|
210
210
|
homepage: https://github.com/gocardless/ibandit
|
211
211
|
licenses:
|
212
212
|
- MIT
|
213
|
-
metadata:
|
213
|
+
metadata:
|
214
|
+
rubygems_mfa_required: 'true'
|
214
215
|
post_install_message:
|
215
216
|
rdoc_options: []
|
216
217
|
require_paths:
|