dl_validator 0.0.5 → 0.0.6

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: d842ca8ae1d8e0f2744ee451eb65c78378ec9d2d
4
- data.tar.gz: 2818a638b67f8f4fc45c9e88935014fe124cd38f
3
+ metadata.gz: edd9dc0c2c26ae559d91785d783d3f9fd59e03be
4
+ data.tar.gz: 1384c7c2873506970c933e8d520de03c89a1109a
5
5
  SHA512:
6
- metadata.gz: d2ab27d739aa15de609f74df9a88237cde4f0a2a5afa41e65e63a08590a33c709f60f2065a0e6cadf29b47699d8fb61f57c0fcebd4301f83b977839d8b6fa3f4
7
- data.tar.gz: 7f7009fefb7f0210d372543d3da82f61ffb4ed8c231799e1958f6b3b683a360a3914a79a64b7256881e58099772fe7ef17fe61afba9a57ab19fab79fdc0ff5ff
6
+ metadata.gz: a25a11f5075e652e12dfd99ed97d530e6275794ee68d4f5a3e3f135dea42da3cfd80f32db30549d917ea9857649a05241bf6793d0822ae06f6d29aae92ff9b8b
7
+ data.tar.gz: dfc04e4322883a83c52fc66e36637bb18f8fb845ff6d4079d2c288f6c2745398c9114bf2d19013710476f7ac5bdc492200b69016bce6d1ac7839c12c32c38ac3
data/.gitignore CHANGED
@@ -3,7 +3,5 @@
3
3
  .bundle
4
4
  .config
5
5
  .yardoc
6
- .ruby-gemset
7
- .ruby-version
8
6
  .idea
9
7
  pkg/
@@ -0,0 +1 @@
1
+ dl-validator
@@ -0,0 +1 @@
1
+ 2.3.0
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - "2.3.0"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dl_validator (0.0.5)
4
+ dl_validator (0.0.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -16,6 +16,7 @@ GEM
16
16
  i18n (0.6.4)
17
17
  minitest (4.3.2)
18
18
  multi_json (1.7.7)
19
+ power_assert (0.2.7)
19
20
  rake (10.0.4)
20
21
  shoulda (3.5.0)
21
22
  shoulda-context (~> 1.0, >= 1.0.1)
@@ -23,6 +24,8 @@ GEM
23
24
  shoulda-context (1.1.4)
24
25
  shoulda-matchers (2.2.0)
25
26
  activesupport (>= 3.0.0)
27
+ test-unit (3.1.8)
28
+ power_assert
26
29
  thread_safe (0.1.0)
27
30
  atomic
28
31
  tzinfo (0.3.37)
@@ -35,3 +38,7 @@ DEPENDENCIES
35
38
  dl_validator!
36
39
  rake
37
40
  shoulda
41
+ test-unit
42
+
43
+ BUNDLED WITH
44
+ 1.12.1
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Build Status](https://travis-ci.org/amedeiros/area_code_validator.svg)](https://travis-ci.org/amedeiros/dl_validator)
2
+
1
3
  # DlValidator
2
4
 
3
5
  DlValidator is a small gem that performs soft checks against a drivers license number and state. This is used only to flag a drivers license as being invalid, and is not intended to be considered true denial on a drivers license number.
@@ -47,6 +49,13 @@ end
47
49
  4. Push to the branch (`git push origin my-new-feature`)
48
50
  5. Create new Pull Request
49
51
 
52
+ ## Author
53
+
54
+ Andrew Medeiros, andrew@amedeiros.com, @_AndrewMedeiros
55
+
56
+ ## Contributors
57
+ [crstamps2](https://github.com/crstamps2)
58
+
50
59
  ## Future
51
60
 
52
61
  Update active model validation to be more flexible with field names.
@@ -21,4 +21,5 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency 'bundler', '~> 1.3'
22
22
  spec.add_development_dependency 'rake'
23
23
  spec.add_development_dependency 'shoulda'
24
+ spec.add_development_dependency 'test-unit'
24
25
  end
@@ -58,56 +58,56 @@ module DlValidator
58
58
 
59
59
  # Constant frozen hash of regular expressions to validate a drivers license by state
60
60
  STATES_REGEX = {
61
- 'AL' => /^([0-9]{7}|[0-9]{8})$/, # Format: 7 or 8 numeric
62
- 'AK' => /^([0-9]{1,7})$/, # Format: up to 7 numeric
63
- 'AZ' => /^([A-Z][0-9]{8})$/, # Format: 1 Alpha 8 numeric
64
- 'AR' => /^([0-9]{8}|[0-9]{9})$/, # Format: 8 or 9 Numeric
65
- 'CA' => /^([A-Z][0-9]{7})$/, # Format: 1 Alpha 7 Numeric
66
- 'CO' => /^([0-9]{9})$/, # Format: 9 Numeric
67
- 'CT' => /^((01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24)[0-9]{7})$/, # Format: 9 Numeric; The first 2 digits can not be less than 01 or greater than 24.
68
- 'DE' => /^([0-9]{1,7}$)/, # Format: upto 7 Numeric
69
- 'DC' => /^([0-9]{7})$/, # Format: 7 Numeric
70
- 'FL' => /^([A-Z][0-9]{12})$/, # Format: 1 Alpha 12 Numeric
71
- 'GA' => /^([0-9]{1,9})$/, # Format: up to 9 Numeric
72
- 'HI' => /^([H][0-9]{8})$/, # Format: H followed by 8 numeric
73
- 'ID' => /^([A-Z]{2}[0-9]{6}[A-Z])$/, # Format: 2 Alpha 6 Numeric 1 Alpha (example LS123456C)
74
- 'IL' => /^([A-Z][0-9]{11})$/, # Format: 1 alpha 11 numeric
75
- 'IN' => /^([0-9]{10})$/, # Format: 10 Numeric
76
- 'IA' => /^([0-9]{3}[A-Z]{2}[0-9]{4})$/, # Format: 3 Numeric 2 Alpha 4 Numeric (example 123SL4567)
77
- 'KS' => /^([K][0-9]{8})$/, # Format: 1 Alpha K for Alpha 8 Numeric
78
- 'KY' => /^([A-Z][0-9]{8})$/, # Format: 1 Alpha 8 Numeric
79
- 'LA' => /^((00|01)[0-9]{7})$/, # Format: 9 Numeric (First two numbers are 00 or 01)
80
- 'ME' => /^([0-9]{7})$/, # Format: 7 Numeric
81
- 'MD' => /^([A-Z][0-9]{12})$/, # Format: 1 Alpha 12 Numeric
82
- 'MA' => /^([S][0-9]{8})$/, # Format: 1 Alpha 8 Numeric
83
- 'MI' => /^([A-Z][0-9]{12})$/, # Format: 1 Alpha 12 Numeric
84
- 'MN' => /^([A-Z0-9]{13})$/, # Format: 13 Alphanumeric
85
- 'MS' => /^([0-9]{9})$/, # Format: 9 Numeric
86
- 'MO' => /^([A-Z][0-9]{6,9})$/, # Format: 1 Alpha 6-9 Numeric
87
- 'MT' => /^(([A-Z0-9]{9}|[0-9]{13}))$/, # Format: 13 Numeric or 9 Alphanumeric
88
- 'NE' => /^([A-Z][0-9]{3,8})$/, # Format: 1 Alpha 3-8 Numeric
89
- 'NV' => /^([0-9]{10})$/, # Format: 10 Numeric
90
- 'NH' => /^([0-9]{2}[A-Z]{3}[0-9]{5})$/, # Format: 2 Numeric 3 Alpha 5 Numeric
91
- 'NJ' => /^([A-Z][0-9]{14})$/, # Format: 1 Alpha 14 Numeric
92
- 'NY' => /^([0-9]{9})$/, # Format: 9 Numeric
93
- 'NM' => /^([0-9]{9})$/, # Format: 9 Numeric
94
- 'NC' => /^([0-9]{1,12})$/, # Format: Up to 12 Numeric
95
- 'ND' => /^([A-Z0-9]{9})$/, # Format: 9 Alphanumeric
96
- 'OH' => /^([A-Z]{2}[0-9]{6})$/, # Format: 2 Alpha 6 Numeric
97
- 'OK' => /^([A-Z][0-9]{9})$/, # Format: 1 Alpha 9 Numeric
98
- 'OR' => /^([0-9]{1,7})$/, # Format: Up to 7 Numeric
99
- 'PA' => /^([0-9]{8})$/, # Format: 8 Numeric
100
- 'RI' => /^([0-9]{7})$/, # Format: 7 Numeric
101
- 'SC' => /^([0-9]{9})$/, # Format: 9 Numeric
102
- 'SD' => /^([0-9]{8})$/, # Format: 8 Numeric
103
- 'TN' => /^([0-9]{8}|[0-9]{9})$/, # Format: 8 or 9 Numeric
104
- 'TX' => /^([0-9]{8})$/, # Format: 8 Numeric
105
- 'UT' => /^([0-9]{4,9})$/, # Format: 4 to 9 Numeric
106
- 'VT' => /^([0-9]{8}|[0-9]{7}[A])$/, # Format: 8 Numeric; or 7 Numeric 1 Alpha. Alpha is A.
107
- 'VA' => /^([A-Z][0-9]{8})$/, # Format: 1 Alpha 8 Numeric
108
- 'WA' => /^(([A-Z]|[0-9]){12})$/, # Format: 12 Alpha And Numeric Combination
109
- 'WV' => /^([0-9]{7}|[A-Z][0-9]{6})$/, # Format: 7 Numeric; or 1 Alpha 6 Numeric
110
- 'WI' => /^([A-Z][0-9]{13})$/, # Format: 1 Alpha 13 Numeric
111
- 'WY' => /^([0-9]{9})$/ }.freeze # Format: 9 Numeric
61
+ 'AL' => /^[0-9]{1,7}$/, # Format: 1-7Numeric
62
+ 'AK' => /^[0-9]{1,7}$/, # Format: 1-7Numeric
63
+ 'AZ' => /(^[A-Z]{1}[0-9]{1,8}$)|(^[A-Z]{2}[0-9]{2,5}$)|(^[0-9]{9}$)/, # Format: 1Alpha+1-8Numeric or 2Alpha+2-5Numeric or 9Numeric
64
+ 'AR' => /^[0-9]{4,9}$/, # Format: 4-9Numeric
65
+ 'CA' => /^[A-Z]{1}[0-9]{7}$/, # Format: 1Alpha+7Numeric
66
+ 'CO' => /(^[0-9]{9}$)|(^[A-Z]{1}[0-9]{3,6}$)|(^[A-Z]{2}[0-9]{2,5}$)/, # Format: 9Numeric or 1Alpha+3-6Numeric or 2Alpha+2-5Numeric
67
+ 'CT' => /^[0-9]{9}$/, # Format: 9Numeric;
68
+ 'DE' => /^[0-9]{1,7}$/, # Format: 1-7Numeric
69
+ 'DC' => /(^[0-9]{7}$)|(^[0-9]{9}$)/, # Format: 7Numeric or 9Numeric
70
+ 'FL' => /^[A-Z]{1}[0-9]{12}$/, # Format: 1Alpha+12Numeric
71
+ 'GA' => /^[0-9]{7,9}$/, # Format: 7-9Numeric
72
+ 'HI' => /(^[A-Z]{1}[0-9]{8}$)|(^[0-9]{9}$)/, # Format: 1Alpha+8Numeric or 9Numeric
73
+ 'ID' => /(^[A-Z]{2}[0-9]{6}[A-Z]{1}$)|(^[0-9]{9}$)/, # Format: 2Alpha+6Numeric+1Alpha or 9Numeric
74
+ 'IL' => /^[A-Z]{1}[0-9]{11,12}$/, # Format: 1Alpha+11Numeric or 1Alpha+12Numeric
75
+ 'IN' => /(^[A-Z]{1}[0-9]{9}$)|(^[0-9]{9,10}$)/, # Format: 1Alpha+9Numeric or 9Numeric or 10Numeric
76
+ 'IA' => /(^[0-9]{9}$)|(^[0-9]{3}[A-Z]{2}[0-9]{4})$/, # Format: 9Numeric or 3Numeric+2Alpha+4Numeric
77
+ 'KS' => /(^([A-Z]{1}[0-9]{1}){2}[A-Z]{1}$)|(^[A-Z]{1}[0-9]{8}$)|(^[0-9]{9}$)/, # Format: 1Alpha+1Numeric+1Alpha+1Numeric+1Alpha or 1Alpha+8Numeric or 9Numeric
78
+ 'KY' => /(^[A_Z]{1}[0-9]{8,9}$)|(^[0-9]{9}$)/, # Format: 1Alpha+8Numeric or 1Alpha+9Numeric or 9Numeric
79
+ 'LA' => /^[0-9]{1,9}$/, # Format: 1-9Numeric
80
+ 'ME' => /(^[0-9]{7,8}$)|(^[0-9]{7}[A-Z]{1}$)/, # Format: 7Numeric or 7Numeric+1Alpha or 8Numeric
81
+ 'MD' => /^[A-Z]{1}[0-9]{12}$/, # Format: 1Alpha+12Numeric
82
+ 'MA' => /(^[A-Z]{1}[0-9]{8}$)|(^[0-9]{9}$)/, # Format: 1Alpha+8Numeric or 9Numeric
83
+ 'MI' => /(^[A-Z]{1}[0-9]{10}$)|(^[A-Z]{1}[0-9]{12}$)/, # Format: 1Alpha+10Numeric or 1Alpha+12Numeric
84
+ 'MN' => /^[A-Z]{1}[0-9]{12}$/, # Format: 1Alpha+12Numeric
85
+ 'MS' => /^[0-9]{9}$/, # Format: 9Numeric
86
+ 'MO' => /(^[A-Z]{1}[0-9]{5,9}$)|(^[A-Z]{1}[0-9]{6}[R]{1}$)|(^[0-9]{8}[A-Z]{2}$)|(^[0-9]{9}[A-Z]{1}$)|(^[0-9]{9}$)/, # Format: 1Alpha+5-9Numeric or 1Alpha+6Numeric+R or 8Numeric+2Alpha or 9Numeric+1Alpha or 9Numeric
87
+ 'MT' => /(^[A-Z]{1}[0-9]{8}$)|(^[0-9]{13}$)|(^[0-9]{9}$)|(^[0-9]{14}$)/, # Format: 1Alpha+8Numeric or 13Numeric or 9Numeric or 14Numeric
88
+ 'NE' => /^[0-9]{1,7}$/, # Format: 1-7Numeric
89
+ 'NV' => /(^[0-9]{9,10}$)|(^[0-9]{12}$)|(^[X]{1}[0-9]{8}$)/, # Format: 9Numeric or 10Numeric or 12Numeric or X+8Numeric
90
+ 'NH' => /^[0-9]{2}[A-Z]{3}[0-9]{5}$/, # Format: 2Numeric+3Alpha+5Numeric
91
+ 'NJ' => /^[A-Z]{1}[0-9]{14}$/, # Format: 1Alpha+14Numeric
92
+ 'NY' => /(^[A-Z]{1}[0-9]{7}$)|(^[A-Z]{1}[0-9]{18}$)|(^[0-9]{8}$)|(^[0-9]{9}$)|(^[0-9]{16}$)|(^[A-Z]{8}$)/, # Format: 1Alpha+7Numeric or 1Alpha+18Numeric or 8Numeric or 9Numeric or 16 Numeric or 8Alpha
93
+ 'NM' => /^[0-9]{8,9}$/, # Format: 8Numeric or 9Numeric
94
+ 'NC' => /^[0-9]{1,12}$/, # Format: 1-12Numeric
95
+ 'ND' => /(^[A-Z]{3}[0-9]{6}$)|(^[0-9]{9}$)/, # Format: 3Alpha+6Numeric or 9Numeric
96
+ 'OH' => /(^[A-Z]{1}[0-9]{4,8}$)|(^[A-Z]{2}[0-9]{3,7}$)|(^[0-9]{8}$)/, # Format: 1Alpha+4-8Numeric or 2Alpha+3-7Numeric or 8Numeric
97
+ 'OK' => /(^[A-Z]{1}[0-9]{9}$)|(^[0-9]{9}$)/, # Format: 1Alpha+9Numeric or 9Numeric
98
+ 'OR' => /^[0-9]{1,9}$/, # Format: 1-9Numeric
99
+ 'PA' => /^[0-9]{8}$/, # Format: 8Numeric
100
+ 'RI' => /^([0-9]{7}$)|(^[A-Z]{1}[0-9]{6}$)/, # Format: 7Numeric or 1Alpha+6Numeric
101
+ 'SC' => /^[0-9]{5,11}$/, # Format: 5-11Numeric
102
+ 'SD' => /(^[0-9]{6,10}$)|(^[0-9]{12}$)/, # Format: 6-10Numeric or 12Numeric
103
+ 'TN' => /^[0-9]{7,9}$/, # Format: 7-9Numeric
104
+ 'TX' => /^[0-9]{7,8}$/, # Format: 7-8Numeric
105
+ 'UT' => /^[0-9]{4,10}$/, # Format: 4-10Numeric
106
+ 'VT' => /(^[0-9]{8}$)|(^[0-9]{7}[A]$)/, # Format: 8Numeric or 7Numeric+A
107
+ 'VA' => /(^[A-Z]{1}[0-9]{9,11}$)|(^[0-9]{9}$)/, # Format: 1Alpha+9Numeric or 1Alpha+10Numeric or 1Alpha+11Numeric or 9Numeric
108
+ 'WA' => /^(?=.{12}$)[A-Z]{1,7}[A-Z0-9\*]{4,11}$/, # Format: 1-7Alpha+any combination of Alpha, Numeric, or * for a total of 12 characters
109
+ 'WV' => /(^[0-9]{7}$)|(^[A-Z]{1,2}[0-9]{5,6}$)/, # Format: 7Numeric or 1-2Alpha+5-6Numeric
110
+ 'WI' => /^[A-Z]{1}[0-9]{13}$/, # Format: 1Alpha+13Numeric
111
+ 'WY' => /^[0-9]{9,10}$/ }.freeze # Format: 9-10Numeric
112
112
  end
113
113
  end
@@ -1,3 +1,3 @@
1
1
  module DlValidator
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
@@ -5,55 +5,55 @@ require 'shoulda'
5
5
  class Helper
6
6
 
7
7
  VALID_DRIVERS_LICENSES = {
8
- 'AL' => ['1234567', '12345678'], # Format: 7 numeric or 8 numeric
9
- 'AK' => ['1234567', '12345'], # Format: Up to 7 numeric
10
- 'AZ' => ['A12345678'], # Format: 1 Alpha 8 numeric
11
- 'AR' => ['12345678', '123456789'], # Format: 8 or 9 Numeric
12
- 'CA' => ['c1234567'], # Format: 1 Alpha 7 Numeric
13
- 'CO' => ['123456789'], # Format: 9 Numeric
14
- 'CT' => ['201234567', '241234567'], # Format: 9 Numeric; The first 2 digits can not be less than 01 or greater than 24.
15
- 'DE' => ['1234567', '12345'], # Format: Up to 7 Numeric
16
- 'DC' => ['1234567'], # Format: 7 Numeric
17
- 'FL' => ['F123456789876'], # Format: 1 Alpha 12 Numeric
18
- 'GA' => ['1234567', '1234567', '123456789'], # Format: Up to 9 Numeric
19
- 'HI' => ['h12345678'], # Format: H followed by 8 numeric
20
- 'ID' => ['LS123456C'], # Format: 2 Alpha 6 Numeric 1 Alpha (example LS123456C)
21
- 'IL' => ['J12345678901'], # Format: 1 alpha 11 numeric
22
- 'IN' => ['1234567890'], # Format: 10 Numeric
23
- 'IA' => ['123SL4567'], # Format: 3 Numeric 2 Alpha 4 Numeric (example 123SL4567)
24
- 'KS' => ['K12345678'], # Format: 1 Alpha 8 Numeric
25
- 'KY' => ['Y12345678'], # Format: 1 Alpha 8 Numeric
26
- 'LA' => ['001234567', '012345678'], # Format: 9 Numeric (First two numbers are 00 or 01)
27
- 'ME' => ['1234567'], # Format: 7 Numeric
28
- 'MD' => ['M123456789012'], # Format: 1 Alpha 12 Numeric
29
- 'MA' => ['S12345678'], # Format: 1 Alpha 8 Numeric Alpha is S
30
- 'MI' => ['h123456789012'], # Format: 1 Alpha 12 Numeric
31
- 'MN' => ['L1234G6J89012'], # Format: 13 Alphanumeric
32
- 'MS' => ['123456789'], # Format: 9 Numeric
33
- 'MO' => ['M12345678', 'M123456' , 'M12345679'], # Format: 1 Alpha 6-9 Numeric
34
- 'MT' => ['J9G4n6E8a', '1234567890123'], # Format: 9 Alpha And Numeric Combination or 13 numeric
35
- 'NE' => ['A123', 'A1234', 'A12345', 'A123456', 'A1234567', 'A12345678'], # Format: 1 Alpha 3-8 Numeric
36
- 'NV' => ['1234567890'], # Format: 10 Numeric
37
- 'NH' => ['12ADF12345'], # Format: 2 Numeric 3 Alpha 5 Numeric
38
- 'NJ' => ['F12345678901234'], # Format: 1 Alpha 14 Numeric
39
- 'NY' => ['123456789'], # Format: 9 Numeric
40
- 'NM' => ['123456789'], # Format: 9 Numeric
41
- 'NC' => ['123456', '1234567', '12345678', '123456789', '123456789012'], # Format: Up to 12 numeric
42
- 'ND' => ['123456789', 'KLK123TYP'], # Format: 9 Numeric
43
- 'OH' => ['LK123456'], # Format: 2 Alpha 6 Numeric
44
- 'OK' => ['O123456789'], # Format: 1 Alpha 9 Numeric
45
- 'OR' => ['12345', '123456', '1234567'], # Format: Up to 7 numeric
46
- 'PA' => ['12345678'], # Format: 8 Numeric
47
- 'RI' => ['1234567'], # Format: 7 Numeric
48
- 'SC' => ['123456789'], # Format: 9 Numeric
49
- 'SD' => ['12345678'], # Format: 8 Numeric
50
- 'TN' => ['12345678', '123456789'], # Format: 8 or 9 Numeric
51
- 'TX' => ['12345678'], # Format: 8 Numeric
52
- 'UT' => ['123456', '1234567', '12345678', '123456789', '1234'], # Format: 4-9 Numeric
53
- 'VT' => ['12345678', '1234567A'], # Format: 8 Numeric; or 7 Numeric 1 Alpha is A
54
- 'VA' => ['K12345678'], # Format: 1 Alpha 8 Numeric
55
- 'WA' => ['123ghk456QWE'], # Format: 12 Characters
56
- 'WV' => ['1234567', 'E123456'], # Format: 7 Numeric; or 1 Alpha 6 Numeric
57
- 'WI' => ['W1234567890123'], # Format: 1 Alpha 13 Numeric
58
- 'WY' => ['123456789'] } # Format: 9 Numeric
8
+ 'AL' => ['1234567'], # Format: 1-7Numeric
9
+ 'AK' => ['1234567'], # Format: 1-7Numeric
10
+ 'AZ' => ['A12345678', 'AA12345', '123456789'], # Format: 1Alpha+1-8Numeric or 2Alpha+2-5Numeric or 9Numeric
11
+ 'AR' => ['1234', '123456789'], # Format: 4-9Numeric
12
+ 'CA' => ['c1234567'], # Format: 1Alpha+7Numeric
13
+ 'CO' => ['123456789', 'A123', 'A123456', 'AA12', 'AA12345'], # Format: 9Numeric or 1Alpha+3-6Numeric or 2Alpha+2-5Numeric
14
+ 'CT' => ['123456789'], # Format: 9Numeric
15
+ 'DE' => ['1234567', '12345'], # Format: 1-7Numeric
16
+ 'DC' => ['1234567', '123456789'], # Format: 7Numeric or 9Numeric
17
+ 'FL' => ['F123456789876'], # Format: 1Alpha+12Numeric
18
+ 'GA' => ['1234567', '12345678', '123456789'], # Format: 7-9Numeric
19
+ 'HI' => ['h12345678', '123456789'], # Format: 1Alpha+8Numeric or 9Numeric
20
+ 'ID' => ['LS123456C', '123456789'], # Format: 2Alpha+6Numeric+1Alpha or 9Numeric
21
+ 'IL' => ['J12345678901', 'A123456789012'], # Format: 1Alpha+11Numeric or 1Alpha+12Numeric
22
+ 'IN' => ['A123456789', '123456789', '1234567890'], # Format: 1Alpha+9Numeric or 9Numeric or 10Numeric
23
+ 'IA' => ['123456789', '123AB1234'], # Format: 9Numeric or 3Numeric+2Alpha+4Numeric
24
+ 'KS' => ['A1B2C','K12345678', '123456789'], # Format: 1Alpha+1Numeric+1Alpha+1Numeric+1Alpha or 1Alpha+8Numeric or 9Numeric
25
+ 'KY' => ['A12345678', 'A123456789', '123456789'], # Format: 1Alpha+8Numeric or 1Alpha+9Numeric or 9Numeric
26
+ 'LA' => ['123456789'], # Format: 1-9Numeric
27
+ 'ME' => ['1234567', '1234567A', '12345678'], # Format: 7Numeric or 7Numeric+1Alpha or 8Numeric
28
+ 'MD' => ['M123456789012'], # Format: 1Alpha+12Numeric
29
+ 'MA' => ['S12345678', '123456789'], # Format: 1Alpha+8Numeric or 9Numeric
30
+ 'MI' => ['A1234567890','h123456789012'], # Format: 1Alpha+10Numeric or 1Alpha+12Numeric
31
+ 'MN' => ['L123456789012'], # Format: 1Alpha+12Numeric
32
+ 'MS' => ['123456789'], # Format: 9Numeric
33
+ 'MO' => ['M12345', 'A123456789', 'M123456R' , '12345678AB', '123456789A', '123456789'], # Format: 1Alpha+5-9Numeric or 1Alpha+6Numeric+R or 8Numeric+2Alpha or 9Numeric+1Alpha or 9Numeric
34
+ 'MT' => ['J12345678', '1234567890123', '123456789', '12345678901234'], # Format: 1Alpha+8Numeric or 13Numeric or 9Numeric or 14Numeric
35
+ 'NE' => ['1234567'], # Format: 1-7Numeric
36
+ 'NV' => ['123456789', '1234567890', '123456789012', 'X12345678'], # Format: 9Numeric or 10Numeric or 12Numeric or X+8Numeric
37
+ 'NH' => ['12ADF12345'], # Format: 2Numeric+3Alpha+5Numeric
38
+ 'NJ' => ['F12345678901234'], # Format: 1Alpha+14Numeric
39
+ 'NY' => ['A1234567', 'A123456789012345678', '12345678', '123456789', '1234567890123456', 'ABCDEFGH'], # Format: 1Alpha+7Numeric or 1Alpha+18Numeric or 8Numeric or 9Numeric or 16 Numeric or 8Alpha
40
+ 'NM' => ['12345678', '123456789'], # Format: 8Numeric or 9Numeric
41
+ 'NC' => ['123456', '1234567', '12345678', '123456789', '123456789012'], # Format: 1-12Numeric
42
+ 'ND' => ['123456789', 'KLK123456'], # Format: 3Alpha+6Numeric or 9Numeric
43
+ 'OH' => ['L1234', 'A12345678', 'AB123', 'AB1234567', '12345678'], # Format: 1Alpha+4-8Numeric or 2Alpha+3-7Numeric or 8Numeric
44
+ 'OK' => ['A123456789', '123456789'], # Format: 1Alpha+9Numeric or 9Numeric
45
+ 'OR' => ['1', '123456789'], # Format: 1-9Numeric
46
+ 'PA' => ['12345678'], # Format: 8Numeric
47
+ 'RI' => ['1234567', 'A123456'], # Format: 7Numeric or 1Alpha+6Numeric
48
+ 'SC' => ['12345', '12345678901'], # Format: 5-11Numeric
49
+ 'SD' => ['123456', '1234567890', '123456789012'], # Format: 6-10Numeric or 12Numeric
50
+ 'TN' => ['1234567', '123456789'], # Format: 7-9Numeric
51
+ 'TX' => ['1234567', '12345678'], # Format: 7-8Numeric
52
+ 'UT' => ['1234', '1234567890'], # Format: 4-10Numeric
53
+ 'VT' => ['12345678', '1234567A'], # Format: 8Numeric or 7Numeric+A
54
+ 'VA' => ['K123456789', 'A1234567890', 'A12345678901', '123456789'], # Format: 1Alpha+9Numeric or 1Alpha+10Numeric or 1Alpha+11Numeric or 9Numeric
55
+ 'WA' => ['A12345678901', 'ABCDEFG12345'], # Format: 1-7Alpha+any combination of Alpha, Numeric, or * for a total of 12 characters
56
+ 'WV' => ['1234567', 'E123456', 'AB123456'], # Format: 7Numeric or 1-2Alpha+5-6Numeric
57
+ 'WI' => ['W1234567890123'], # Format: 1Alpha+13Numeric
58
+ 'WY' => ['123456789', '1234567890'] } # Format: 9-10Numeric
59
59
  end
metadata CHANGED
@@ -1,55 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dl_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Medeiros
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-24 00:00:00.000000000 Z
11
+ date: 2016-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: shoulda
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: test-unit
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
53
67
  - !ruby/object:Gem::Version
54
68
  version: '0'
55
69
  description: DlValidator is a small gem that performs soft checks against a drivers
@@ -61,7 +75,10 @@ executables: []
61
75
  extensions: []
62
76
  extra_rdoc_files: []
63
77
  files:
64
- - .gitignore
78
+ - ".gitignore"
79
+ - ".ruby-gemset"
80
+ - ".ruby-version"
81
+ - ".travis.yml"
65
82
  - Gemfile
66
83
  - Gemfile.lock
67
84
  - LICENSE.txt
@@ -84,17 +101,17 @@ require_paths:
84
101
  - lib
85
102
  required_ruby_version: !ruby/object:Gem::Requirement
86
103
  requirements:
87
- - - '>='
104
+ - - ">="
88
105
  - !ruby/object:Gem::Version
89
106
  version: '0'
90
107
  required_rubygems_version: !ruby/object:Gem::Requirement
91
108
  requirements:
92
- - - '>='
109
+ - - ">="
93
110
  - !ruby/object:Gem::Version
94
111
  version: '0'
95
112
  requirements: []
96
113
  rubyforge_project:
97
- rubygems_version: 2.0.3
114
+ rubygems_version: 2.5.1
98
115
  signing_key:
99
116
  specification_version: 4
100
117
  summary: DlValidator is a small gem that performs soft checks against a drivers license