Serialize out of the Cerealize Box - a drop-in replacement for ActiveRecord's serialize
Fetching latest commit…
Cannot retrieve the latest commit at this time
= cerealize 0.8.0 by Cardinal Blue ( http://cardinalblue.com ) == LINKS: * github[http://github.com/cardinalblue/cerealize] * rubygems[http://rubygems.org/gems/cerealize] == DESCRIPTION: Serialize out of the Cerealize Box - a drop-in replacement for ActiveRecord's serialize It can auto transcode old encoding (yaml if you're using AR's serialize), to new encoding (marshal, json, you name it) without any migration. Current supported encoding: 1. YAML 2. Marshal 3. JSON (planned) Current supported ORM: 1. ActiveRecord (tested with 2.3.5) 2. DataMapper (planned) == SYNOPSIS: require 'cerealize' class User < ActiveRecord::Base # when force_encoding set to false (this is default), cerealize is # smart enough to transcode old encoding (e.g. yaml) to new encoding # (i.e. marshal) cerealize :data, Hash, :encoding => :marshal, :force_encoding => false end == REQUIREMENTS: * tested with MRI 1.8.7 and 1.9.1 * one of your desired ORM == INSTALL: > gem install cerealize or > script/plugin install git://github.com/cardinalblue/cerealize.git == LICENSE: Apache License 2.0 Copyright (c) 2010, Cardinal Blue Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.