{"id":19404928,"url":"https://github.com/samesystem/social_security_number","last_synced_at":"2025-04-09T08:09:55.392Z","repository":{"id":56896393,"uuid":"109001412","full_name":"samesystem/social_security_number","owner":"samesystem","description":"Useful methods for your Ruby/Rails app to validate national identification numbers","archived":false,"fork":false,"pushed_at":"2024-10-18T06:42:05.000Z","size":138,"stargazers_count":18,"open_issues_count":3,"forks_count":4,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-02T05:09:49.615Z","etag":null,"topics":["rails","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samesystem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-31T13:42:55.000Z","updated_at":"2024-10-18T06:42:09.000Z","dependencies_parsed_at":"2024-10-19T10:52:06.279Z","dependency_job_id":null,"html_url":"https://github.com/samesystem/social_security_number","commit_stats":{"total_commits":77,"total_committers":4,"mean_commits":19.25,"dds":0.07792207792207795,"last_synced_commit":"53ccd363da424f460cb56d019b339613891a9dc9"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samesystem%2Fsocial_security_number","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samesystem%2Fsocial_security_number/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samesystem%2Fsocial_security_number/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samesystem%2Fsocial_security_number/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samesystem","download_url":"https://codeload.github.com/samesystem/social_security_number/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247999861,"owners_count":21031046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rails","ruby"],"created_at":"2024-11-10T11:36:42.450Z","updated_at":"2025-04-09T08:09:55.373Z","avatar_url":"https://github.com/samesystem.png","language":"Ruby","readme":"[![Build Status](https://travis-ci.org/samesystem/graphql_rails.svg?branch=master)](https://travis-ci.org/samesystem/graphql_rails)\n[![codecov](https://codecov.io/gh/samesystem/social_security_number/branch/master/graph/badge.svg)](https://codecov.io/gh/samesystem/social_security_number)\n\n# SocialSecurityNumber\n\nThis small Gem adds useful methods to your Ruby or Ruby on Rails app to validate for national identification numbers.\n\nFind version information in the CHANGELOG.\n\n## Suppoted countries and numbers:\n\n* Belgium [National Register Number (Rijksregisternummer)](https://en.wikipedia.org/wiki/National_identification_number#Belgium)\n* Canadian [Social Insurance Numbers (SINs)](https://en.wikipedia.org/wiki/Social_Insurance_Number)\n* Chinese [Resident Identity Card Number](https://en.wikipedia.org/wiki/Resident_Identity_Card#Identity_card_number)\n* Czech [birth numbers](https://en.wikipedia.org/wiki/National_identification_number#Czech_Republic_and_Slovakia)\n* Germany [Steuer-IdNr (Steuerliche Identifikationsnummer)](https://en.wikipedia.org/wiki/National_identification_number#Germany) and [RVNR (Rentenversicherungsnummer)](https://de.wikipedia.org/wiki/Versicherungsnummer)\n* Denmark [Personal Identification Number (Det Centrale Personregister (CPR))](https://en.wikipedia.org/wiki/National_identification_number#Denmark)\n* Estonian [Personal Identification Code (Isikukood (IK))](https://en.wikipedia.org/wiki/National_identification_number#Estonia)\n* Finland [Personal Identity Code (Finnish: henkilötunnus (HETU))](https://en.wikipedia.org/wiki/National_identification_number#Finland)\n* France [social insurance number](https://en.wikipedia.org/wiki/National_identification_number#France)\n* Ireland [Personal Public Service Number (PPS No)](https://en.wikipedia.org/wiki/Personal_Public_Service_Number)\n* Iceland [personal and organisation identity code (Kennitala)](https://en.wikipedia.org/wiki/National_identification_number#Iceland)\n* Italy [tax code for individuals (Codice fiscale)](https://en.wikipedia.org/wiki/National_identification_number#Italy)\n* Latvian [Personal Code (Personas kods)](https://en.wikipedia.org/wiki/National_identification_number#Latvia)\n* Lithuania [Personal Code (Asmens kodas)](https://en.wikipedia.org/wiki/National_identification_number#Lithuania)\n* Mexico [Unique Population Registry Code (Clave Única de Registro de Población (CURP))](https://en.wikipedia.org/wiki/Unique_Population_Registry_Code)\n* Netherlands [Citizen's Service Number (Burgerservicenummer)](https://en.wikipedia.org/wiki/National_identification_number#Netherlands)\n* Norway [birth number (Fødselsnummer)](https://en.wikipedia.org/wiki/National_identification_number#Norway)\n* Pakistan [computerised national identity card number (CNIC)](https://en.wikipedia.org/wiki/National_identification_number#Pakistan)\n* Spain [National Identity Document (Documento Nacional de Identidad (DNI)) number](https://en.wikipedia.org/wiki/National_identification_number#Spain)\n* Sweden [Personal Identity Number (Personnummer)](https://en.wikipedia.org/wiki/National_identification_number#Sweden)\n* Swiss [social security numbers](https://en.wikipedia.org/wiki/National_identification_number#Switzerland)\n* United Kingdom National Insurance number (NINO)\n* United Kingdom National Health Service number\n* United Kingdom CHI (Community Health Index) number\n* U.S. [Social Security number (SSN)](https://en.wikipedia.org/wiki/Social_Security_number)\n* U.S. [Individual Taxpayer Identification Number (ITIN)](https://en.wikipedia.org/wiki/Individual_Taxpayer_Identification_Number)\n* U.S. Employer Identification Number (EIN)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'social_security_number'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install social_security_number\n\n## Usage\nThe country_code should always be a ISO 3166-1 alpha-2 (http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).\n```ruby\n# Options:\n#   :number =\u003e Civil number.\n#   :country_code =\u003e Some fallback code (eg. 'nl').\n#   :birth_date =\u003e Birth date (eg. 'yyyy-mm-dd').\n#   :gender =\u003e Gender (eg. 'famale').\n```\nValidations\n```ruby\nSocialSecurityNumber::Validator.new({number:'Some number', country_code:'nl'}).valid? # =\u003e true\n\nSocialSecurityNumber::Validator.new({number:'Some number', country_code:'nl', birth_date: 'yyyy-mm-dd'}).valid? # =\u003e true\n\nSocialSecurityNumber::Validator.new({number:'Some number', country_code:'nl'}) # =\u003e #\u003cSocialSecurityNumber::Validator:0x000000021e2420 @civil_number=\"Some number\", @country_code=\"NL\", @birth_date=birth_date from civil number information, @gender=gender from civil number information\u003e\n\ncivil_number = SocialSecurityNumber::Validator.new({number:'Some number', country_code:'nl'})\ncivil_number.valid? # =\u003e false\ncivil_number.error # =\u003e \"birth date 1933-09-25 dont match 1933-09-24\"\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Added some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\nDon't forget to add tests and run rspec before creating a pull request :)\n\nSee all contributors on https://github.com/samesystem/social_security_number/graphs/contributors .\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the SocialSecurityNumber project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/samesystem/social_security_number/blob/master/CODE_OF_CONDUCT.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamesystem%2Fsocial_security_number","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamesystem%2Fsocial_security_number","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamesystem%2Fsocial_security_number/lists"}