Release Name: 0.5.5
Notes:
= Storable - v0.5
Marshal Ruby classes into and out of multiple formats (yaml, json, csv, tsv)
== Example
require 'storable'
class Machine < Storable
field :environment # Define field names for Machine. The
field :role # default type is String, but you can
field :position => Integer # specify a type using a hash syntax.
end
mac1 = Machine.new # Instances of Machine have accessors
mac1.environment = "stage" # just like regular attributes.
mac1.role = "app"
mac1.position = 1
puts "# YAML", mac1.to_yaml # Note: the field order is maintained
puts "# CSV", mac1.to_csv # => stage,app,1
puts "# JSON", mac1.to_json # Note: field order not maintained.
mac2 = Machine.from_yaml(mac1.to_yaml)
puts mac2.environment # => "stage"
puts mac2.position.class # => Fixnum
== Installation
Via Rubygems, one of:
$ sudo gem install storable
$ sudo gem install delano-storable --source http://gems.github.com/
or via download:
* storable-latest.tar.gz[http://github.com/delano/storable/tarball/latest]
* storable-latest.zip[http://github.com/delano/storable/zipball/latest]
== Prerequisites
* Ruby 1.8, Ruby 1.9, or JRuby 1.2
== Credits
* Delano Mandelbaum (delano@solutious.com)
* OrderedHash implementation by Jan Molic
== License
See: LICENSE.txt
Changes:
STORABLE, CHANGES
#### 0.5.5 (2009-07-17) #############################
* FIXED: require 'time' for Time.parse.
#### 0.5.4 (2009-05-25) #############################
* CHANGE: Removed RedCloth dependency from gemspec.
#### 0.5.3 (2009-05-12) #############################
* FIXED: Corrected error handling when json not available (ignore and continue)
#### 0.5.2 (2009-05-12) #############################
* CHANGE: Put OrderedHash into Storable namespace and imported merge fix from Caesars
* FIXED: Circular dependency with Sysinfo
#### 0.5.1 (2009-05-07) #############################
* FIXED: Bug in from_hash which was incorrectly parsing some data types (incl. Integer)
* ADDED: bin/example
* ADDED: OrderedHash for Ruby 1.8.x (still unordered in JRuby. Need to investigate.)
#### 0.5 (2009-05-07) ###############################
* First public release. See commit history for solutious-stella, solutious-rudy,
and delano-delanotes for complete history of SysInfo (was SystemInfo).
|