| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Hi. Thank you for your contribution. The code itself looks good to me, but it looks like Ruby 3.2 and Ruby 3.3 issues are failing due to issue unrelated to your code. I'm looking to fix it as soon as possible to get the pipelines to run successfully.
Sorry, something went wrong.
|
It seems that the test fails because "O'reilly's lonely barbtail" has an apostrophe right after the capital O, which doesn't match /[A-Z][a-z]+'s [a-z]+ [a-z]+/ (file: test/faker/creature/test_faker_bird.rb) since it requires lowercase letters between the capital and the apostrophe. So, change line 89 out there from /[A-Z][a-z]+'s [a-z]+ [a-z]+/, to this one /[A-Z].+'s [a-z]+ [a-z]+/,, should be fix. Note: Using .+ allows apostrophes within the name before the possessive 's. |
Sorry, something went wrong.
|
@MoacirPetry Thank you - I've analysed the situation and came to the same conclusion. I'll implement a fix. |
Sorry, something went wrong.
|
btw, all O' names like O'connell, O'hara, O'keefe, D'amore have the same class of bug as O'reilly The .+ doesn't overmatch because the rest of the pattern 's [a-z]+ [a-z]+ constrains it. The .+ always backtracks to find the possessive 's followed by two lowercase words. Other example names like "Baltimore liberal budgerigar" or "Mississippi quizzical nativehen" correctly fall through to pattern 2 /[A-Z][a-z]+ [a-z]+ [a-z]+/ |
Sorry, something went wrong.
|
The last failure in my pull request seems to be an issue with caching inside ruby/setup-ruby when running against ruby-head. I need to have a look at that later, but the fixed (non-nightly) versions are fine in the pull request branch. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What does this PR do?
Adds Faker::Company.brazilian_company_alphanumeric to generate Brazilian company alphanumeric identification codes (14-character format with two check digits).
The alphanumeric CNPJ was introduced through Normative Instruction issued by the Brazilian Federal Revenue Service (Receita Federal) on October 15, 2024. It regulates how the CNPJ registry operates and establishes the transition to the alphanumeric format starting in July 2026.
Usage
How it works
Additional information
The first alphanumeric CNPJ is scheduled to be issued on July 31, 2026. See the reference over here.
The main goal is simple: prevent the exhaustion of available CNPJ numbers.
Every existing numeric CNPJ remains valid.
Simulations and Validations can be tested out over here.
Checklist
Before submitting the PR make sure the following are checked:
If you're proposing a new generator or locale: