kevintyll-ssn_validator 1.0.1 → 1.0.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.
- data/History.txt +5 -0
- data/LICENSE +20 -0
- data/PostInstall.txt +0 -13
- data/README.rdoc +3 -24
- data/Rakefile +54 -22
- data/VERSION.yml +4 -0
- data/lib/ssn_validator.rb +0 -4
- data/test/test_helper.rb +5 -2
- metadata +57 -30
- data/Manifest.txt +0 -29
- data/script/console +0 -10
- data/script/destroy +0 -14
- data/script/generate +0 -14
data/History.txt
CHANGED
@@ -22,3 +22,8 @@
|
|
22
22
|
* 2 bug fixes:
|
23
23
|
* Fixed dmf mysql load error when single quote is in a data file record.
|
24
24
|
* Fixed ssn_validator:update_data rake task that broke on the last build.
|
25
|
+
|
26
|
+
== 1.0.2 2009-04-24
|
27
|
+
|
28
|
+
* 1 minor enhancement:
|
29
|
+
* Using jeweler gem to create gemspec and rdoc files
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 Kevin Tyll
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/PostInstall.txt
CHANGED
@@ -7,36 +7,23 @@ For more information on ssn_validator, see http://kevintyll.github.com/ssn_valid
|
|
7
7
|
config.gem 'kevintyll-ssn_validator', :lib => 'ssn_validator'
|
8
8
|
* To load your table with the current SSN data, from the command line, run:
|
9
9
|
rake ssn_validator:update_data
|
10
|
-
|
11
10
|
* The SSN data is updated monthly, so you'll want to run this rake task monthly to keep your validations accurate.
|
12
|
-
|
13
11
|
* If you've purchased the death master file data, create the death_master_files migration:
|
14
12
|
script/generate death_master_file_migration
|
15
13
|
* To load the dmf files you receive from ntis:
|
16
14
|
rake ssn_validator:death_master_file:load_file PATH='path/to/file' AS_OF='2009-03-01'
|
17
|
-
|
18
15
|
* You'll need to pass in the full path to where the file is on disk. You'll also need
|
19
16
|
to pass in the date this file's data are as of in the format yyyy-mm-dd.
|
20
|
-
|
21
17
|
* This task must be used to load the initial file you receive from ntis on CD. It can optionally be used
|
22
18
|
to load the monthly update files you download from the website. If you manually download the update files,
|
23
19
|
you do not need to add your user name and password to the environment.rb file. For a more automated approach
|
24
20
|
to loading the update files, add your user name and password to the environment.rb file and use the 2nd rake task.
|
25
|
-
|
26
21
|
* To load the monthly updates from the ntis website:
|
27
22
|
* Add your user_name and password to the environment.rb file
|
28
|
-
|
29
23
|
SsnValidator::Ntis.user_name = 'REPLACE WITH YOUR dmf.ntis.gov USER NAME'
|
30
24
|
SsnValidator::Ntis.password = 'REPLACE WITH YOUR dmf.ntis.gov PASSWORD'
|
31
|
-
|
32
25
|
* Run the rake task:
|
33
|
-
|
34
26
|
rake ssn_validator:death_master_file:update_data
|
35
|
-
|
36
27
|
* This rake task will determine the most recent file that has been loaded, and loads all subsequent files in order
|
37
28
|
from the dmf.ntis.gov website.
|
38
|
-
|
39
29
|
* The death master file data is updated monthly, so you'll want to run this rake task monthly to keep your validations accurate.
|
40
|
-
|
41
|
-
|
42
|
-
|
data/README.rdoc
CHANGED
@@ -93,27 +93,6 @@ thanks goes to the management at Clarity Services Inc. for allowing this code to
|
|
93
93
|
|
94
94
|
* The death master file data is updated monthly, so you'll want to run this rake task monthly to keep your validations accurate.
|
95
95
|
|
96
|
-
==
|
97
|
-
|
98
|
-
(
|
99
|
-
|
100
|
-
Copyright (c) 2009 Kevin Tyll
|
101
|
-
|
102
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
103
|
-
a copy of this software and associated documentation files (the
|
104
|
-
'Software'), to deal in the Software without restriction, including
|
105
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
106
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
107
|
-
permit persons to whom the Software is furnished to do so, subject to
|
108
|
-
the following conditions:
|
109
|
-
|
110
|
-
The above copyright notice and this permission notice shall be
|
111
|
-
included in all copies or substantial portions of the Software.
|
112
|
-
|
113
|
-
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
114
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
115
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
116
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
117
|
-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
118
|
-
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
119
|
-
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
96
|
+
== Copyright
|
97
|
+
|
98
|
+
Copyright (c) 2009 Kevin Tyll. See LICENSE for details.
|
data/Rakefile
CHANGED
@@ -1,25 +1,57 @@
|
|
1
|
-
|
2
|
-
require
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gemspec|
|
7
|
+
gemspec.name = "ssn_validator"
|
8
|
+
gemspec.author = "Kevin Tyll"
|
9
|
+
gemspec.email = "kevintyll@gmail.com"
|
10
|
+
gemspec.homepage = %q{http://kevintyll.git.com/ssn_validator}
|
11
|
+
gemspec.summary = "Validates whether an SSN has likely been issued or not."
|
12
|
+
gemspec.description = "Validates whether an SSN has likely been issued or not."
|
13
|
+
gemspec.post_install_message = File.readlines("PostInstall.txt").join("")
|
14
|
+
end
|
15
|
+
rescue LoadError
|
16
|
+
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
17
|
+
end
|
18
|
+
|
19
|
+
require 'rake/testtask'
|
20
|
+
Rake::TestTask.new(:test) do |test|
|
21
|
+
test.libs << 'test'
|
22
|
+
test.pattern = 'test/test_*.rb'
|
23
|
+
test.verbose = true
|
24
|
+
end
|
25
|
+
|
26
|
+
begin
|
27
|
+
require 'rcov/rcovtask'
|
28
|
+
Rcov::RcovTask.new do |test|
|
29
|
+
test.libs << 'test'
|
30
|
+
test.pattern = 'test/**/*_test.rb'
|
31
|
+
test.verbose = true
|
32
|
+
end
|
33
|
+
rescue LoadError
|
34
|
+
task :rcov do
|
35
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
36
|
+
end
|
21
37
|
end
|
22
38
|
|
23
|
-
|
24
|
-
|
39
|
+
|
40
|
+
task :default => :test
|
41
|
+
|
42
|
+
require 'rake/rdoctask'
|
43
|
+
Rake::RDocTask.new do |rdoc|
|
44
|
+
if File.exist?('VERSION.yml')
|
45
|
+
config = YAML.load(File.read('VERSION.yml'))
|
46
|
+
version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
|
47
|
+
else
|
48
|
+
version = ""
|
49
|
+
end
|
50
|
+
|
51
|
+
rdoc.rdoc_dir = 'rdoc'
|
52
|
+
rdoc.title = "ssn_validator #{version}"
|
53
|
+
rdoc.rdoc_files.include('README*')
|
54
|
+
rdoc.rdoc_files.include('LICENSE*')
|
55
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
56
|
+
end
|
25
57
|
|
data/VERSION.yml
ADDED
data/lib/ssn_validator.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
-
require '
|
1
|
+
require 'rubygems'
|
2
2
|
require 'test/unit'
|
3
3
|
require 'mocks/test/death_master_file_loader'
|
4
|
-
|
4
|
+
|
5
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
6
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
7
|
+
require 'ssn_validator'
|
5
8
|
|
6
9
|
ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => ':memory:'
|
7
10
|
|
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.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Tyll
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04-
|
12
|
+
date: 2009-04-24 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -19,43 +19,74 @@ executables: []
|
|
19
19
|
|
20
20
|
extensions: []
|
21
21
|
|
22
|
-
extra_rdoc_files:
|
23
|
-
|
22
|
+
extra_rdoc_files:
|
23
|
+
- LICENSE
|
24
|
+
- README.rdoc
|
24
25
|
files:
|
25
26
|
- History.txt
|
26
|
-
-
|
27
|
+
- LICENSE
|
27
28
|
- PostInstall.txt
|
28
29
|
- README.rdoc
|
29
30
|
- Rakefile
|
30
|
-
-
|
31
|
-
- generators/ssn_validator_migration/ssn_validator_migration_generator.rb
|
32
|
-
- generators/death_master_file_migration/templates/migration.rb
|
31
|
+
- VERSION.yml
|
33
32
|
- generators/death_master_file_migration/death_master_file_migration_generator.rb
|
34
|
-
-
|
33
|
+
- generators/death_master_file_migration/templates/migration.rb
|
34
|
+
- generators/ssn_validator_migration/ssn_validator_migration_generator.rb
|
35
|
+
- generators/ssn_validator_migration/templates/migration.rb
|
36
|
+
- lib/ssn_validator.rb
|
37
|
+
- lib/ssn_validator/models/death_master_file.rb
|
38
|
+
- lib/ssn_validator/models/death_master_file_loader.rb
|
35
39
|
- lib/ssn_validator/models/ssn_high_group_code.rb
|
36
40
|
- lib/ssn_validator/models/ssn_high_group_code_loader.rb
|
37
41
|
- lib/ssn_validator/models/ssn_validator.rb
|
38
|
-
- lib/ssn_validator/
|
39
|
-
- lib/ssn_validator/models/death_master_file_loader.rb
|
40
|
-
- lib/ssn_validator.rb
|
42
|
+
- lib/ssn_validator/ntis.rb
|
41
43
|
- lib/tasks/ssn_validator.rake
|
42
|
-
-
|
43
|
-
- script/destroy
|
44
|
-
- script/generate
|
45
|
-
- test/test_helper.rb
|
46
|
-
- test/test_ssn_validator.rb
|
47
|
-
- test/test_ssn_high_group_code_loader.rb
|
48
|
-
- test/test_death_master_file_loader.rb
|
49
|
-
- test/mocks/test/death_master_file_loader.rb
|
44
|
+
- test/files/test_dmf_funky_data_load.txt
|
50
45
|
- test/files/test_dmf_initial_load.txt
|
51
46
|
- test/files/test_dmf_update_load.txt
|
47
|
+
- test/files/valid_csv_from_funky_data_file.txt
|
48
|
+
- test/mocks/test/death_master_file_loader.rb
|
49
|
+
- test/test_death_master_file_loader.rb
|
50
|
+
- test/test_helper.rb
|
51
|
+
- test/test_ssn_high_group_code_loader.rb
|
52
|
+
- test/test_ssn_validator.rb
|
52
53
|
has_rdoc: true
|
53
54
|
homepage: http://kevintyll.git.com/ssn_validator
|
54
|
-
post_install_message:
|
55
|
-
|
55
|
+
post_install_message: |
|
56
|
+
|
57
|
+
For more information on ssn_validator, see http://kevintyll.github.com/ssn_validator/
|
58
|
+
|
59
|
+
* To create the necessary db migration, from the command line, run:
|
60
|
+
script/generate ssn_validator_migration
|
61
|
+
* Require the gem in your environment.rb file in the Rails::Initializer block:
|
62
|
+
config.gem 'kevintyll-ssn_validator', :lib => 'ssn_validator'
|
63
|
+
* To load your table with the current SSN data, from the command line, run:
|
64
|
+
rake ssn_validator:update_data
|
65
|
+
* The SSN data is updated monthly, so you'll want to run this rake task monthly to keep your validations accurate.
|
66
|
+
* If you've purchased the death master file data, create the death_master_files migration:
|
67
|
+
script/generate death_master_file_migration
|
68
|
+
* To load the dmf files you receive from ntis:
|
69
|
+
rake ssn_validator:death_master_file:load_file PATH='path/to/file' AS_OF='2009-03-01'
|
70
|
+
* You'll need to pass in the full path to where the file is on disk. You'll also need
|
71
|
+
to pass in the date this file's data are as of in the format yyyy-mm-dd.
|
72
|
+
* This task must be used to load the initial file you receive from ntis on CD. It can optionally be used
|
73
|
+
to load the monthly update files you download from the website. If you manually download the update files,
|
74
|
+
you do not need to add your user name and password to the environment.rb file. For a more automated approach
|
75
|
+
to loading the update files, add your user name and password to the environment.rb file and use the 2nd rake task.
|
76
|
+
* To load the monthly updates from the ntis website:
|
77
|
+
* Add your user_name and password to the environment.rb file
|
78
|
+
SsnValidator::Ntis.user_name = 'REPLACE WITH YOUR dmf.ntis.gov USER NAME'
|
79
|
+
SsnValidator::Ntis.password = 'REPLACE WITH YOUR dmf.ntis.gov PASSWORD'
|
80
|
+
* Run the rake task:
|
81
|
+
rake ssn_validator:death_master_file:update_data
|
82
|
+
* This rake task will determine the most recent file that has been loaded, and loads all subsequent files in order
|
83
|
+
from the dmf.ntis.gov website.
|
84
|
+
* The death master file data is updated monthly, so you'll want to run this rake task monthly to keep your validations accurate.
|
56
85
|
|
86
|
+
rdoc_options:
|
87
|
+
- --charset=UTF-8
|
57
88
|
require_paths:
|
58
|
-
-
|
89
|
+
- lib
|
59
90
|
required_ruby_version: !ruby/object:Gem::Requirement
|
60
91
|
requirements:
|
61
92
|
- - ">="
|
@@ -76,12 +107,8 @@ signing_key:
|
|
76
107
|
specification_version: 2
|
77
108
|
summary: Validates whether an SSN has likely been issued or not.
|
78
109
|
test_files:
|
110
|
+
- test/mocks/test/death_master_file_loader.rb
|
111
|
+
- test/test_death_master_file_loader.rb
|
79
112
|
- test/test_helper.rb
|
80
|
-
- test/test_ssn_validator.rb
|
81
113
|
- test/test_ssn_high_group_code_loader.rb
|
82
|
-
- test/
|
83
|
-
- test/mocks/test/death_master_file_loader.rb
|
84
|
-
- test/files/test_dmf_initial_load.txt
|
85
|
-
- test/files/test_dmf_update_load.txt
|
86
|
-
- test/files/test_dmf_funky_data_load.txt
|
87
|
-
- test/files/valid_csv_from_funky_data_file.txt
|
114
|
+
- test/test_ssn_validator.rb
|
data/Manifest.txt
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
History.txt
|
2
|
-
Manifest.txt
|
3
|
-
PostInstall.txt
|
4
|
-
README.rdoc
|
5
|
-
Rakefile
|
6
|
-
generators/ssn_validator_migration/templates/migration.rb
|
7
|
-
generators/ssn_validator_migration/ssn_validator_migration_generator.rb
|
8
|
-
generators/death_master_file_migration/templates/migration.rb
|
9
|
-
generators/death_master_file_migration/death_master_file_migration_generator.rb
|
10
|
-
lib/ssn_validator/ntis.rb
|
11
|
-
lib/ssn_validator/models/ssn_high_group_code.rb
|
12
|
-
lib/ssn_validator/models/ssn_high_group_code_loader.rb
|
13
|
-
lib/ssn_validator/models/ssn_validator.rb
|
14
|
-
lib/ssn_validator/models/death_master_file.rb
|
15
|
-
lib/ssn_validator/models/death_master_file_loader.rb
|
16
|
-
lib/ssn_validator.rb
|
17
|
-
lib/tasks/ssn_validator.rake
|
18
|
-
script/console
|
19
|
-
script/destroy
|
20
|
-
script/generate
|
21
|
-
test/test_helper.rb
|
22
|
-
test/test_ssn_validator.rb
|
23
|
-
test/test_ssn_high_group_code_loader.rb
|
24
|
-
test/test_death_master_file_loader.rb
|
25
|
-
test/mocks/test/death_master_file_loader.rb
|
26
|
-
test/files/test_dmf_initial_load.txt
|
27
|
-
test/files/test_dmf_update_load.txt
|
28
|
-
test/files/test_dmf_funky_data_load.txt
|
29
|
-
test/files/valid_csv_from_funky_data_file.txt
|
data/script/console
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# File: script/console
|
3
|
-
irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
|
4
|
-
|
5
|
-
libs = " -r irb/completion"
|
6
|
-
# Perhaps use a console_lib to store any extra methods I may want available in the cosole
|
7
|
-
# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
|
8
|
-
libs << " -r #{File.dirname(__FILE__) + '/../lib/ssn_validator.rb'}"
|
9
|
-
puts "Loading ssn_validator gem"
|
10
|
-
exec "#{irb} #{libs} --simple-prompt"
|
data/script/destroy
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'rubigen'
|
6
|
-
rescue LoadError
|
7
|
-
require 'rubygems'
|
8
|
-
require 'rubigen'
|
9
|
-
end
|
10
|
-
require 'rubigen/scripts/destroy'
|
11
|
-
|
12
|
-
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
-
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
-
RubiGen::Scripts::Destroy.new.run(ARGV)
|
data/script/generate
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'rubigen'
|
6
|
-
rescue LoadError
|
7
|
-
require 'rubygems'
|
8
|
-
require 'rubigen'
|
9
|
-
end
|
10
|
-
require 'rubigen/scripts/generate'
|
11
|
-
|
12
|
-
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
-
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
|
-
RubiGen::Scripts::Generate.new.run(ARGV)
|