social_security_number 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e30eadd9ced9fb48993528bbe920ac5e741e709a
4
- data.tar.gz: 3f14c88345fb09471f44787ba8cd76e6029f67f9
3
+ metadata.gz: bdad2cdd2a4dd4a96e91224cb05b4aac61b82b9b
4
+ data.tar.gz: 2012abcb6d2d477c28ffc9442b42c439f029f843
5
5
  SHA512:
6
- metadata.gz: 135f9785d9096a99a69d2065ff3aa07298b3e8ef3893cf0080b48ef87085b9ec4ba48c9c6f697edc8c8b16f7c4580781862daf8886e2b22bd6d2059f669ffeef
7
- data.tar.gz: f3f5e81768cebb4167862f4333ebef1ddf3f92e49da77b21b3c243af1fb8d4f5b94efe4a7d69d1398a262071fde99c6b568c0c711c26b1242d02769784ac7266
6
+ metadata.gz: '0981657f082c475cf38d1317fe27da2fae7159b433c87cac0fb6b34b216a62541e700d038ff5a70feb628250433cf98a28520aa821028b03fe54849d2d3df7e9'
7
+ data.tar.gz: f55d33790a5a16f923daeb3bf761662fefd41f679162790208ea1a391c6e50a40b6adcf6ecfe1247d54ee7f05b04caeedb54f3389e3972c9f727e617498856a5
@@ -48,7 +48,10 @@ module SocialSecurityNumber
48
48
  def count_last_number
49
49
  sum = calc_sum(@civil_number[0..9], CONTROLCIPHERS)
50
50
  last_number = sum % MODULUS
51
- sum - (last_number * MODULUS)
51
+ return last_number unless last_number == 10
52
+ sum = calc_sum(@civil_number[0..9], CONTROLCIPHERS2)
53
+ last_number = sum % MODULUS
54
+ last_number == 10 ? 0 : last_number
52
55
  end
53
56
  end
54
57
  end
@@ -1,3 +1,3 @@
1
1
  module SocialSecurityNumber
2
- VERSION = '0.1.8'
2
+ VERSION = '0.1.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_security_number
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - SameSystem
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-02 00:00:00.000000000 Z
11
+ date: 2018-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler