README.rdoc in csv_pirate-5.0.2 vs README.rdoc in csv_pirate-5.0.4
- old
+ new
@@ -1,11 +1,11 @@
== CsvPirate
Easily create CSVs of any data that can be derived from your models.
CsvPirate is the easy way to create a CSV of essentially anything in Ruby, in full pirate regalia.
-It works better if you are wearing a tricorne! Now compatible with Ruby 1.8.7 & 1.9.2
+It works better if you are wearing a tricorne! Now compatible with Ruby 1.8.7 & 1.9.2, and Rails 2 & 3!
Everything in the source that depended on Rails extensions of Ruby classes has been refactored to work in pure Ruby!
My goal is to have it do EVERYTHING it possibly can for me, since almost every project I do needs CSV exports.
@@ -52,44 +52,43 @@
Release Announcement:
http://galtzo.blogspot.com/2009/03/csv-pirate.html
-== Install as a RubyGem
+== Install as a RubyGem from source
[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-5.0.1.gem # (Or whatever version gets built)
+ sudo gem install csv_pirate-5.0.4.gem # (Or whatever version gets built)
-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):
-
- config.gem 'csv_pirate'
-
-Then cd to your rails app to optionally freeze the gem into your app (if you roll this way):
-
- rake gems:freeze GEM=csv_pirate
-
== Install as a Plugin
Plugin using Git:
ruby script/plugin install git://github.com/pboling/csv_pirate.git
== Install as a Git Submodule (plugin)
- git submodule add git://github.com/pboling/sanitize_email.git vendor/plugins/sanitize_email
+ git submodule add git://github.com/pboling/csv_pirate.git vendor/plugins/csv_pirate
== Upgrading
- In older versions :chart was a string which indicated where you wanted to hide the loot (write the csv file)
+ From version prior to 5.0
+
+ NinthBit::PirateShip::ActMethods has been deprecated in favor of CsvPirate::PirateShip::ActMethods.
+ Old API still works for now.
+
+ From version prior to 4.0
+
+ :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
@@ -118,11 +117,11 @@
[ See Spec Tests for more Examples! ]
Since the defaults assume an active record class you need to override some of them:
class Star
- extend NinthBit::PirateShip::ActMethods
+ extend CsvPirate::PirateShip::ActMethods
has_csv_pirate_ship :booty => [:name, :distance, :spectral_type, {:name => :hash}, {:name => :next}, {:name => :upcase}, :star_vowels],
:spyglasses => [:get_stars]
attr_accessor :name, :distance, :spectral_type
@@ -459,6 +458,6 @@
* Sagebit LLC (http://www.sagebit.com) - Sagebit has been very supportive of my open source efforts, thanks Ben!
* TimePerks LLC (http://www.timeperks.com) - Many useful enhancements were requested and paid for by TimePerks
----------------------------------------------------------------------------------
Author: Peter Boling, peter.boling at gmail dot com
- Copyright (c) 2009-2010 Peter H. Boling of 9thBit LLC, released under the MIT license. See LICENSE for details.
+ Copyright (c) 2009-2011 Peter H. Boling of 9thBit LLC, released under the MIT license. See LICENSE for details.