A gem to validate Uruguayan Identity Documents (Cedula de Identidad Uruguaya)
Ruby
Latest commit 16dd7cc Apr 11, 2014 @picandocodigo Adds help on bin when used incorrectly.
Adds badges.
Refactors thanks to rubocop.
Bumps version.
Permalink
Failed to load latest commit information.
bin
lib
test Adds help on bin when used incorrectly. Apr 11, 2014
.gitignore Adds gitignore, test for 6 digit CI, new version Jan 23, 2013
.travis.yml Removes 1.8.7 support. You should not be using Ruby 1.8 Apr 8, 2014
LICENSE Updates license Apr 1, 2014
README.md Adds help on bin when used incorrectly. Apr 11, 2014
Rakefile Adds default test task to rake Apr 8, 2014
ci_uy.gemspec Adds help on bin when used incorrectly. Apr 11, 2014

README.md

CiUY

Gem Version Build Status Code Climate

A gem to validate Uruguayan Identity Documents (Cedula de Identidad Uruguaya) - https://rubygems.org/gems/ci_uy

Install:

$ gem install ci_uy

Usage:

fernando@hoth ~ $ rake console
1.9.3-p484 :001 > CiUY.validate("1.111.111-1")
 => true
1.9.3-p484 :002 > CiUY.validation_digit("2222222")
 => "2"
1.9.3-p484 :003 > CiUY.random
 => "13082956"

Once the gem is installed in your system, you can also use 'ci_uy' from the command line:

$ gem install ci_uy-0.0.6.gem
Thanks for installing CiUY!
Successfully installed ci_uy-0.0.6
1 gem installed
Installing ri documentation for ci_uy-0.0.6...
Building YARD (yri) index for ci_uy-0.0.6...
Installing RDoc documentation for ci_uy-0.0.6...
$ ci_uy random
47063714
$ ci_uy validate "11111111"
true
$ ci_uy validation_digit "2.222.222"
2

LICENSE

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.