kevintyll-ofac 1.1.3 → 1.1.4
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 +6 -1
- data/VERSION.yml +1 -1
- data/lib/ofac/models/ofac.rb +1 -1
- data/test/ofac_test.rb +1 -1
- metadata +2 -2
data/History.txt
CHANGED
@@ -23,4 +23,9 @@
|
|
23
23
|
== 1.1.3 2009-05-15
|
24
24
|
|
25
25
|
* 1 bug fix:
|
26
|
-
* fixed a bug that threw an error
|
26
|
+
* fixed a bug that threw an error if a space was passed in for the name.
|
27
|
+
|
28
|
+
== 1.1.4 2009-06-02
|
29
|
+
|
30
|
+
* 1 minor enhancement:
|
31
|
+
* Improved performance by ignoring initial in names when searching the database for possible hits.
|
data/VERSION.yml
CHANGED
data/lib/ofac/models/ofac.rb
CHANGED
@@ -102,7 +102,7 @@ class Ofac
|
|
102
102
|
#matches from the database that we can run through our ruby matching algorithm
|
103
103
|
partial_name = @identity[:name].gsub(/\W/,'|')
|
104
104
|
name_array = partial_name.split('|')
|
105
|
-
name_array.
|
105
|
+
name_array.delete_if{|n| n.size < 2}
|
106
106
|
sql_name_partial = name_array.collect {|partial_name| "name like '%#{partial_name}%'"}.join(' or ')
|
107
107
|
sql_alt_name_partial = name_array.collect {|partial_name| "alternate_identity_name like '%#{partial_name}%'"}.join(' or ')
|
108
108
|
possible_sdns = OfacSdn.connection.select_all("select name, alternate_identity_name, address, city
|
data/test/ofac_test.rb
CHANGED
@@ -15,7 +15,7 @@ class OfacTest < Test::Unit::TestCase
|
|
15
15
|
end
|
16
16
|
|
17
17
|
should "give a score of 0 if there is no name match" do
|
18
|
-
assert_equal 0, Ofac.new({:name => 'Kevin'}).score
|
18
|
+
assert_equal 0, Ofac.new({:name => 'Kevin T P'}).score
|
19
19
|
end
|
20
20
|
|
21
21
|
should "give a score of 0 if there is no name match but there is an address and city match" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kevintyll-ofac
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
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-
|
12
|
+
date: 2009-06-02 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|