{"id":15679646,"url":"https://github.com/picandocodigo/ci_uy","last_synced_at":"2026-01-16T03:54:58.114Z","repository":{"id":6187099,"uuid":"7417505","full_name":"picandocodigo/ci_uy","owner":"picandocodigo","description":"A gem to validate Uruguayan Identity Documents (Cedula de Identidad Uruguaya)","archived":false,"fork":false,"pushed_at":"2024-04-16T17:38:57.000Z","size":52,"stargazers_count":11,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-07T08:12:50.352Z","etag":null,"topics":["cedula","cedula-uruguaya","ci-uy","ruby"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/ci_uy","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/picandocodigo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2013-01-03T04:09:37.000Z","updated_at":"2023-07-25T14:30:30.000Z","dependencies_parsed_at":"2024-04-16T18:47:41.735Z","dependency_job_id":"51f7c4d6-aee9-463c-ae74-5a5747a40419","html_url":"https://github.com/picandocodigo/ci_uy","commit_stats":{"total_commits":55,"total_committers":2,"mean_commits":27.5,"dds":"0.036363636363636376","last_synced_commit":"87a5f21f0e0b3fcfb6f332376e56d53677279609"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picandocodigo%2Fci_uy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picandocodigo%2Fci_uy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picandocodigo%2Fci_uy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picandocodigo%2Fci_uy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/picandocodigo","download_url":"https://codeload.github.com/picandocodigo/ci_uy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252839296,"owners_count":21812090,"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":["cedula","cedula-uruguaya","ci-uy","ruby"],"created_at":"2024-10-03T16:34:15.894Z","updated_at":"2026-01-16T03:54:58.099Z","avatar_url":"https://github.com/picandocodigo.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CiUY\n[![Gem Version](https://badge.fury.io/rb/ci_uy.svg)](http://badge.fury.io/rb/ci_uy)\n[![Unit tests](https://github.com/picandocodigo/ci_uy/actions/workflows/ruby.yml/badge.svg?branch=main)](https://github.com/picandocodigo/ci_uy/actions/workflows/ruby.yml)\n[![Rubocop](https://github.com/picandocodigo/ci_uy/actions/workflows/rubocop.yml/badge.svg?branch=main)](https://github.com/picandocodigo/ci_uy/actions/workflows/rubocop.yml)\n\n## Español:\nUna gema para validar números de Cédula de Identidad Uruguaya - https://rubygems.org/gems/ci_uy\n\nLa gema recibe una cadena de caracteres (o número entero) y no le importa cómo estén separados los dígitos, extrae los números de la cadena de caracteres y chequea el dígito verificador. Así que todos estos formatos son válidos: `1.111.111-1`, `1_111_111_1`, `1.111.111/1`.\n\nEl algoritmo de validación es: Multiplicar cada dígito por 2, 9, 8, 7, 6, 3, 4 uno a uno, después a 10 restarle el resto de la división de la suma de la primera operación entre 10: `10 - (sum mod 10)`. Esta operación nos da el dígito verificador. Los números de cédula válidos deben tener 6 o 7 dígitos.\n\nSe puede probar una interfaz gráfica de usuario para la gema en el directorio [ci_ui](https://github.com/picandocodigo/ci_uy/tree/master/ci_ui).\n\n## English\n\nA gem to validate Uruguayan Identity Documents (Cedula de Identidad Uruguaya) - https://rubygems.org/gems/ci_uy\n\nThe gem receives a string (or integer) and doesn't care what you use to separate the digits, it gets the numbers from the string and checks the verification digit. So all of these formats are valid: `1.111.111-1`, `1_111_111_1`, `1.111.111/1`.\n\nThe validation algorithm is: Multiply each digit by 2, 9, 8, 7, 6, 3, 4 one to one. Then substract the remainder of the division between the sum of the first operation and 10 to 10: `10 - (sum mod 10)`. This operation gives you the verification digit. Valid CI numbers must have 6 or 7 digits.\n\nYou can check out a graphical user interface for the gem in the [ci_ui](https://github.com/picandocodigo/ci_uy/tree/master/ci_ui) directory.\n\n## Instalación/Install:\n\n```bash\n$ gem install ci_uy\n```\n\n## Uso/Usage:\n``` ruby\nfernando@hoth ~ $ rake console\n1.9.3-p484 :001 \u003e CiUY.validate(\"1.111.111-1\")\n =\u003e true\n1.9.3-p484 :002 \u003e CiUY.validation_digit(\"2222222\")\n =\u003e \"2\"\n1.9.3-p484 :003 \u003e CiUY.random\n =\u003e \"13082956\"\n ```\n\n🇺🇾 Una vez instalada en el sistema, también se puede usar el comando `ci_uy` desde la línea de comando:\n\n🏴󠁧󠁢󠁳󠁣󠁴󠁿 Once the gem is installed in your system, you can also use the `ci_uy` command from the command line:\n\n```bash\n$ gem install ci_uy-0.0.6.gem\nThanks for installing CiUY!\nSuccessfully installed ci_uy-0.0.6\n1 gem installed\nInstalling ri documentation for ci_uy-0.0.6...\nBuilding YARD (yri) index for ci_uy-0.0.6...\nInstalling RDoc documentation for ci_uy-0.0.6...\n$ ci_uy random\n47063714\n$ ci_uy validate \"11111111\"\ntrue\n$ ci_uy validation_digit \"2.222.222\"\n2\n ```\n\n## LICENSE\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU Lesser General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicandocodigo%2Fci_uy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpicandocodigo%2Fci_uy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicandocodigo%2Fci_uy/lists"}