kevintyll-ssn_validator 1.0.2 → 1.0.3

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.
@@ -27,3 +27,9 @@
27
27
 
28
28
  * 1 minor enhancement:
29
29
  * Using jeweler gem to create gemspec and rdoc files
30
+
31
+ == 1.0.3 2009-04-24
32
+
33
+ * 2 minor enhancement:
34
+ * Added method #death_master_file_record to SsnValidator::Ssn to return the actual dmf record if the SSN exists
35
+ * Changed the method #death_master_file_hit? to simply return true or false.
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 0
3
- :patch: 2
3
+ :patch: 3
4
4
  :major: 1
@@ -61,9 +61,14 @@ module SsnValidator
61
61
  @errors.empty?
62
62
  end
63
63
 
64
+ #returns the death master record if there is one.
65
+ def death_master_file_record
66
+ DeathMasterFile.find_by_social_security_number(@ssn)
67
+ end
68
+
64
69
  #Determines if the passed in ssn belongs to the deceased.
65
70
  def death_master_file_hit?
66
- DeathMasterFile.find_by_social_security_number(@ssn)
71
+ !death_master_file_record.nil?
67
72
  end
68
73
 
69
74
 
@@ -74,9 +74,11 @@ class TestSsnValidator < Test::Unit::TestCase
74
74
  DeathMasterFileLoader.new(File.dirname(__FILE__) + '/files/test_dmf_initial_load.txt','2009-01-01').load_file
75
75
 
76
76
  validator = SsnValidator::Ssn.new('772781978')#ssn from file
77
+ assert DeathMasterFile, validator.death_master_file_record.class
77
78
  assert validator.death_master_file_hit?
78
79
 
79
80
  validator = SsnValidator::Ssn.new('666781978')#ssn not in file
81
+ assert_nil validator.death_master_file_record
80
82
  assert !validator.death_master_file_hit?
81
83
  end
82
84
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kevintyll-ssn_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Tyll