ci_uy 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/ci_uy.rb +5 -7
  3. metadata +13 -18
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c458e8eef27783014b602657dfa7655f308fd50d45fab67f450a0233b954a906
4
+ data.tar.gz: b779c36fac29774ea7c6fe9023b0c2f3bbfc48c21548991d1f0445e8b02f949f
5
+ SHA512:
6
+ metadata.gz: c6792b16f167f6b769f639ae37f19639e69f0fd241980b9c2afb0ec473ab33b11bb502db0806ec78304990e5ebcbd26bb901e52a54ada73f26d005eeecb4660e
7
+ data.tar.gz: 86990f06f636fb7c34989712e6f61a4546404f81bed733524579ccbe5c194dde2ea1f3e2a9e2cbe699fdc94c812468452feafe67f3f9d98bbb3fbd5ec782af5d
@@ -1,7 +1,5 @@
1
- # -*- coding: utf-8 -*-
2
-
3
1
  module CiUY
4
- def self.get_validation_digit(ci)
2
+ def self.validation_digit(ci)
5
3
  ci = transform(ci)
6
4
  ci = '0' + ci if ci.size == 6
7
5
  a = 0
@@ -18,7 +16,7 @@ module CiUY
18
16
  get_validation_digit(ci) == dig
19
17
  end
20
18
 
21
- def self.get_random_ci
19
+ def self.random
22
20
  ci = rand(1_000_000..9_999_999).to_s
23
21
  ci += get_validation_digit(ci)
24
22
  ci
@@ -31,8 +29,8 @@ module CiUY
31
29
  end
32
30
 
33
31
  class << self
34
- alias_method :validation_digit, :get_validation_digit
35
- alias_method :validate, :validate_ci
36
- alias_method :random, :get_random_ci
32
+ alias get_validation_digit validation_digit
33
+ alias validate validate_ci
34
+ alias get_random_ci random
37
35
  end
38
36
  end
metadata CHANGED
@@ -1,32 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ci_uy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
5
- prerelease:
4
+ version: 0.1.2
6
5
  platform: ruby
7
6
  authors:
8
7
  - Fernando Briano
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-04-10 00:00:00.000000000 Z
11
+ date: 2018-04-11 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: minitest
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: '5.3'
19
+ version: '5.11'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '5.3'
26
+ version: '5.11'
30
27
  description: A gem to validate Uruguayan Identity Documents (Cedula de Identidad Uruguaya)
31
28
  email: fernando@picandocodigo.net
32
29
  executables:
@@ -34,32 +31,30 @@ executables:
34
31
  extensions: []
35
32
  extra_rdoc_files: []
36
33
  files:
37
- - lib/ci_uy.rb
38
34
  - bin/ci_uy
35
+ - lib/ci_uy.rb
39
36
  homepage: https://github.com/picandocodigo/ci_uy
40
37
  licenses:
41
- - LGPL-3.0
38
+ - LGPL-2.1
39
+ metadata: {}
42
40
  post_install_message: Thanks for installing CiUY!
43
41
  rdoc_options: []
44
42
  require_paths:
45
43
  - lib
46
44
  required_ruby_version: !ruby/object:Gem::Requirement
47
- none: false
48
45
  requirements:
49
- - - ! '>='
46
+ - - ">="
50
47
  - !ruby/object:Gem::Version
51
48
  version: '0'
52
49
  required_rubygems_version: !ruby/object:Gem::Requirement
53
- none: false
54
50
  requirements:
55
- - - ! '>='
51
+ - - ">="
56
52
  - !ruby/object:Gem::Version
57
53
  version: '0'
58
54
  requirements: []
59
55
  rubyforge_project:
60
- rubygems_version: 1.8.23
56
+ rubygems_version: 2.7.3
61
57
  signing_key:
62
- specification_version: 3
58
+ specification_version: 4
63
59
  summary: CiUY Validate Uruguayan cedula numbers
64
60
  test_files: []
65
- has_rdoc: