README.rdoc in csv_pirate-3.4.3 vs README.rdoc in csv_pirate-3.4.4

- old
+ new

@@ -52,49 +52,55 @@ Release Announcement: http://galtzo.blogspot.com/2009/03/csv-pirate.html -== Installation +== Install as a RubyGem -Gem from Gemcutter (after setting up your machine to use the gemcutter repo, see http://gemcutter.org): +Gemcutter is the hot new gem host, and you can use it like this (see http://gemcutter.org): - sudo gem install csv_pirate + [sudo] gem install gemcutter + [sudo] gem tumble # makes gemcutter gem source first in line + [sudo] gem install csv_pirate Gem Using Git building from source: mkdir -p ~/src cd ~/src git clone git://github.com/pboling/csv_pirate.git cd csv_pirate gem build csv_pirate.gemspec - sudo gem install csv_pirate-3.4.1.gem # (Or whatever version gets built) + sudo gem install csv_pirate-3.4.4.gem # (Or whatever version gets built) -Then cd to your rails app to optionally freeze the gem into your app: +Then in your environment.rb (if you are just going to use it from the console, you can require it as needed there, and skip the config.gem): - rake gems:freeze GEM=csv_pirate + config.gem 'csv_pirate' -Installing Gem from Github's Gem Server: +Then cd to your rails app to optionally freeze the gem into your app (if you roll this way): - sudo gem install pboling-csv_pirate -s http://gems.github.com + rake gems:freeze GEM=csv_pirate +== Install as a Plugin + Plugin using Git: ruby script/plugin install git://github.com/pboling/csv_pirate.git -If installed as a gem load it with config.gem 'csv_pirate' # or 'pboling-csv_pirate' if from github +== Install as a Git Submodule (plugin) + git submodule add git://github.com/pboling/sanitize_email.git vendor/plugins/sanitize_email + == Upgrading In older versions :chart was a string which indicated where you wanted to hide the loot (write the csv file) Now it must be an array of directory names. So if you want your loot in "log/csv/pirates/model_name", then chart is: ['log','csv','pirates','model_name'] CsvPirate ensures that whatever you choose as your chart exists in the filesystem, and creates the directories if need be. == Usage with ActiveRecord -What's the simplest thing that'll work? +What's the simplest thing that will work? class MyClass < ActiveRecord::Base has_csv_pirate_ship # defaults to csv of all columns of all records end @@ -390,9 +396,19 @@ This allows you to modify the csv_pirate object before creating the csv like this: csv_pirate.booty -= [:id, :name] csv_pirate.hoist_mainstay() + +== BUGS (Not mine, Micrsoft's) + +Microsoft Office (Excel) "SYLK Invalid Format" Error will occur if the string "ID" (without quotes) +is at the beginning of the CSV file. This is strangely inconvenient for rails CSVs since every table +in rails starts with an id column. So buyer beware... make your first column lower case 'id' +if you need to export the id field. + +Micrsoft... I loathe you. +http://www.bradino.com/misc/sylk-file-format-is-not-valid/ == Thanks Thanks go to 9thBit LLC (http://www.9thBit.net)