ofac 1.3.2 → 2.0.0

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.
@@ -1,10 +1,10 @@
1
- Tue, 09 Oct 2012 12:01:44 -0400
2
- README.rdoc Fri, 16 Mar 2012 15:37:08 -0400
1
+ Tue, 07 Jan 2014 09:58:09 -0500
2
+ README.rdoc Tue, 07 Jan 2014 09:55:46 -0500
3
3
  lib/generators/ofac_migration/build/build_generator.rb Fri, 16 Mar 2012 15:37:08 -0400
4
4
  lib/generators/ofac_migration/build/templates/create_ofac_sdns.rb Fri, 16 Mar 2012 15:37:08 -0400
5
- lib/ofac/models/ofac.rb Mon, 17 Aug 2009 10:17:51 -0400
6
- lib/ofac/models/ofac_sdn.rb Tue, 21 Dec 2010 12:34:18 -0500
7
- lib/ofac/models/ofac_sdn_loader.rb Tue, 09 Oct 2012 11:56:19 -0400
5
+ lib/ofac.rb Thu, 02 Sep 2010 14:42:06 -0400
6
+ lib/ofac/models/ofac.rb Tue, 07 Jan 2014 09:45:35 -0500
7
+ lib/ofac/models/ofac_sdn.rb Tue, 07 Jan 2014 09:48:22 -0500
8
+ lib/ofac/models/ofac_sdn_loader.rb Wed, 05 Jun 2013 09:04:58 -0400
8
9
  lib/ofac/ofac_match.rb Wed, 29 Jul 2009 13:27:13 -0400
9
10
  lib/ofac/ruby_string_extensions.rb Mon, 11 May 2009 12:39:33 -0400
10
- lib/ofac.rb Thu, 02 Sep 2010 14:42:06 -0400
Binary file
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
6
 
7
- <title>ofac 1.3.1</title>
7
+ <title>ofac 2.0.0</title>
8
8
 
9
9
  <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
10
10
 
@@ -59,18 +59,18 @@
59
59
 
60
60
  <ul class="link-list">
61
61
 
62
- <li><a href="./OfacMigration.html">OfacMigration</a>
63
-
64
- <li><a href="./OfacMigration/Generators.html">OfacMigration::Generators</a>
65
-
66
- <li><a href="./OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
67
-
68
62
  <li><a href="./CreateOfacSdns.html">CreateOfacSdns</a>
69
63
 
70
64
  <li><a href="./Ofac.html">Ofac</a>
71
65
 
72
66
  <li><a href="./OfacMatch.html">OfacMatch</a>
73
67
 
68
+ <li><a href="./OfacMigration.html">OfacMigration</a>
69
+
70
+ <li><a href="./OfacMigration/Generators.html">OfacMigration::Generators</a>
71
+
72
+ <li><a href="./OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
73
+
74
74
  <li><a href="./OfacSdn.html">OfacSdn</a>
75
75
 
76
76
  <li><a href="./OfacSdnLoader.html">OfacSdnLoader</a>
@@ -83,12 +83,14 @@
83
83
  </div>
84
84
  </nav>
85
85
 
86
- <p>This is the API documentation for ofac 1.3.1.
86
+ <div id="documentation" class="description">
87
+ <p>This is the API documentation for ofac 2.0.0.
88
+ </div>
87
89
 
88
90
 
89
91
  <footer id="validator-badges">
90
92
  <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
91
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
93
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
92
94
  <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
93
95
  </footer>
94
96
 
@@ -109,13 +109,15 @@ function hookSearch() {
109
109
  function highlightTarget( anchor ) {
110
110
  console.debug( "Highlighting target '%s'.", anchor );
111
111
 
112
- $("a[name=" + anchor + "]").each( function() {
113
- if ( !$(this).parent().parent().hasClass('target-section') ) {
114
- console.debug( "Wrapping the target-section" );
115
- $('div.method-detail').unwrap( 'div.target-section' );
116
- $(this).parent().wrap( '<div class="target-section"></div>' );
117
- } else {
118
- console.debug( "Already wrapped." );
112
+ $("a[name]").each( function() {
113
+ if ( $(this).attr("name") == anchor ) {
114
+ if ( !$(this).parent().parent().hasClass('target-section') ) {
115
+ console.debug( "Wrapping the target-section" );
116
+ $('div.method-detail').unwrap( 'div.target-section' );
117
+ $(this).parent().wrap( '<div class="target-section"></div>' );
118
+ } else {
119
+ console.debug( "Already wrapped." );
120
+ }
119
121
  }
120
122
  });
121
123
  };
@@ -1 +1 @@
1
- var search_data = {"index":{"searchIndex":["createofacsdns","ofac","ofacmatch","ofacmigration","generators","buildgenerator","ofacsdn","ofacsdnloader","string","copy_migrations()","db_hit?()","down()","load_current_sdn_file()","new()","new()","next_migration_number()","ofac_soundex()","ofac_sounds_like()","possible_hits()","score()","score()","up()","readme"],"longSearchIndex":["createofacsdns","ofac","ofacmatch","ofacmigration","ofacmigration::generators","ofacmigration::generators::buildgenerator","ofacsdn","ofacsdnloader","string","ofacmigration::generators::buildgenerator#copy_migrations()","ofac#db_hit?()","createofacsdns::down()","ofacsdnloader::load_current_sdn_file()","ofac::new()","ofacmatch::new()","ofacmigration::generators::buildgenerator::next_migration_number()","string#ofac_soundex()","string#ofac_sounds_like()","ofac#possible_hits()","ofac#score()","ofacmatch#score()","createofacsdns::up()",""],"info":[["CreateOfacSdns","","CreateOfacSdns.html","",""],["Ofac","","Ofac.html","",""],["OfacMatch","","OfacMatch.html","",""],["OfacMigration","","OfacMigration.html","",""],["OfacMigration::Generators","","OfacMigration/Generators.html","",""],["OfacMigration::Generators::BuildGenerator","","OfacMigration/Generators/BuildGenerator.html","",""],["OfacSdn","","OfacSdn.html","",""],["OfacSdnLoader","","OfacSdnLoader.html","",""],["String","","String.html","",""],["copy_migrations","OfacMigration::Generators::BuildGenerator","OfacMigration/Generators/BuildGenerator.html#method-i-copy_migrations","()","<p>copy the migration file over\n"],["db_hit?","Ofac","Ofac.html#method-i-db_hit-3F","()",""],["down","CreateOfacSdns","CreateOfacSdns.html#method-c-down","()",""],["load_current_sdn_file","OfacSdnLoader","OfacSdnLoader.html#method-c-load_current_sdn_file","()","<p>Loads the most recent file from\nwww.treas.gov/offices/enforcement/ofac/sdn/delimit/index.shtml\n"],["new","Ofac","Ofac.html#method-c-new","(identity)","<p>Accepts a hash with the identitys demographic information\n\n<pre class=\"ruby\"><span class=\"ruby-constant\">Ofac</span>.<span class=\"ruby-identifier\">new</span>({:<span class=\"ruby-identifier\">name</span> =<span class=\"ruby-operator\">&gt;</span> <span class=\"ruby-string\">'Oscar Hernandez'</span>, :<span class=\"ruby-identifier\">city</span> <span class=\"ruby-operator\">...</span>\n</pre>\n"],["new","OfacMatch","OfacMatch.html#method-c-new","(stats={})","<p>Intialize a Match object with a record hash of fields you want to match on.\nEach key in the hash, also …\n"],["next_migration_number","OfacMigration::Generators::BuildGenerator","OfacMigration/Generators/BuildGenerator.html#method-c-next_migration_number","(path)","<p>Get the next migration number\n"],["ofac_soundex","String","String.html#method-i-ofac_soundex","(census = true)","<p>desc: en.wikipedia.org/wiki/Soundex\n"],["ofac_sounds_like","String","String.html#method-i-ofac_sounds_like","(other, census = true)",""],["possible_hits","Ofac","Ofac.html#method-i-possible_hits","()","\n<pre>Returns an array of hashes of records in the OFAC data that found partial matches with that record's ...</pre>\n"],["score","Ofac","Ofac.html#method-i-score","()","<p>Creates a score, 1 - 100, based on how well the name and address match the\ndata on the SDN (Specially …\n"],["score","OfacMatch","OfacMatch.html#method-i-score","(match_records)","<p>match_records is an array of hashes.\n<p>The hash keys must match the record hash keys set when initialized. …\n"],["up","CreateOfacSdns","CreateOfacSdns.html#method-c-up","()",""],["README","","README_rdoc.html","","<p>ofac\n<p>kevintyll.github.com/ofac\n<p>www.drexel-labs.com\n"]]}}
1
+ var search_data = {"index":{"searchIndex":["createofacsdns","ofac","ofacmatch","ofacmigration","generators","buildgenerator","ofacsdn","ofacsdnloader","string","copy_migrations()","db_hit?()","down()","load_current_sdn_file()","new()","new()","next_migration_number()","ofac_soundex()","ofac_sounds_like()","possible_hits()","possible_sdns()","score()","score()","up()","readme"],"longSearchIndex":["createofacsdns","ofac","ofacmatch","ofacmigration","ofacmigration::generators","ofacmigration::generators::buildgenerator","ofacsdn","ofacsdnloader","string","ofacmigration::generators::buildgenerator#copy_migrations()","ofac#db_hit?()","createofacsdns::down()","ofacsdnloader::load_current_sdn_file()","ofac::new()","ofacmatch::new()","ofacmigration::generators::buildgenerator::next_migration_number()","string#ofac_soundex()","string#ofac_sounds_like()","ofac#possible_hits()","ofacsdn::possible_sdns()","ofac#score()","ofacmatch#score()","createofacsdns::up()",""],"info":[["CreateOfacSdns","","CreateOfacSdns.html","",""],["Ofac","","Ofac.html","",""],["OfacMatch","","OfacMatch.html","",""],["OfacMigration","","OfacMigration.html","",""],["OfacMigration::Generators","","OfacMigration/Generators.html","",""],["OfacMigration::Generators::BuildGenerator","","OfacMigration/Generators/BuildGenerator.html","",""],["OfacSdn","","OfacSdn.html","",""],["OfacSdnLoader","","OfacSdnLoader.html","",""],["String","","String.html","",""],["copy_migrations","OfacMigration::Generators::BuildGenerator","OfacMigration/Generators/BuildGenerator.html#method-i-copy_migrations","()","<p>copy the migration file over\n"],["db_hit?","Ofac","Ofac.html#method-i-db_hit-3F","()",""],["down","CreateOfacSdns","CreateOfacSdns.html#method-c-down","()",""],["load_current_sdn_file","OfacSdnLoader","OfacSdnLoader.html#method-c-load_current_sdn_file","()","<p>Loads the most recent file from\nwww.treas.gov/offices/enforcement/ofac/sdn/delimit/index.shtml\n"],["new","Ofac","Ofac.html#method-c-new","(identity)","<p>Accepts a hash with the identity&#39;s demographic information\n\n<pre class=\"ruby\"><span class=\"ruby-constant\">Ofac</span>.<span class=\"ruby-identifier\">new</span>({:<span class=\"ruby-identifier\">name</span> =<span class=\"ruby-operator\">&gt;</span> <span class=\"ruby-string\">&#39;Oscar Hernandez&#39;</span>, :<span class=\"ruby-identifier\">city</span> <span class=\"ruby-operator\">...</span>\n</pre>\n"],["new","OfacMatch","OfacMatch.html#method-c-new","(stats={})","<p>Intialize a Match object with a record hash of fields you want to match on.\nEach key in the hash, also …\n"],["next_migration_number","OfacMigration::Generators::BuildGenerator","OfacMigration/Generators/BuildGenerator.html#method-c-next_migration_number","(path)","<p>Get the next migration number\n"],["ofac_soundex","String","String.html#method-i-ofac_soundex","(census = true)","<p>desc: en.wikipedia.org/wiki/Soundex\n"],["ofac_sounds_like","String","String.html#method-i-ofac_sounds_like","(other, census = true)",""],["possible_hits","Ofac","Ofac.html#method-i-possible_hits","()","\n<pre>Returns an array of hashes of records in the OFAC data that found partial matches with that record&#39;s ...</pre>\n"],["possible_sdns","OfacSdn","OfacSdn.html#method-c-possible_sdns","(name_array, use_ors = false)",""],["score","Ofac","Ofac.html#method-i-score","()","<p>Creates a score, 1 - 100, based on how well the name and address match the\ndata on the SDN (Specially …\n"],["score","OfacMatch","OfacMatch.html#method-i-score","(match_records)","<p>match_records is an array of hashes.\n<p>The hash keys must match the record hash keys set when initialized. …\n"],["up","CreateOfacSdns","CreateOfacSdns.html#method-c-up","()",""],["README","","README_rdoc.html","","<p>ofac\n<p>kevintyll.github.com/ofac\n<p>www.drexel-labs.com\n"]]}}
@@ -6,6 +6,7 @@
6
6
  *
7
7
  */
8
8
 
9
+ /* vim: ft=css et sw=2 ts=2 sts=2 */
9
10
  /* Base Green is: #6C8C22 */
10
11
 
11
12
  * { padding: 0; margin: 0; }
@@ -27,6 +28,27 @@ h1 {
27
28
  }
28
29
  h2,h3,h4 { margin-top: 1.5em; }
29
30
 
31
+ h1 span,
32
+ h2 span,
33
+ h3 span,
34
+ h4 span,
35
+ h5 span,
36
+ h6 span {
37
+ display: none;
38
+ padding-left: 1em;
39
+ font-size: 50%;
40
+ vertical-align: super;
41
+ }
42
+
43
+ h1:hover span,
44
+ h2:hover span,
45
+ h3:hover span,
46
+ h4:hover span,
47
+ h5:hover span,
48
+ h6:hover span {
49
+ display: inline;
50
+ }
51
+
30
52
  :link,
31
53
  :visited {
32
54
  color: #6C8C22;
@@ -42,6 +64,16 @@ pre {
42
64
  padding: 0.5em 0;
43
65
  }
44
66
 
67
+ blockquote {
68
+ background: #ddd;
69
+ margin: 1em;
70
+ padding: 0.25em;
71
+ }
72
+
73
+ blockquote > :first-child {
74
+ margin-top: 0 !important;
75
+ }
76
+
45
77
  /* @group Generic Classes */
46
78
 
47
79
  .initially-hidden {
@@ -193,6 +225,15 @@ pre {
193
225
  list-style-image: url(images/page_green.png);
194
226
  }
195
227
 
228
+ #table-of-contents {
229
+ margin-top: 2em;
230
+ }
231
+
232
+ #table-of-contents ul {
233
+ padding-left: 28px;
234
+ list-style-image: url(images/tag_blue.png);
235
+ }
236
+
196
237
  dl.svninfo {
197
238
  color: #666;
198
239
  margin: 0;
@@ -203,7 +244,9 @@ dl.svninfo dt {
203
244
 
204
245
  ul.link-list li {
205
246
  white-space: nowrap;
247
+ line-height: 20px;
206
248
  }
249
+
207
250
  ul.link-list .type {
208
251
  font-size: 8px;
209
252
  text-transform: uppercase;
@@ -213,6 +256,10 @@ ul.link-list .type {
213
256
  -webkit-border-radius: 5px;
214
257
  }
215
258
 
259
+ .calls-super {
260
+ background: url(images/arrow_up.png) no-repeat right center;
261
+ }
262
+
216
263
  /* @end */
217
264
 
218
265
  /* @group Class Metadata Section */
@@ -385,6 +432,11 @@ ul.link-list .type {
385
432
  display: none;
386
433
  }
387
434
 
435
+ #documentation .method-description .method-calls-super {
436
+ color: #333;
437
+ font-weight: bolder;
438
+ }
439
+
388
440
  #documentation .method-detail {
389
441
  margin: 0.5em 0;
390
442
  padding: 0.5em 0;
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
6
 
7
- <title>Table of Contents - ofac 1.3.1</title>
7
+ <title>Table of Contents - ofac 2.0.0</title>
8
8
 
9
9
  <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
10
10
 
@@ -21,7 +21,7 @@
21
21
 
22
22
 
23
23
  <body class="indexpage">
24
- <h1>Table of Contents - ofac 1.3.1</h1>
24
+ <h1>Table of Contents - ofac 2.0.0</h1>
25
25
 
26
26
  <h2>Pages</h2>
27
27
  <ul>
@@ -36,8 +36,8 @@
36
36
  <li><a href="README_rdoc.html#label-SYNOPSIS%3A">SYNOPSIS:</a>
37
37
  <li><a href="README_rdoc.html#label-REQUIREMENTS%3A">REQUIREMENTS:</a>
38
38
  <li><a href="README_rdoc.html#label-INSTALL%3A">INSTALL:</a>
39
- <li><a href="README_rdoc.html#label-Rails+2.0">Rails 2.0</a>
40
- <li><a href="README_rdoc.html#label-Rails+3.0">Rails 3.0</a>
39
+ <li><a href="README_rdoc.html#label-Rails+2.0+-+use+version+1.3.2+or+earlier">Rails 2.0 - use version 1.3.2 or earlier</a>
40
+ <li><a href="README_rdoc.html#label-Rails+3.0+%26+4.0">Rails 3.0 &amp; 4.0</a>
41
41
  <li><a href="README_rdoc.html#label-Add+the+gem+to+your+Gemfile%3A">Add the gem to your Gemfile:</a>
42
42
  <li><a href="README_rdoc.html#label-Run+the+Bundler+install+command">Run the Bundler install command</a>
43
43
  <li><a href="README_rdoc.html#label-Copyright">Copyright</a>
@@ -48,16 +48,7 @@
48
48
 
49
49
  <h2 id="classes">Classes/Modules</h2>
50
50
  <ul>
51
- <li class="module">
52
- <a href="OfacMigration.html">OfacMigration</a>
53
- </li>
54
- <li class="module">
55
- <a href="OfacMigration/Generators.html">OfacMigration::Generators</a>
56
- </li>
57
- <li class="class">
58
- <a href="OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
59
- </li>
60
- <li class="class">
51
+ <li class="class">
61
52
  <a href="CreateOfacSdns.html">CreateOfacSdns</a>
62
53
  </li>
63
54
  <li class="class">
@@ -65,6 +56,15 @@
65
56
  </li>
66
57
  <li class="class">
67
58
  <a href="OfacMatch.html">OfacMatch</a>
59
+ </li>
60
+ <li class="module">
61
+ <a href="OfacMigration.html">OfacMigration</a>
62
+ </li>
63
+ <li class="module">
64
+ <a href="OfacMigration/Generators.html">OfacMigration::Generators</a>
65
+ </li>
66
+ <li class="class">
67
+ <a href="OfacMigration/Generators/BuildGenerator.html">OfacMigration::Generators::BuildGenerator</a>
68
68
  </li>
69
69
  <li class="class">
70
70
  <a href="OfacSdn.html">OfacSdn</a>
@@ -85,12 +85,14 @@
85
85
 
86
86
  <li class="method"><a href="OfacSdnLoader.html#method-c-load_current_sdn_file">::load_current_sdn_file &mdash; OfacSdnLoader</a>
87
87
 
88
- <li class="method"><a href="Ofac.html#method-c-new">::new &mdash; Ofac</a>
89
-
90
88
  <li class="method"><a href="OfacMatch.html#method-c-new">::new &mdash; OfacMatch</a>
91
89
 
90
+ <li class="method"><a href="Ofac.html#method-c-new">::new &mdash; Ofac</a>
91
+
92
92
  <li class="method"><a href="OfacMigration/Generators/BuildGenerator.html#method-c-next_migration_number">::next_migration_number &mdash; OfacMigration::Generators::BuildGenerator</a>
93
93
 
94
+ <li class="method"><a href="OfacSdn.html#method-c-possible_sdns">::possible_sdns &mdash; OfacSdn</a>
95
+
94
96
  <li class="method"><a href="CreateOfacSdns.html#method-c-up">::up &mdash; CreateOfacSdns</a>
95
97
 
96
98
  <li class="method"><a href="OfacMigration/Generators/BuildGenerator.html#method-i-copy_migrations">#copy_migrations &mdash; OfacMigration::Generators::BuildGenerator</a>
@@ -112,7 +114,7 @@
112
114
 
113
115
  <footer id="validator-badges">
114
116
  <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
115
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
117
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
116
118
  <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
117
119
  </footer>
118
120
 
@@ -13,15 +13,15 @@ class OfacTest < Test::Unit::TestCase
13
13
  assert_equal 0, Ofac.new({:name => ''}).score
14
14
  assert_equal 0, Ofac.new({:name => ' '}).score
15
15
  assert_equal 0, Ofac.new({:name => nil}).score
16
- assert_equal 0, Ofac.new({:name => {:first_name => '',:last_name => ' '}}).score
17
- assert_equal 0, Ofac.new({:name => {:first_name => '',:last_name => ' '}}).score
16
+ assert_equal 0, Ofac.new({:name => {:first_name => '', :last_name => ' '}}).score
17
+ assert_equal 0, Ofac.new({:name => {:first_name => '', :last_name => ' '}}).score
18
18
  assert_equal 0, Ofac.new({:name => 'P T'}).score
19
19
  end
20
20
 
21
21
  should "give a score of 0 if there is no name match" do
22
22
  assert_equal 0, Ofac.new({:name => 'Kevin T P'}).score
23
23
  assert_equal 0, Ofac.new({:name => "O'Brian"}).score
24
- assert_equal 0, Ofac.new({:name => {:first_name => 'Matthew',:last_name => "O'Brian"}}).score
24
+ assert_equal 0, Ofac.new({:name => {:first_name => 'Matthew', :last_name => "O'Brian"}}).score
25
25
  assert_equal 0, Ofac.new({:name => 'Kevin', :address => '123 somewhere ln', :city => 'Clearwater'}).score
26
26
  end
27
27
 
@@ -66,7 +66,7 @@ class OfacTest < Test::Unit::TestCase
66
66
  should "give a partial score if there is a partial name match" do
67
67
  assert_equal 40, Ofac.new({:name => 'Oscar middlename Hernandez'}).score
68
68
  assert_equal 30, Ofac.new({:name => 'Oscar WrongLastName'}).score
69
- assert_equal 70, Ofac.new({:name => 'Oscar middlename Hernandez',:city => 'Clearwater'}).score
69
+ assert_equal 70, Ofac.new({:name => 'Oscar middlename Hernandez', :city => 'Clearwater'}).score
70
70
  end
71
71
 
72
72
  should "give a score of 90 if there is a name and city match" do
@@ -104,35 +104,44 @@ class OfacTest < Test::Unit::TestCase
104
104
  assert sdn.score > 0
105
105
  end
106
106
 
107
- should "db_hit? should return true if name is an exact match in the database" do
108
-
109
- sdn = Ofac.new({:name => {:first_name => 'Oscar', :last_name => 'Hernandez'}, :city => 'Clearwater', :address => '123 somewhere ln'})
110
- assert sdn.db_hit?
107
+ context '#db_hit?' do
108
+ should "return true if name is an exact match or partial match in the database" do
111
109
 
112
- sdn = Ofac.new({:name => 'Oscar Hernandez', :city => 'Clearwater', :address => '123 somewhere ln'})
113
- assert sdn.db_hit?
110
+ sdn = Ofac.new({:name => {:first_name => 'Oscar', :last_name => 'Hernandez'}, :city => 'Clearwater', :address => '123 somewhere ln'})
111
+ assert sdn.db_hit?
114
112
 
115
- #single initials are ignored
116
- sdn = Ofac.new({:name => 'Oscar M Hernandez', :city => 'Clearwater', :address => '123 somewhere ln'})
117
- assert sdn.db_hit?
113
+ sdn = Ofac.new({:name => {:first_name => 'Os', :last_name => 'Her'}, :city => 'Clearwater', :address => '123 somewhere ln'})
114
+ assert sdn.db_hit?
118
115
 
119
- #city and address are ignored
120
- sdn = Ofac.new({:name => 'Oscar Hernandez', :city => 'bad city', :address => 'bad address'})
121
- assert sdn.db_hit?
122
- end
116
+ sdn = Ofac.new({:name => 'Oscar Hernandez', :city => 'Clearwater', :address => '123 somewhere ln'})
117
+ assert sdn.db_hit?
123
118
 
124
- should "db_hit? should return false if name is not an exact match in the database" do
119
+ #single initials are ignored
120
+ sdn = Ofac.new({:name => 'Oscar M Hernandez', :city => 'Clearwater', :address => '123 somewhere ln'})
121
+ assert sdn.db_hit?
125
122
 
126
- sdn = Ofac.new({:name => {:first_name => 'Oscar', :last_name => 'de la Hernandez'}, :city => 'Clearwater', :address => '123 somewhere ln'})
127
- assert !sdn.db_hit?
123
+ #city and address are ignored
124
+ sdn = Ofac.new({:name => 'Oscar Hernandez', :city => 'bad city', :address => 'bad address'})
125
+ assert sdn.db_hit?
126
+ end
128
127
 
129
- sdn = Ofac.new({:name => 'Oscar Maria Hernandez', :city => 'Clearwater', :address => '123 somewhere ln'})
130
- assert !sdn.db_hit?
128
+ should "should be case insensitive for the name" do
129
+ sdn = Ofac.new({:name => {:first_name => 'OSCAR', :last_name => 'hernandez'}, :city => 'Clearwater', :address => '123 somewhere ln'})
130
+ assert sdn.db_hit?
131
+ end
131
132
 
132
- #city and address are ignored
133
- sdn = Ofac.new({:name => 'Oscar de la Hernandez', :city => 'bad city', :address => 'bad address'})
134
- assert !sdn.db_hit?
135
- end
133
+ should "return false if name is not an exact match in the database" do
136
134
 
135
+ sdn = Ofac.new({:name => {:first_name => 'Oscar', :last_name => 'de la Hernandez'}, :city => 'Clearwater', :address => '123 somewhere ln'})
136
+ assert !sdn.db_hit?
137
+
138
+ sdn = Ofac.new({:name => 'Oscar Maria Hernandez', :city => 'Clearwater', :address => '123 somewhere ln'})
139
+ assert !sdn.db_hit?
140
+
141
+ #city and address are ignored
142
+ sdn = Ofac.new({:name => 'Oscar de la Hernandez', :city => 'bad city', :address => 'bad address'})
143
+ assert !sdn.db_hit?
144
+ end
145
+ end
137
146
  end
138
147
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ofac
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
5
- prerelease:
4
+ version: 2.0.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Kevin Tyll
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-06-05 00:00:00.000000000 Z
11
+ date: 2014-01-07 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: Attempts to find a hit on the Office of Foreign Assets Control's Specially
15
14
  Designated Nationals list.
@@ -21,6 +20,8 @@ extra_rdoc_files:
21
20
  - README.rdoc
22
21
  files:
23
22
  - .document
23
+ - .ruby-gemset
24
+ - .ruby-version
24
25
  - History.txt
25
26
  - LICENSE
26
27
  - PostInstall.txt
@@ -70,6 +71,7 @@ files:
70
71
  - rdoc/fr_file_index.html
71
72
  - rdoc/fr_method_index.html
72
73
  - rdoc/images/add.png
74
+ - rdoc/images/arrow_up.png
73
75
  - rdoc/images/brick.png
74
76
  - rdoc/images/brick_link.png
75
77
  - rdoc/images/bug.png
@@ -121,33 +123,37 @@ files:
121
123
  - test/test_helper.rb
122
124
  homepage: http://github.com/kevintyll/ofac
123
125
  licenses: []
124
- post_install_message: ! "For more information on ofac, see http://kevintyll.github.com/ofac/\n\n*
125
- To create the necessary db migration, from the command line, run:\n script/generate
126
- ofac_migration\n* Require the gem in your environment.rb file in the Rails::Initializer
127
- block:\n config.gem 'kevintyll-ofac', :lib => 'ofac'\n* To load your table with
128
- the current OFAC data, from the command line, run:\n rake ofac:update_data\n\n
129
- \ * The OFAC data is not updated with any regularity, but you can sign up for
130
- email notifications when the data changes at\n http://www.treas.gov/offices/enforcement/ofac/sdn/index.shtml."
126
+ metadata: {}
127
+ post_install_message: |-
128
+ For more information on ofac, see http://kevintyll.github.com/ofac/
129
+
130
+ * To create the necessary db migration, from the command line, run:
131
+ script/generate ofac_migration
132
+ * Require the gem in your environment.rb file in the Rails::Initializer block:
133
+ config.gem 'kevintyll-ofac', :lib => 'ofac'
134
+ * To load your table with the current OFAC data, from the command line, run:
135
+ rake ofac:update_data
136
+
137
+ * The OFAC data is not updated with any regularity, but you can sign up for email notifications when the data changes at
138
+ http://www.treas.gov/offices/enforcement/ofac/sdn/index.shtml.
131
139
  rdoc_options: []
132
140
  require_paths:
133
141
  - lib
134
142
  required_ruby_version: !ruby/object:Gem::Requirement
135
- none: false
136
143
  requirements:
137
- - - ! '>='
144
+ - - '>='
138
145
  - !ruby/object:Gem::Version
139
146
  version: '0'
140
147
  required_rubygems_version: !ruby/object:Gem::Requirement
141
- none: false
142
148
  requirements:
143
- - - ! '>='
149
+ - - '>='
144
150
  - !ruby/object:Gem::Version
145
151
  version: '0'
146
152
  requirements: []
147
153
  rubyforge_project:
148
- rubygems_version: 1.8.24
154
+ rubygems_version: 2.0.3
149
155
  signing_key:
150
- specification_version: 3
156
+ specification_version: 4
151
157
  summary: Attempts to find a hit on the Office of Foreign Assets Control's Specially
152
158
  Designated Nationals list.
153
159
  test_files: []