ssn 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ssn/active_record_extensions.rb +8 -4
- data/lib/ssn/version.rb +1 -1
- metadata +32 -32
@@ -50,13 +50,15 @@ module Ssn
|
|
50
50
|
end
|
51
51
|
|
52
52
|
define_method "#{str}=" do |value|
|
53
|
-
|
54
|
-
|
53
|
+
if ssn_value_considered_blank?( value )
|
54
|
+
self.send "raw_#{str}=", nil
|
55
|
+
else
|
56
|
+
self.send "raw_#{str}=", value.gsub( /-/, "" )
|
57
|
+
end
|
55
58
|
end
|
56
59
|
|
57
60
|
define_method "raw_#{str}=" do |value|
|
58
|
-
|
59
|
-
super( value )
|
61
|
+
super ssn_value_considered_blank?( value ) ? nil : value
|
60
62
|
end
|
61
63
|
end
|
62
64
|
private :initialize_has_ssn_from_string
|
@@ -67,6 +69,8 @@ module Ssn
|
|
67
69
|
|
68
70
|
def considered_blank_ssns
|
69
71
|
[
|
72
|
+
nil,
|
73
|
+
'',
|
70
74
|
'000000000',
|
71
75
|
'000-00-0000'
|
72
76
|
]
|
data/lib/ssn/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ssn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 2
|
10
|
+
version: 1.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- C. Jason Harrelson (midas)
|
@@ -15,12 +15,11 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-10-23 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rspec
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
22
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
23
|
none: false
|
25
24
|
requirements:
|
26
25
|
- - ">="
|
@@ -30,11 +29,11 @@ dependencies:
|
|
30
29
|
- 0
|
31
30
|
version: "0"
|
32
31
|
type: :development
|
33
|
-
|
32
|
+
requirement: *id001
|
33
|
+
prerelease: false
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: rails
|
36
|
-
|
37
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
36
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
38
37
|
none: false
|
39
38
|
requirements:
|
40
39
|
- - "="
|
@@ -46,11 +45,11 @@ dependencies:
|
|
46
45
|
- 0
|
47
46
|
version: 3.1.0
|
48
47
|
type: :development
|
49
|
-
|
48
|
+
requirement: *id002
|
49
|
+
prerelease: false
|
50
50
|
- !ruby/object:Gem::Dependency
|
51
51
|
name: sqlite3
|
52
|
-
|
53
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
54
53
|
none: false
|
55
54
|
requirements:
|
56
55
|
- - ">="
|
@@ -60,11 +59,11 @@ dependencies:
|
|
60
59
|
- 0
|
61
60
|
version: "0"
|
62
61
|
type: :development
|
63
|
-
|
62
|
+
requirement: *id003
|
63
|
+
prerelease: false
|
64
64
|
- !ruby/object:Gem::Dependency
|
65
65
|
name: guard
|
66
|
-
|
67
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
68
67
|
none: false
|
69
68
|
requirements:
|
70
69
|
- - ">="
|
@@ -74,11 +73,11 @@ dependencies:
|
|
74
73
|
- 0
|
75
74
|
version: "0"
|
76
75
|
type: :development
|
77
|
-
|
76
|
+
requirement: *id004
|
77
|
+
prerelease: false
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
name: rb-fsevent
|
80
|
-
|
81
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
80
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
82
81
|
none: false
|
83
82
|
requirements:
|
84
83
|
- - ">="
|
@@ -88,11 +87,11 @@ dependencies:
|
|
88
87
|
- 0
|
89
88
|
version: "0"
|
90
89
|
type: :development
|
91
|
-
|
90
|
+
requirement: *id005
|
91
|
+
prerelease: false
|
92
92
|
- !ruby/object:Gem::Dependency
|
93
93
|
name: growl
|
94
|
-
|
95
|
-
requirement: &id006 !ruby/object:Gem::Requirement
|
94
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
96
95
|
none: false
|
97
96
|
requirements:
|
98
97
|
- - ">="
|
@@ -102,11 +101,11 @@ dependencies:
|
|
102
101
|
- 0
|
103
102
|
version: "0"
|
104
103
|
type: :development
|
105
|
-
|
104
|
+
requirement: *id006
|
105
|
+
prerelease: false
|
106
106
|
- !ruby/object:Gem::Dependency
|
107
107
|
name: guard-rspec
|
108
|
-
|
109
|
-
requirement: &id007 !ruby/object:Gem::Requirement
|
108
|
+
version_requirements: &id007 !ruby/object:Gem::Requirement
|
110
109
|
none: false
|
111
110
|
requirements:
|
112
111
|
- - ">="
|
@@ -116,11 +115,11 @@ dependencies:
|
|
116
115
|
- 0
|
117
116
|
version: "0"
|
118
117
|
type: :development
|
119
|
-
|
118
|
+
requirement: *id007
|
119
|
+
prerelease: false
|
120
120
|
- !ruby/object:Gem::Dependency
|
121
121
|
name: ruby-debug
|
122
|
-
|
123
|
-
requirement: &id008 !ruby/object:Gem::Requirement
|
122
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
124
123
|
none: false
|
125
124
|
requirements:
|
126
125
|
- - ">="
|
@@ -130,11 +129,11 @@ dependencies:
|
|
130
129
|
- 0
|
131
130
|
version: "0"
|
132
131
|
type: :development
|
133
|
-
|
132
|
+
requirement: *id008
|
133
|
+
prerelease: false
|
134
134
|
- !ruby/object:Gem::Dependency
|
135
135
|
name: rails
|
136
|
-
|
137
|
-
requirement: &id009 !ruby/object:Gem::Requirement
|
136
|
+
version_requirements: &id009 !ruby/object:Gem::Requirement
|
138
137
|
none: false
|
139
138
|
requirements:
|
140
139
|
- - ">="
|
@@ -144,7 +143,8 @@ dependencies:
|
|
144
143
|
- 0
|
145
144
|
version: "0"
|
146
145
|
type: :runtime
|
147
|
-
|
146
|
+
requirement: *id009
|
147
|
+
prerelease: false
|
148
148
|
description: Encapsulates functionality for storing an unformatted SSN but formatting the SSN on print.
|
149
149
|
email:
|
150
150
|
- jason@lookforwardenterprises.com
|
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
205
|
requirements: []
|
206
206
|
|
207
207
|
rubyforge_project: ssn
|
208
|
-
rubygems_version: 1.8.
|
208
|
+
rubygems_version: 1.8.24
|
209
209
|
signing_key:
|
210
210
|
specification_version: 3
|
211
211
|
summary: Easily use SSNs in your app.
|