README.rdoc in ofac-2.0.4 vs README.rdoc in ofac-3.0.0
- old
+ new
@@ -60,11 +60,11 @@
of the weight if there is no match or sounds like match. So if you get a match on name, you've already got a score of 60. So
if you don't pass in an address or city, or if you do, but there is no city or address info in the database, then your final score
will be 60. But if you do pass in a city, say Tampa, and the city in the Database is New York, then we will deduct 10% of the
weight (30 * .1) = 3 from the score since 30 is the weight for <tt>:city</tt>. So the final score will be 57.
-If were searching for New York, and the database had New Deli, then there would be a match on New, but not on Deli.
+If we're searching for New York, and the database had New Deli, then there would be a match on New, but not on Deli.
Since there were 2 elements in the searched city, each hit is worth 15. So the match on New would add 15, but the non-match
on York would subtract (15 * .1) = 1.5 from the score. So the score would be (60 + 15 - 1.5) = 74, due to rounding.
Only <tt>:city</tt> and <tt>:address</tt> subtract from the score, No match on name simply returns 0.
@@ -75,11 +75,11 @@
We consider a score of 60 to be reasonable as a hit.
== SYNOPSIS:
Accepts a hash with the identity's demographic information
- Ofac.new({:name => 'Oscar Hernandez', :city => 'Clearwater', :address => '123 somewhere ln'})
+ OfacIndividual.new({:name => 'Oscar Hernandez', :city => 'Clearwater', :address => '123 somewhere ln'})
<tt>:name</tt> is required to get a score. If <tt>:name</tt> is missing, an error will not be thrown, but a score of 0 will be returned.
The more information provided, the higher the score could be. A score of 100 would mean all fields
were passed in, and all fields were 100% matches. If only the name is passed in without an address,
@@ -90,48 +90,34 @@
* <tt>:name</tt> (weighting = 60%) (required) This can be a person, business, or marine vessel
* <tt>:address</tt> (weighting = 10%)
* <tt>:city</tt> (weighting = 30%)
* Instantiate the object with the identity's name, street address, and city.
- ofac = Ofac.new(:name => 'Kevin Tyll', :city => 'Clearwater', :address => '123 Somewhere Ln.')
+ ofac = OfacIndividual.new(:name => 'Kevin Tyll', :city => 'Clearwater', :address => '123 Somewhere Ln.')
* Then get the score
ofac.score => return the score 1 - 100
* You can also get the list of all the partial matches with the score of each record.
ofac.possible_hits => returns an array of hashes.
== REQUIREMENTS:
-* Rails 2.0.0 or greater
+* Rails 3.2.0 or greater
== INSTALL:
-==== Rails 2.0 - use version 1.3.2 or earlier
-
-* To install the gem:
- sudo gem install kevintyll-ofac
-* To create the necessary db migration, from the command line, run:
- script/generate ofac_migration
-* Require the gem in your environment.rb file in the Rails::Initializer block:
- config.gem 'kevintyll-ofac', :lib => 'ofac'
-* To load your table with the current OFAC data, from the command line, run:
- rake ofac:update_data
-
- * The OFAC data is not updated with any regularity, but you can sign up for email notifications when the data changes at
- http://www.treas.gov/offices/enforcement/ofac/sdn/index.shtml.
-
==== Rails 3.0 & 4.0
* To create the necessary db migration, from the command line, run:
- rails generate ofac_migration:build
+ bin/rake ofac_engine:install:migrations
* To add the gem to your Rails project:
===== Add the gem to your Gemfile:
- gem "ofac", "~> 2.0.0"
+ gem "ofac", "~> 3.0.0"
===== Run the Bundler install command
bundle install
* To load your table with the current OFAC data, from the command line, run:
- rake ofac:update_data
+ bin/rake ofac:update_data
* The OFAC data is not updated with any regularity, but you can sign up for email notifications when the data changes at
http://www.treas.gov/offices/enforcement/ofac/sdn/index.shtml.
== Copyright