social_security_number 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 002517d505f4660414a052b3ee596dddbfc85c68
|
|
4
|
+
data.tar.gz: 1e20c95d9ef3860ffe65d73181a51ca9ebbd6e37
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 25b17f298f7ea0d07a8c258fef265d402fdc006d12a938f61831220f979547f93028ec4ab414cab2294f1a079eb4658ad3ec205050de660241a3666b81f88b0c
|
|
7
|
+
data.tar.gz: 8656d975fedd1776e53b78e74178d65cf304ae6130fd2d5bb51c1b86bab8ec1992fbbc0c053454ab1eee7691cd838ebc3f6485977724852389f5908405d990be
|
data/README.md
CHANGED
|
@@ -4,7 +4,7 @@ This small Gem adds useful methods to your Ruby or Ruby on Rails app to validate
|
|
|
4
4
|
|
|
5
5
|
Find version information in the CHANGELOG.
|
|
6
6
|
|
|
7
|
-
## Suppoted
|
|
7
|
+
## Suppoted countries and numbers:
|
|
8
8
|
|
|
9
9
|
* Belgium National Register Number (Rijksregisternummer)
|
|
10
10
|
* Canadian Social Insurance Numbers (SINs)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
module SocialSecurityNumber
|
|
2
|
-
# SocialSecurityNumber::
|
|
2
|
+
# SocialSecurityNumber::Gb validates United Kingdom National Insurance number (NINO) and
|
|
3
3
|
# National Health Service number, CHI (Community Health Index) number
|
|
4
4
|
# https://en.wikipedia.org/wiki/National_identification_number#United_Kingdom
|
|
5
|
-
class
|
|
5
|
+
class Gb < Country
|
|
6
6
|
def validate
|
|
7
7
|
@error = if !validate_formats
|
|
8
8
|
'bad number format'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
module SocialSecurityNumber
|
|
2
2
|
# SocialSecurityNumber::Validator
|
|
3
3
|
class Validator
|
|
4
|
-
SUPPORTED_COUNTRY_CODES = %w[BE CA CH CN DE DK ES FI FR IE
|
|
5
|
-
IS IT LT MX NL NO PK SE
|
|
4
|
+
SUPPORTED_COUNTRY_CODES = %w[BE CA CH CN CZ DE DK ES FI FR GB IE
|
|
5
|
+
IS IT LT MX NL NO PK SE US].freeze
|
|
6
6
|
|
|
7
7
|
attr_accessor :civil_number, :country_code, :error
|
|
8
8
|
|
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.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- SameSystem
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-11-
|
|
11
|
+
date: 2017-11-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -84,6 +84,7 @@ files:
|
|
|
84
84
|
- lib/social_security_number/country/es.rb
|
|
85
85
|
- lib/social_security_number/country/fi.rb
|
|
86
86
|
- lib/social_security_number/country/fr.rb
|
|
87
|
+
- lib/social_security_number/country/gb.rb
|
|
87
88
|
- lib/social_security_number/country/ie.rb
|
|
88
89
|
- lib/social_security_number/country/is.rb
|
|
89
90
|
- lib/social_security_number/country/it.rb
|
|
@@ -93,7 +94,6 @@ files:
|
|
|
93
94
|
- lib/social_security_number/country/no.rb
|
|
94
95
|
- lib/social_security_number/country/pk.rb
|
|
95
96
|
- lib/social_security_number/country/se.rb
|
|
96
|
-
- lib/social_security_number/country/uk.rb
|
|
97
97
|
- lib/social_security_number/country/us.rb
|
|
98
98
|
- lib/social_security_number/validator.rb
|
|
99
99
|
- lib/social_security_number/version.rb
|