bra_documents 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +1 -1
- data/lib/bra_documents/cnpj_generator.rb +1 -1
- data/lib/bra_documents/cpf_generator.rb +1 -1
- data/lib/bra_documents/national_register_base.rb +4 -0
- data/lib/bra_documents/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0dd0427b2b2196ffdda4f751c6857e36b0bfd0d86c426c4de8d85611bf67517
|
4
|
+
data.tar.gz: f9330ff3775aaa84a1ec91e4df81fd5489e29760df6a087e0cdb38729f092a1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8924fcf456e4ec22225b0911117d155cb97f5ea7e6b1a8cdcac21cf9f30653da76cb89166636a161f6f2e0750424c2c6afaf29504a7cef5d51e0b70246c2232f
|
7
|
+
data.tar.gz: b9e333137523524838fedec86e55c96f9f2f1d198ae6527518e5214d129351c15287d3d60d6ca51af85f030c04bc594d8fcba12a4afa032c3a8d8fed53a9bb55
|
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
8
8
|
|
9
9
|
## [Unreleased]
|
10
10
|
|
11
|
+
## [1.0.2] - 2020-22-10
|
12
|
+
|
13
|
+
### Fixed
|
14
|
+
|
15
|
+
- CPFGenerator.valid_verification_digit? returning false if document does not have CPF format;
|
16
|
+
- CNPJGenerator.valid_verification_digit? returning false if document does not have CNPJ format;
|
17
|
+
|
11
18
|
## [1.0.1] - 2020-22-10
|
12
19
|
|
13
20
|
### Added
|
data/Gemfile.lock
CHANGED
@@ -55,7 +55,7 @@ module BraDocuments
|
|
55
55
|
# # => true
|
56
56
|
def valid_verification_digit?(document:)
|
57
57
|
raw_document = Formatter.raw(document)
|
58
|
-
return false if raw_document.
|
58
|
+
return false if black_listed?(raw_document) || !Matcher.match?(raw_document, kind: :cnpj, mode: :raw)
|
59
59
|
|
60
60
|
company_number = raw_document.slice(0..(COMPANY_NUMBER_SIZE - 1))
|
61
61
|
matrix_subsidiary_number = raw_document
|
@@ -41,7 +41,7 @@ module BraDocuments
|
|
41
41
|
# # => true
|
42
42
|
def valid_verification_digit?(document:)
|
43
43
|
raw_document = Formatter.raw(document)
|
44
|
-
return false if raw_document.
|
44
|
+
return false if black_listed?(raw_document) || !Matcher.match?(raw_document, kind: :cpf, mode: :raw)
|
45
45
|
|
46
46
|
person_number = raw_document.slice(0..(PERSON_NUMBER_SIZE - 1))
|
47
47
|
verified_digit = raw_document.slice(PERSON_NUMBER_SIZE..(raw_document.size - 1))
|