brcpfcnpj 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
data/lib/brcpfcnpj/cpf_cnpj.rb
CHANGED
@@ -29,12 +29,12 @@ module CpfCnpj
|
|
29
29
|
DIVISOR = 11
|
30
30
|
|
31
31
|
CPF_LENGTH = 11
|
32
|
-
CPF_REGEX =
|
32
|
+
CPF_REGEX = /^(\d{3}\.?\d{3}\.?\d{3})-?(\d{2})$/
|
33
33
|
CPF_ALGS_1 = [10, 9, 8, 7, 6, 5, 4, 3, 2]
|
34
34
|
CPF_ALGS_2 = [11, 10, 9, 8, 7, 6, 5, 4, 3, 2]
|
35
35
|
|
36
36
|
CNPJ_LENGTH = 14
|
37
|
-
CNPJ_REGEX =
|
37
|
+
CNPJ_REGEX = /^(\d{2}\.?\d{3}\.?\d{3}\/?\d{4})-?(\d{2})$/ # <= 11.222.333/0001-XX
|
38
38
|
CNPJ_ALGS_1 = [5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2]
|
39
39
|
CNPJ_ALGS_2 = [6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2]
|
40
40
|
|
data/lib/brcpfcnpj/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brcpfcnpj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Marcos Tapaj\xC3\xB3s"
|
@@ -13,7 +13,7 @@ autorequire:
|
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
15
|
|
16
|
-
date: 2009-02-
|
16
|
+
date: 2009-02-18 00:00:00 -03:00
|
17
17
|
default_executable:
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|