Correct strings based on remote errata files
Ruby
Pull request Compare This branch is 3 commits ahead, 21 commits behind seamusabshere:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
.document
.gitignore
LICENSE
README.rdoc
Rakefile
VERSION
errata.gemspec

README.rdoc

errata

Correct strings based on remote errata files.

Real-life usage

Used by data_miner (github.com/seamusabshere/data_miner)

Example

Taken from #{GEMDIR}/test/errata_test.rb:

errata = Errata.new(:url => 'http://static.brighterplanet.com/science/data/transport/automobiles/make_fleet_years/errata.csv')
rover = { 'manufacturer_name' => 'foobar Austin Rover foobar' }
mercedes = { 'manufacturer_name' => 'MERCEDES' }
errata.correct!(mercedes)
errata.correct!(rover)

Now you will have

rover['manufacturer_name']    #=> 'Rover'         (used to be 'foobar Austin Rover foobar')
mercedes['manufacturer_name'] #=> 'Mercedes-Benz' (used to be 'MERCEDES')

Authors

  • Seamus Abshere <seamus@abshere.net>

  • Andy Rossmeissl <andy@rossmeissl.net>

Copyright

Copyright © 2009 Brighter Planet. See LICENSE for details.