brval 0.9.7 → 0.9.72
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/brval/cnpj.rb +2 -3
- data/lib/brval/cpf.rb +2 -3
- data/lib/brval/val.rb +5 -3
- data/lib/brval/version.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19e4c0bbb0c91870d0b8efc04954b0fa09acf852d01a25ca760c6fbae4967013
|
4
|
+
data.tar.gz: 4955a027ec6f387156190f4e202dcfb539c2f093abbbeba7a5e12a711591be7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4acea2d11f7e8755ac4948d85cdbfc959006434de912f29edc405885b6f29f296cbdcba88eb7c86a17681e1348198dfcd852d41fae98cc7bd47ed9ce7b2cb374
|
7
|
+
data.tar.gz: 1f0650d34ad6aeec58070f5cfdc758edfbc01b226a375c56854acad9b5333935398eddeea23282e7361994bb704fe0eba01f7cba23eba1938fcf6d9c4e8a8ffd
|
data/README.md
CHANGED
@@ -51,7 +51,9 @@ Above is the list with all the functions and validations avaible on Brval gem.
|
|
51
51
|
| Brval.cep_info? |json | Json with cep information |
|
52
52
|
| Brval.cnh_valid? |true/false | |
|
53
53
|
| Brval.cnpj_valid? |true/false | |
|
54
|
+
| Brval.cnpj_mask |CNPJ com máscara| retorna o CNPJ com máscara: 00.000.000/0000-00 |
|
54
55
|
| Brval.cpf_valid? |true/false | |
|
56
|
+
| Brval.cpf_mask |CPF com máscara| retorna o CPF com máscara: 000.000.000-00 |
|
55
57
|
| Brval.credit_card_valid?|true/false | Number of credit card with 16 digits |
|
56
58
|
| Brval.lawsuit_valid? |true/false | Number of judicial process|
|
57
59
|
| Brval.pis_valid? |true/false | Same validation for: PIS/PASEP/NIT |
|
data/lib/brval/cnpj.rb
CHANGED
data/lib/brval/cpf.rb
CHANGED
data/lib/brval/val.rb
CHANGED
@@ -4,17 +4,19 @@ module Brval
|
|
4
4
|
attr_accessor :code
|
5
5
|
|
6
6
|
def initialize(code)
|
7
|
-
|
7
|
+
return if code.nil?
|
8
8
|
@code = code.tr('^0-9', '')
|
9
9
|
end
|
10
10
|
|
11
11
|
def mask
|
12
|
-
|
12
|
+
return if @code.nil?
|
13
|
+
masked
|
13
14
|
end
|
14
15
|
|
15
16
|
def valid?
|
17
|
+
return false if @code.nil?
|
16
18
|
validate_code
|
17
19
|
end
|
18
20
|
|
19
21
|
end
|
20
|
-
end
|
22
|
+
end
|
data/lib/brval/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brval
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.72
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lucas Andrade
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -48,22 +48,22 @@ dependencies:
|
|
48
48
|
name: rspec
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- - "~>"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '3.8'
|
54
51
|
- - ">="
|
55
52
|
- !ruby/object:Gem::Version
|
56
53
|
version: 3.8.0
|
54
|
+
- - "~>"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '3.8'
|
57
57
|
type: :development
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
|
-
- - "~>"
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: '3.8'
|
64
61
|
- - ">="
|
65
62
|
- !ruby/object:Gem::Version
|
66
63
|
version: 3.8.0
|
64
|
+
- - "~>"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '3.8'
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: simplecov
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
186
|
version: '0'
|
187
187
|
requirements: []
|
188
188
|
rubyforge_project:
|
189
|
-
rubygems_version: 2.7.
|
189
|
+
rubygems_version: 2.7.8
|
190
190
|
signing_key:
|
191
191
|
specification_version: 4
|
192
192
|
summary: Gem to validates many Brazilian codes
|