iban_bic 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/lib/iban_bic/models/bic.rb +7 -0
- data/lib/iban_bic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ceee574baf89047cca1c43e4a56867d1a21c5765
|
4
|
+
data.tar.gz: aca6662efc0a326032265cd136d700da947c7010
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 620962ed8c778c9a76fa26bad91bf8893761caa57d48f8468eb3dd2ac8e3b59845ddee9c9ddfa2916571827a3448421d6b30280b5844c8cbcc57bf980b32478c
|
7
|
+
data.tar.gz: bfb982acd2ed33a89d7da67d115d9bee90e9681a070f2f87d7a3ffc606b0fdc87113f10413995105f870f17dd9ff8e1baec7d3825fe8b2eab136420e31da5686
|
data/README.md
CHANGED
@@ -126,6 +126,10 @@ $ bundle exec rails generate iban_bic:install --with-static-data
|
|
126
126
|
4. Customize initializer if needed, adding validations for new countries, or overriding YAML files.
|
127
127
|
|
128
128
|
## Changelog
|
129
|
+
#### 1.3.0
|
130
|
+
|
131
|
+
* Added BIC format validation in BIC model.
|
132
|
+
|
129
133
|
#### 1.2.0
|
130
134
|
|
131
135
|
* Added `like_pattern_from_parts` method. Not a very performant version.
|
@@ -137,7 +141,7 @@ $ bundle exec rails generate iban_bic:install --with-static-data
|
|
137
141
|
|
138
142
|
#### 1.0.1
|
139
143
|
|
140
|
-
* Added presence validations in BIC model
|
144
|
+
* Added presence validations in BIC model.
|
141
145
|
|
142
146
|
#### 1.0.0
|
143
147
|
|
data/lib/iban_bic/models/bic.rb
CHANGED
@@ -5,6 +5,13 @@ class Bic < ActiveRecord::Base
|
|
5
5
|
|
6
6
|
validates :country, :bank_code, :bic, presence: true
|
7
7
|
|
8
|
+
validate do
|
9
|
+
bic.upcase!
|
10
|
+
unless /[A-Z]{4}#{country}[0-9A-Z]{2,5}/.match? bic
|
11
|
+
errors.add(:bic, :invalid_format)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
8
15
|
after_commit do
|
9
16
|
IbanBic.clear_cache
|
10
17
|
end
|
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
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leonardo Diez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|