iban_bic 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/active_model/validations/bic_validator.rb +1 -3
- data/lib/generators/iban_bic/install_generator.rb +1 -1
- data/lib/iban_bic/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 79d54adf9bc8b595fc9f7694432b98b4691cb961
|
|
4
|
+
data.tar.gz: 188d724bc1d08a24915e56a9a66daf3164657968
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4ba5148098f2477779407e6fc309ce4c4a24492a4f31b70c7adf994cc6f85e5fe8fa0583dbd573465f9a658a368757e701bb686d6870942f6a3add6b466f0114
|
|
7
|
+
data.tar.gz: 589012935320b25bfe476a84fc2d6ed6cd722eee088c260d4221eca7324d77a00f5e5f0dce1ff065f2914bf826815986e7fb3c42e2331b6c2ba925bb03707cc2
|
data/README.md
CHANGED
|
@@ -140,6 +140,10 @@ $ bundle exec rails generate iban_bic:install --with-static-data
|
|
|
140
140
|
4. Customize initializer if needed, adding validations for new countries, or overriding YAML files.
|
|
141
141
|
|
|
142
142
|
## Changelog
|
|
143
|
+
#### 1.4.2
|
|
144
|
+
|
|
145
|
+
* Dependencies security update.
|
|
146
|
+
|
|
143
147
|
#### 1.4.1
|
|
144
148
|
|
|
145
149
|
* Fixed BIC validation, don't allow less 1 or 2 characters for the office code and don't allow to add extra characters at the begining or at the end of the string.
|
|
@@ -10,9 +10,7 @@ module ActiveModel
|
|
|
10
10
|
class BicValidator < ActiveModel::EachValidator
|
|
11
11
|
def validate_each(record, attribute, value)
|
|
12
12
|
country_field = options[:country] ? record[options[:country]] : "[A-Z]{2}"
|
|
13
|
-
unless /^[A-Z]{4}#{country_field}[0-9A-Z]{2}([0-9A-Z]{3})?$/.match? value.upcase
|
|
14
|
-
record.errors.add(attribute, :invalid_format)
|
|
15
|
-
end
|
|
13
|
+
record.errors.add(attribute, :invalid_format) unless /^[A-Z]{4}#{country_field}[0-9A-Z]{2}([0-9A-Z]{3})?$/.match? value.upcase
|
|
16
14
|
end
|
|
17
15
|
end
|
|
18
16
|
end
|
|
@@ -8,7 +8,7 @@ module IbanBic
|
|
|
8
8
|
class InstallGenerator < ::Rails::Generators::Base
|
|
9
9
|
include ::Rails::Generators::Migration
|
|
10
10
|
|
|
11
|
-
source_root File.expand_path("
|
|
11
|
+
source_root File.expand_path("templates", __dir__)
|
|
12
12
|
|
|
13
13
|
class_option(
|
|
14
14
|
:with_static_bics,
|
data/lib/iban_bic/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: iban_bic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.
|
|
4
|
+
version: 1.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Leonardo Diez
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-04-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -86,14 +86,14 @@ dependencies:
|
|
|
86
86
|
requirements:
|
|
87
87
|
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version:
|
|
89
|
+
version: 0.54.0
|
|
90
90
|
type: :development
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version:
|
|
96
|
+
version: 0.54.0
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
98
|
name: sqlite3
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|