Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Faker::IDNumber.croatian_id method #2301

Merged
merged 2 commits into from May 3, 2021
Merged

Conversation

lovro-bikic
Copy link
Contributor

No-Story

Description:

This PR adds a method for generating Croatian ID numbers (also known as OIB in Croatia) to Faker::IDNumber class, implemented in a similar fashion to other methods in the class.
This method will be convenient to (Croatian) developers for generating valid OIBs since creating a valid number requires calculating a checksum digit according to an non-trivial algorithm specified by the ISO 7064 standard (see croatian_id_checksum_digit method).
When used internationally, OIB is prefixed by HR, hence the optional argument to add the prefix.

@lovro-bikic
Copy link
Contributor Author

The test suite fails on Ruby 2.6 with the spec test_es_ar_football_coach. As this spec is from another Faker class and I see the same error in other recent PRs, I don't think the error has to do with my changes.

Copy link
Member

@vbrazo vbrazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants