ci_uy 0.0.7 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/ci_uy.rb +3 -3
  2. metadata +2 -2
@@ -4,14 +4,14 @@ module CiUY
4
4
  ci = '0' + ci if ci.size == 6
5
5
  a = 0
6
6
  (0..6).each do |i|
7
- a += ("2987634"[i].chr.to_i * ci[i].chr.to_i)
7
+ a += ("2987634"[i].to_i * ci[i].to_i)
8
8
  end
9
- (10 - (a % 10)).to_s[-1].chr
9
+ (10 - (a % 10)).to_s[-1]
10
10
  end
11
11
 
12
12
  def self.validate_ci(ci)
13
13
  ci = transform(ci)
14
- dig = ci[-1].chr
14
+ dig = ci[-1]
15
15
  ci = ci[0..-2]
16
16
  self.get_validation_digit(ci) == dig
17
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ci_uy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-31 00:00:00.000000000 Z
12
+ date: 2014-04-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest