bra_document_validation 1.0.2 → 1.1.1
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/CHANGELOG.md +20 -4
- data/README.md +11 -5
- data/lib/bra_document_validation/version.rb +1 -1
- metadata +9 -77
- data/.github/dependabot.yml +0 -8
- data/.gitignore +0 -11
- data/.rspec +0 -3
- data/.travis.yml +0 -9
- data/Gemfile +0 -6
- data/Gemfile.lock +0 -59
- data/Rakefile +0 -8
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/bra_document_validation.gemspec +0 -37
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1bcefde23dc697b9d6fc7a67518090edf3151049630b7ffc5fb657ccdcc5bb2b
|
|
4
|
+
data.tar.gz: 72867374069648e697e17e3cd313d319b1640d035f1ee744b4ff79894d00b0de
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1618caa72bbf880ad717634bd8aa91714df3c8fbb5d2f9caa847ef0a18ecf58a198a4fa31ad2795a9dbcbc53697c076b02cd357132f69362383f1d8c653e4c36
|
|
7
|
+
data.tar.gz: 998d9cd2851d8f1366abaceb7547bef6cf108e288e3aa21590d28cdb3b2dc54da311dd49a731af1ef8526bd1311ffeb50b4bc36530949fe8ed9ee31fefb420a0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
|
-
|
|
2
1
|
# Changelog
|
|
3
2
|
|
|
4
3
|
All notable changes to this project will be documented in this file.
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [1.1.1](https://github.com/bvicenzo/bra_document_validation/compare/v1.1.0...v1.1.1) (2026-12-01)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* require bra_documents 1.1.1 to reject formatted CPFs with repeated digits ([#44](https://github.com/bvicenzo/bra_document_validation/pull/44)) ([097dc40](https://github.com/bvicenzo/bra_document_validation/commit/097dc4021d6e7e9adb9b231cab5ca69c4cd5b8e9))
|
|
13
|
+
|
|
14
|
+
## [1.1.0] - 2026-01-14
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Update `bra_documents` dependency to `>= 1.1.0` for alphanumeric CNPJ support
|
|
19
|
+
- Update CNPJ validator to support alphanumeric format as per new Brazilian Federal Revenue regulation (effective July 2026)
|
|
20
|
+
- Reference: https://www.gov.br/receitafederal/pt-br/assuntos/noticias/2024/outubro/cnpj-tera-letras-e-numeros-a-partir-de-julho-de-2026
|
|
21
|
+
|
|
22
|
+
### Added
|
|
8
23
|
|
|
9
|
-
|
|
24
|
+
- Add IRB as development dependency
|
|
25
|
+
- Add binstubs for rake and rspec
|
|
10
26
|
|
|
11
27
|
## [1.0.2] - 2022-01-04
|
|
12
28
|
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# BraDocumentValidation
|
|
2
2
|
|
|
3
|
-
[](https://github.com/bvicenzo/bra_document_validation/actions/workflows/main.yml)
|
|
4
4
|
|
|
5
5
|
This gem allows to validate Brazilian documents, CPF and CNPJ, with format and digit verification.
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ This gem allows to validate Brazilian documents, CPF and CNPJ, with format and d
|
|
|
9
9
|
Add this line to your application's Gemfile:
|
|
10
10
|
|
|
11
11
|
```ruby
|
|
12
|
-
gem 'bra_document_validation'
|
|
12
|
+
gem 'bra_document_validation', '~> 1.1'
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
And then execute:
|
|
@@ -67,13 +67,19 @@ validates :document_number, 'bra_document_validation/cpf_or_cnpj': { message: :i
|
|
|
67
67
|
|
|
68
68
|
## Development
|
|
69
69
|
|
|
70
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake
|
|
70
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rake` to run the tests and RuboCop. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
71
71
|
|
|
72
|
-
To install this gem onto your local machine, run `bundle exec rake install`.
|
|
72
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
|
73
|
+
|
|
74
|
+
Releases are automated: the version, the `CHANGELOG.md`, the git tag and the push
|
|
75
|
+
to [rubygems.org](https://rubygems.org) are all derived from
|
|
76
|
+
[Conventional Commits](https://www.conventionalcommits.org/) by release-please.
|
|
77
|
+
There is no version to edit and no release command to run by hand — see
|
|
78
|
+
[CONTRIBUTING.md](CONTRIBUTING.md).
|
|
73
79
|
|
|
74
80
|
## Contributing
|
|
75
81
|
|
|
76
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
82
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/bvicenzo/bra_document_validation. Read [CONTRIBUTING.md](CONTRIBUTING.md) first — it covers the commit conventions the release automation depends on.
|
|
77
83
|
|
|
78
84
|
|
|
79
85
|
## License
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bra_document_validation
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bruno Vicenzo
|
|
8
|
-
|
|
9
|
-
bindir: exe
|
|
8
|
+
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activemodel
|
|
@@ -30,70 +29,14 @@ dependencies:
|
|
|
30
29
|
requirements:
|
|
31
30
|
- - ">="
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 1.
|
|
32
|
+
version: 1.1.1
|
|
34
33
|
type: :runtime
|
|
35
34
|
prerelease: false
|
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
36
|
requirements:
|
|
38
37
|
- - ">="
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 1.
|
|
41
|
-
- !ruby/object:Gem::Dependency
|
|
42
|
-
name: pry
|
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
|
44
|
-
requirements:
|
|
45
|
-
- - ">="
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: '0'
|
|
48
|
-
type: :development
|
|
49
|
-
prerelease: false
|
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
-
requirements:
|
|
52
|
-
- - ">="
|
|
53
|
-
- !ruby/object:Gem::Version
|
|
54
|
-
version: '0'
|
|
55
|
-
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: pry-nav
|
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
|
58
|
-
requirements:
|
|
59
|
-
- - ">="
|
|
60
|
-
- !ruby/object:Gem::Version
|
|
61
|
-
version: '0'
|
|
62
|
-
type: :development
|
|
63
|
-
prerelease: false
|
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
-
requirements:
|
|
66
|
-
- - ">="
|
|
67
|
-
- !ruby/object:Gem::Version
|
|
68
|
-
version: '0'
|
|
69
|
-
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: rake
|
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
|
72
|
-
requirements:
|
|
73
|
-
- - ">="
|
|
74
|
-
- !ruby/object:Gem::Version
|
|
75
|
-
version: '0'
|
|
76
|
-
type: :development
|
|
77
|
-
prerelease: false
|
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
-
requirements:
|
|
80
|
-
- - ">="
|
|
81
|
-
- !ruby/object:Gem::Version
|
|
82
|
-
version: '0'
|
|
83
|
-
- !ruby/object:Gem::Dependency
|
|
84
|
-
name: rspec
|
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
|
86
|
-
requirements:
|
|
87
|
-
- - ">="
|
|
88
|
-
- !ruby/object:Gem::Version
|
|
89
|
-
version: '0'
|
|
90
|
-
type: :development
|
|
91
|
-
prerelease: false
|
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
-
requirements:
|
|
94
|
-
- - ">="
|
|
95
|
-
- !ruby/object:Gem::Version
|
|
96
|
-
version: '0'
|
|
39
|
+
version: 1.1.1
|
|
97
40
|
description: We can validate CPF and CNPJ formats and verifying digits.
|
|
98
41
|
email:
|
|
99
42
|
- bruno@alumni.usp.br
|
|
@@ -101,19 +44,9 @@ executables: []
|
|
|
101
44
|
extensions: []
|
|
102
45
|
extra_rdoc_files: []
|
|
103
46
|
files:
|
|
104
|
-
- ".github/dependabot.yml"
|
|
105
|
-
- ".gitignore"
|
|
106
|
-
- ".rspec"
|
|
107
|
-
- ".travis.yml"
|
|
108
47
|
- CHANGELOG.md
|
|
109
|
-
- Gemfile
|
|
110
|
-
- Gemfile.lock
|
|
111
48
|
- LICENSE.txt
|
|
112
49
|
- README.md
|
|
113
|
-
- Rakefile
|
|
114
|
-
- bin/console
|
|
115
|
-
- bin/setup
|
|
116
|
-
- bra_document_validation.gemspec
|
|
117
50
|
- lib/bra_document_validation.rb
|
|
118
51
|
- lib/bra_document_validation/cnpj_validator.rb
|
|
119
52
|
- lib/bra_document_validation/cpf_or_cnpj_validator.rb
|
|
@@ -123,11 +56,11 @@ homepage: https://github.com/bvicenzo/bra_document_validation
|
|
|
123
56
|
licenses:
|
|
124
57
|
- MIT
|
|
125
58
|
metadata:
|
|
126
|
-
allowed_push_host: https://rubygems.org
|
|
59
|
+
allowed_push_host: https://rubygems.org
|
|
127
60
|
homepage_uri: https://github.com/bvicenzo/bra_document_validation
|
|
128
61
|
source_code_uri: https://github.com/bvicenzo/bra_document_validation
|
|
129
62
|
changelog_uri: https://github.com/bvicenzo/bra_document_validation/blob/master/CHANGELOG.md
|
|
130
|
-
|
|
63
|
+
rubygems_mfa_required: 'true'
|
|
131
64
|
rdoc_options: []
|
|
132
65
|
require_paths:
|
|
133
66
|
- lib
|
|
@@ -135,15 +68,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
135
68
|
requirements:
|
|
136
69
|
- - ">="
|
|
137
70
|
- !ruby/object:Gem::Version
|
|
138
|
-
version:
|
|
71
|
+
version: 3.3.0
|
|
139
72
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
73
|
requirements:
|
|
141
74
|
- - ">="
|
|
142
75
|
- !ruby/object:Gem::Version
|
|
143
76
|
version: '0'
|
|
144
77
|
requirements: []
|
|
145
|
-
rubygems_version:
|
|
146
|
-
signing_key:
|
|
78
|
+
rubygems_version: 4.0.20
|
|
147
79
|
specification_version: 4
|
|
148
80
|
summary: This gem add ActiveModel validations to Brazilian documents.
|
|
149
81
|
test_files: []
|
data/.github/dependabot.yml
DELETED
data/.gitignore
DELETED
data/.rspec
DELETED
data/.travis.yml
DELETED
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
bra_document_validation (1.0.2)
|
|
5
|
-
activemodel (>= 4.0)
|
|
6
|
-
bra_documents (>= 1.0.2)
|
|
7
|
-
|
|
8
|
-
GEM
|
|
9
|
-
remote: https://rubygems.org/
|
|
10
|
-
specs:
|
|
11
|
-
activemodel (7.0.2.3)
|
|
12
|
-
activesupport (= 7.0.2.3)
|
|
13
|
-
activesupport (7.0.2.3)
|
|
14
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
15
|
-
i18n (>= 1.6, < 2)
|
|
16
|
-
minitest (>= 5.1)
|
|
17
|
-
tzinfo (~> 2.0)
|
|
18
|
-
bra_documents (1.0.2)
|
|
19
|
-
coderay (1.1.3)
|
|
20
|
-
concurrent-ruby (1.1.10)
|
|
21
|
-
diff-lcs (1.5.0)
|
|
22
|
-
i18n (1.10.0)
|
|
23
|
-
concurrent-ruby (~> 1.0)
|
|
24
|
-
method_source (1.0.0)
|
|
25
|
-
minitest (5.15.0)
|
|
26
|
-
pry (0.14.1)
|
|
27
|
-
coderay (~> 1.1)
|
|
28
|
-
method_source (~> 1.0)
|
|
29
|
-
pry-nav (1.0.0)
|
|
30
|
-
pry (>= 0.9.10, < 0.15)
|
|
31
|
-
rake (13.0.6)
|
|
32
|
-
rspec (3.11.0)
|
|
33
|
-
rspec-core (~> 3.11.0)
|
|
34
|
-
rspec-expectations (~> 3.11.0)
|
|
35
|
-
rspec-mocks (~> 3.11.0)
|
|
36
|
-
rspec-core (3.11.0)
|
|
37
|
-
rspec-support (~> 3.11.0)
|
|
38
|
-
rspec-expectations (3.11.0)
|
|
39
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
40
|
-
rspec-support (~> 3.11.0)
|
|
41
|
-
rspec-mocks (3.11.0)
|
|
42
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
43
|
-
rspec-support (~> 3.11.0)
|
|
44
|
-
rspec-support (3.11.0)
|
|
45
|
-
tzinfo (2.0.4)
|
|
46
|
-
concurrent-ruby (~> 1.0)
|
|
47
|
-
|
|
48
|
-
PLATFORMS
|
|
49
|
-
ruby
|
|
50
|
-
|
|
51
|
-
DEPENDENCIES
|
|
52
|
-
bra_document_validation!
|
|
53
|
-
pry
|
|
54
|
-
pry-nav
|
|
55
|
-
rake
|
|
56
|
-
rspec
|
|
57
|
-
|
|
58
|
-
BUNDLED WITH
|
|
59
|
-
2.2.31
|
data/Rakefile
DELETED
data/bin/console
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
|
|
3
|
-
require 'bundler/setup'
|
|
4
|
-
require 'bra_document_validation'
|
|
5
|
-
|
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
-
|
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
-
require 'pry'
|
|
11
|
-
require 'pry-nav'
|
|
12
|
-
|
|
13
|
-
require 'irb'
|
|
14
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
require_relative 'lib/bra_document_validation/version'
|
|
2
|
-
|
|
3
|
-
Gem::Specification.new do |spec|
|
|
4
|
-
spec.name = 'bra_document_validation'
|
|
5
|
-
spec.version = BraDocumentValidation::VERSION
|
|
6
|
-
spec.authors = ['Bruno Vicenzo']
|
|
7
|
-
spec.email = ['bruno@alumni.usp.br']
|
|
8
|
-
|
|
9
|
-
spec.summary = %q{This gem add ActiveModel validations to Brazilian documents.}
|
|
10
|
-
spec.description = %q{We can validate CPF and CNPJ formats and verifying digits.}
|
|
11
|
-
spec.homepage = 'https://github.com/bvicenzo/bra_document_validation'
|
|
12
|
-
spec.license = 'MIT'
|
|
13
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
|
14
|
-
|
|
15
|
-
spec.metadata['allowed_push_host'] = 'https://rubygems.org/'
|
|
16
|
-
|
|
17
|
-
spec.metadata['homepage_uri'] = spec.homepage
|
|
18
|
-
spec.metadata['source_code_uri'] = spec.homepage
|
|
19
|
-
spec.metadata['changelog_uri'] = 'https://github.com/bvicenzo/bra_document_validation/blob/master/CHANGELOG.md'
|
|
20
|
-
|
|
21
|
-
# Specify which files should be added to the gem when it is released.
|
|
22
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
23
|
-
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
|
24
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
25
|
-
end
|
|
26
|
-
spec.bindir = 'exe'
|
|
27
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
28
|
-
spec.require_paths = ['lib']
|
|
29
|
-
|
|
30
|
-
spec.add_runtime_dependency 'activemodel', '>= 4.0'
|
|
31
|
-
spec.add_runtime_dependency 'bra_documents', '>= 1.0.2'
|
|
32
|
-
|
|
33
|
-
spec.add_development_dependency 'pry'
|
|
34
|
-
spec.add_development_dependency 'pry-nav'
|
|
35
|
-
spec.add_development_dependency 'rake'
|
|
36
|
-
spec.add_development_dependency 'rspec'
|
|
37
|
-
end
|