fcsv_formatter
What is it?
Many folks who use Ruport may be migrating from or wrapping FasterCSV code. The fcsv_formatter plugin allows you to use Ruport's formatting system with FasterCSV::Table and FasterCSV::Row classes
Installation
gem install fcsv_formatter --source http://gems.rubyreports.org
You need at least Ruport 1.0.1 installed to use this plugin.
If you want to de-pluginize this, the sources are available via
svn co http://stonecode.svnrepository.com/svn/ruport/plugins/fcsv_formatter
Example
>> require "ruport"
=> true
>> require "ruport/extensions"
=> true
>> puts FasterCSV.table("addressbook.csv").as(:text)
+--------------------------------------------------------------------------+
| id | name | phone | street | town | state |
+--------------------------------------------------------------------------+
| 1 | Inky | 555-000-1234 | Druary Lane | Union City | CT |
| 2 | Blinky | 525-0529-123 | Apple Street | Robot Town | NJ |
| 3 | Clyde | 247-219-4820 | Sandbox Hill | Alvin's Landing | PA |
| 4 | Pacman | 283-102-8293 | Rat Avenue | Southford | VT |
| 5 | Mrs. Pacman | 214-892-1892 | Conch Walk | New York | NY |
+--------------------------------------------------------------------------+
Problems?
Please let Gregory know on the mailing list if this does not work as expected.
