bra_document_validation 1.1.0 → 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 +7 -4
- data/README.md +11 -5
- data/lib/bra_document_validation/version.rb +1 -1
- metadata +7 -62
- data/.github/dependabot.yml +0 -8
- data/.github/workflows/main.yml +0 -29
- data/.gitignore +0 -11
- data/.mise.toml +0 -2
- data/.rspec +0 -3
- data/.travis.yml +0 -9
- data/Gemfile +0 -6
- data/Gemfile.lock +0 -91
- data/Rakefile +0 -8
- data/bin/console +0 -12
- data/bin/rake +0 -16
- data/bin/rspec +0 -16
- data/bin/setup +0 -8
- data/bra_document_validation.gemspec +0 -36
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,15 @@
|
|
|
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
|
|
8
11
|
|
|
9
|
-
|
|
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))
|
|
10
13
|
|
|
11
14
|
## [1.1.0] - 2026-01-14
|
|
12
15
|
|
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,11 +1,11 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bra_document_validation
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bruno Vicenzo
|
|
8
|
-
bindir:
|
|
8
|
+
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
@@ -29,56 +29,14 @@ dependencies:
|
|
|
29
29
|
requirements:
|
|
30
30
|
- - ">="
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: 1.1.
|
|
32
|
+
version: 1.1.1
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - ">="
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: 1.1.
|
|
40
|
-
- !ruby/object:Gem::Dependency
|
|
41
|
-
name: irb
|
|
42
|
-
requirement: !ruby/object:Gem::Requirement
|
|
43
|
-
requirements:
|
|
44
|
-
- - ">="
|
|
45
|
-
- !ruby/object:Gem::Version
|
|
46
|
-
version: '0'
|
|
47
|
-
type: :development
|
|
48
|
-
prerelease: false
|
|
49
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
-
requirements:
|
|
51
|
-
- - ">="
|
|
52
|
-
- !ruby/object:Gem::Version
|
|
53
|
-
version: '0'
|
|
54
|
-
- !ruby/object:Gem::Dependency
|
|
55
|
-
name: rake
|
|
56
|
-
requirement: !ruby/object:Gem::Requirement
|
|
57
|
-
requirements:
|
|
58
|
-
- - ">="
|
|
59
|
-
- !ruby/object:Gem::Version
|
|
60
|
-
version: '0'
|
|
61
|
-
type: :development
|
|
62
|
-
prerelease: false
|
|
63
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
64
|
-
requirements:
|
|
65
|
-
- - ">="
|
|
66
|
-
- !ruby/object:Gem::Version
|
|
67
|
-
version: '0'
|
|
68
|
-
- !ruby/object:Gem::Dependency
|
|
69
|
-
name: rspec
|
|
70
|
-
requirement: !ruby/object:Gem::Requirement
|
|
71
|
-
requirements:
|
|
72
|
-
- - ">="
|
|
73
|
-
- !ruby/object:Gem::Version
|
|
74
|
-
version: '0'
|
|
75
|
-
type: :development
|
|
76
|
-
prerelease: false
|
|
77
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
78
|
-
requirements:
|
|
79
|
-
- - ">="
|
|
80
|
-
- !ruby/object:Gem::Version
|
|
81
|
-
version: '0'
|
|
39
|
+
version: 1.1.1
|
|
82
40
|
description: We can validate CPF and CNPJ formats and verifying digits.
|
|
83
41
|
email:
|
|
84
42
|
- bruno@alumni.usp.br
|
|
@@ -86,23 +44,9 @@ executables: []
|
|
|
86
44
|
extensions: []
|
|
87
45
|
extra_rdoc_files: []
|
|
88
46
|
files:
|
|
89
|
-
- ".github/dependabot.yml"
|
|
90
|
-
- ".github/workflows/main.yml"
|
|
91
|
-
- ".gitignore"
|
|
92
|
-
- ".mise.toml"
|
|
93
|
-
- ".rspec"
|
|
94
|
-
- ".travis.yml"
|
|
95
47
|
- CHANGELOG.md
|
|
96
|
-
- Gemfile
|
|
97
|
-
- Gemfile.lock
|
|
98
48
|
- LICENSE.txt
|
|
99
49
|
- README.md
|
|
100
|
-
- Rakefile
|
|
101
|
-
- bin/console
|
|
102
|
-
- bin/rake
|
|
103
|
-
- bin/rspec
|
|
104
|
-
- bin/setup
|
|
105
|
-
- bra_document_validation.gemspec
|
|
106
50
|
- lib/bra_document_validation.rb
|
|
107
51
|
- lib/bra_document_validation/cnpj_validator.rb
|
|
108
52
|
- lib/bra_document_validation/cpf_or_cnpj_validator.rb
|
|
@@ -112,10 +56,11 @@ homepage: https://github.com/bvicenzo/bra_document_validation
|
|
|
112
56
|
licenses:
|
|
113
57
|
- MIT
|
|
114
58
|
metadata:
|
|
115
|
-
allowed_push_host: https://rubygems.org
|
|
59
|
+
allowed_push_host: https://rubygems.org
|
|
116
60
|
homepage_uri: https://github.com/bvicenzo/bra_document_validation
|
|
117
61
|
source_code_uri: https://github.com/bvicenzo/bra_document_validation
|
|
118
62
|
changelog_uri: https://github.com/bvicenzo/bra_document_validation/blob/master/CHANGELOG.md
|
|
63
|
+
rubygems_mfa_required: 'true'
|
|
119
64
|
rdoc_options: []
|
|
120
65
|
require_paths:
|
|
121
66
|
- lib
|
|
@@ -130,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
130
75
|
- !ruby/object:Gem::Version
|
|
131
76
|
version: '0'
|
|
132
77
|
requirements: []
|
|
133
|
-
rubygems_version: 4.0.
|
|
78
|
+
rubygems_version: 4.0.20
|
|
134
79
|
specification_version: 4
|
|
135
80
|
summary: This gem add ActiveModel validations to Brazilian documents.
|
|
136
81
|
test_files: []
|
data/.github/dependabot.yml
DELETED
data/.github/workflows/main.yml
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
name: Ruby
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
|
|
8
|
-
pull_request:
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
build:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
name: Ruby ${{ matrix.ruby }}
|
|
14
|
-
strategy:
|
|
15
|
-
matrix:
|
|
16
|
-
ruby:
|
|
17
|
-
- '3.3.7'
|
|
18
|
-
- '3.4.2'
|
|
19
|
-
- '4.0.0'
|
|
20
|
-
|
|
21
|
-
steps:
|
|
22
|
-
- uses: actions/checkout@v5
|
|
23
|
-
- name: Set up Ruby
|
|
24
|
-
uses: ruby/setup-ruby@v1
|
|
25
|
-
with:
|
|
26
|
-
ruby-version: ${{ matrix.ruby }}
|
|
27
|
-
bundler-cache: true
|
|
28
|
-
- name: Run the default task
|
|
29
|
-
run: bundle exec rake
|
data/.gitignore
DELETED
data/.mise.toml
DELETED
data/.rspec
DELETED
data/.travis.yml
DELETED
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
bra_document_validation (1.1.0)
|
|
5
|
-
activemodel (>= 4.0)
|
|
6
|
-
bra_documents (>= 1.1.0)
|
|
7
|
-
|
|
8
|
-
GEM
|
|
9
|
-
remote: https://rubygems.org/
|
|
10
|
-
specs:
|
|
11
|
-
activemodel (8.1.1)
|
|
12
|
-
activesupport (= 8.1.1)
|
|
13
|
-
activesupport (8.1.1)
|
|
14
|
-
base64
|
|
15
|
-
bigdecimal
|
|
16
|
-
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
17
|
-
connection_pool (>= 2.2.5)
|
|
18
|
-
drb
|
|
19
|
-
i18n (>= 1.6, < 2)
|
|
20
|
-
json
|
|
21
|
-
logger (>= 1.4.2)
|
|
22
|
-
minitest (>= 5.1)
|
|
23
|
-
securerandom (>= 0.3)
|
|
24
|
-
tzinfo (~> 2.0, >= 2.0.5)
|
|
25
|
-
uri (>= 0.13.1)
|
|
26
|
-
base64 (0.3.0)
|
|
27
|
-
bigdecimal (4.0.1)
|
|
28
|
-
bra_documents (1.1.0)
|
|
29
|
-
concurrent-ruby (1.3.6)
|
|
30
|
-
connection_pool (3.0.2)
|
|
31
|
-
date (3.5.1)
|
|
32
|
-
diff-lcs (1.6.2)
|
|
33
|
-
drb (2.2.3)
|
|
34
|
-
erb (6.0.1)
|
|
35
|
-
i18n (1.14.8)
|
|
36
|
-
concurrent-ruby (~> 1.0)
|
|
37
|
-
io-console (0.8.2)
|
|
38
|
-
irb (1.16.0)
|
|
39
|
-
pp (>= 0.6.0)
|
|
40
|
-
rdoc (>= 4.0.0)
|
|
41
|
-
reline (>= 0.4.2)
|
|
42
|
-
json (2.18.0)
|
|
43
|
-
logger (1.7.0)
|
|
44
|
-
minitest (6.0.1)
|
|
45
|
-
prism (~> 1.5)
|
|
46
|
-
pp (0.6.3)
|
|
47
|
-
prettyprint
|
|
48
|
-
prettyprint (0.2.0)
|
|
49
|
-
prism (1.7.0)
|
|
50
|
-
psych (5.3.1)
|
|
51
|
-
date
|
|
52
|
-
stringio
|
|
53
|
-
rake (13.3.1)
|
|
54
|
-
rdoc (7.1.0)
|
|
55
|
-
erb
|
|
56
|
-
psych (>= 4.0.0)
|
|
57
|
-
tsort
|
|
58
|
-
reline (0.6.3)
|
|
59
|
-
io-console (~> 0.5)
|
|
60
|
-
rspec (3.13.2)
|
|
61
|
-
rspec-core (~> 3.13.0)
|
|
62
|
-
rspec-expectations (~> 3.13.0)
|
|
63
|
-
rspec-mocks (~> 3.13.0)
|
|
64
|
-
rspec-core (3.13.6)
|
|
65
|
-
rspec-support (~> 3.13.0)
|
|
66
|
-
rspec-expectations (3.13.5)
|
|
67
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
68
|
-
rspec-support (~> 3.13.0)
|
|
69
|
-
rspec-mocks (3.13.7)
|
|
70
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
71
|
-
rspec-support (~> 3.13.0)
|
|
72
|
-
rspec-support (3.13.6)
|
|
73
|
-
securerandom (0.4.1)
|
|
74
|
-
stringio (3.2.0)
|
|
75
|
-
tsort (0.2.0)
|
|
76
|
-
tzinfo (2.0.6)
|
|
77
|
-
concurrent-ruby (~> 1.0)
|
|
78
|
-
uri (1.1.1)
|
|
79
|
-
|
|
80
|
-
PLATFORMS
|
|
81
|
-
ruby
|
|
82
|
-
x86_64-darwin-24
|
|
83
|
-
|
|
84
|
-
DEPENDENCIES
|
|
85
|
-
bra_document_validation!
|
|
86
|
-
irb
|
|
87
|
-
rake
|
|
88
|
-
rspec
|
|
89
|
-
|
|
90
|
-
BUNDLED WITH
|
|
91
|
-
4.0.3
|
data/Rakefile
DELETED
data/bin/console
DELETED
|
@@ -1,12 +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
|
-
|
|
11
|
-
require 'irb'
|
|
12
|
-
IRB.start
|
data/bin/rake
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
#
|
|
5
|
-
# This file was generated by Bundler.
|
|
6
|
-
#
|
|
7
|
-
# The application 'rake' is installed as part of a gem, and
|
|
8
|
-
# this file is here to facilitate running it.
|
|
9
|
-
#
|
|
10
|
-
|
|
11
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
12
|
-
|
|
13
|
-
require "rubygems"
|
|
14
|
-
require "bundler/setup"
|
|
15
|
-
|
|
16
|
-
load Gem.bin_path("rake", "rake")
|
data/bin/rspec
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env ruby
|
|
2
|
-
# frozen_string_literal: true
|
|
3
|
-
|
|
4
|
-
#
|
|
5
|
-
# This file was generated by Bundler.
|
|
6
|
-
#
|
|
7
|
-
# The application 'rspec' is installed as part of a gem, and
|
|
8
|
-
# this file is here to facilitate running it.
|
|
9
|
-
#
|
|
10
|
-
|
|
11
|
-
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
|
12
|
-
|
|
13
|
-
require "rubygems"
|
|
14
|
-
require "bundler/setup"
|
|
15
|
-
|
|
16
|
-
load Gem.bin_path("rspec-core", "rspec")
|
data/bin/setup
DELETED
|
@@ -1,36 +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('>= 3.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.1.0'
|
|
32
|
-
|
|
33
|
-
spec.add_development_dependency 'irb'
|
|
34
|
-
spec.add_development_dependency 'rake'
|
|
35
|
-
spec.add_development_dependency 'rspec'
|
|
36
|
-
end
|