cerealize 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +20 -0
- data/README +77 -0
- data/README.rdoc +13 -1
- data/Rakefile +2 -2
- data/cerealize.gemspec +5 -5
- data/lib/cerealize.rb +7 -3
- data/lib/cerealize/attr_hash.rb +32 -0
- data/lib/cerealize/version.rb +1 -1
- data/test/{helper.rb → common.rb} +8 -0
- data/test/{helper_active_record.rb → real.rb} +16 -2
- data/test/test_all_codec.rb +6 -7
- data/test/test_attr_hash.rb +33 -0
- data/test/test_basic.rb +6 -7
- data/test/test_transcode.rb +6 -7
- metadata +12 -69
- data/slide/2010-04-24-cerealize.key/Contents/PkgInfo +0 -1
- data/slide/2010-04-24-cerealize.key/QuickLook/Thumbnail.jpg +0 -0
- data/slide/2010-04-24-cerealize.key/background.png +0 -0
- data/slide/2010-04-24-cerealize.key/cardinal-blue-black_200.png +0 -0
- data/slide/2010-04-24-cerealize.key/cereal-box.png +0 -0
- data/slide/2010-04-24-cerealize.key/color-profile +0 -0
- data/slide/2010-04-24-cerealize.key/index.apxl.gz +0 -0
- data/slide/2010-04-24-cerealize.key/simple.png +0 -0
- data/slide/2010-04-24-cerealize.key/thumbs/st0-11.tiff +0 -0
- data/slide/2010-04-24-cerealize.key/thumbs/st0-16.tiff +0 -0
- data/slide/2010-04-24-cerealize.key/thumbs/st0-19.tiff +0 -0
- data/slide/2010-04-24-cerealize.key/thumbs/st0-2.tiff +0 -0
- data/slide/2010-04-24-cerealize.key/thumbs/st0-22.tiff +0 -0
- data/slide/2010-04-24-cerealize.key/thumbs/st0-27.tiff +0 -0
- data/slide/2010-04-24-cerealize.key/thumbs/st0-29.tiff +0 -0
- data/slide/2010-04-24-cerealize.key/thumbs/st0-30.tiff +0 -0
- data/slide/2010-04-24-cerealize.key/thumbs/st0-32.tiff +0 -0
- data/slide/2010-04-24-cerealize.key/thumbs/st0-34.tiff +0 -0
- data/slide/2010-04-24-cerealize.key/thumbs/st0-38.tiff +0 -0
- data/slide/2010-04-24-cerealize.key/thumbs/st0-40.tiff +0 -0
- data/slide/2010-04-24-cerealize.key/thumbs/st0-46.tiff +0 -0
- data/slide/2010-04-24-cerealize.key/thumbs/st0-50.tiff +0 -0
- data/slide/2010-04-24-cerealize.key/thumbs/st0-51.tiff +0 -0
- data/slide/2010-04-24-cerealize.key/thumbs/st0-52.tiff +0 -0
- data/slide/2010-04-24-cerealize.key/thumbs/st0-54.tiff +0 -0
- data/slide/2010-04-24-cerealize.key/thumbs/st0-7.tiff +0 -0
- data/slide/2010-04-24-cerealize.key/thumbs/st0.tiff +0 -0
- data/slide/2010-04-24-cerealize.pdf +0 -0
- data/slide/cereal-box.ai +4 -1623
- data/slide/cereal-box.jpg +0 -0
- data/slide/cereal-box.png +0 -0
data/CHANGES
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
= cerealize changes history
|
2
2
|
|
3
|
+
== cerealize 0.8.2 -- 2010-08-04
|
4
|
+
* Added attr_hash feature, create virtual properties inside a hash.
|
5
|
+
An example:
|
6
|
+
|
7
|
+
require 'cerealize'
|
8
|
+
|
9
|
+
class User < ActiveRecord::Base
|
10
|
+
include Cerealize
|
11
|
+
cerealize :data
|
12
|
+
attr_hash :data, [:name, :mail]
|
13
|
+
end
|
14
|
+
|
15
|
+
user = User.new
|
16
|
+
user.name = 'ham'
|
17
|
+
|
18
|
+
# which is equivalent to:
|
19
|
+
|
20
|
+
user.data ||= {}
|
21
|
+
user.data[:name] = 'ham'
|
22
|
+
|
3
23
|
== cerealize 0.8.1 -- 2010-07-16
|
4
24
|
* module_eval is a lot faster than define_method with a block,
|
5
25
|
I think it's all about closure.
|
data/README
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
= cerealize 0.8.2
|
2
|
+
by Cardinal Blue ( http://cardinalblue.com )
|
3
|
+
|
4
|
+
== LINKS:
|
5
|
+
|
6
|
+
* {github}[http://github.com/cardinalblue/cerealize]
|
7
|
+
* {rubygems}[http://rubygems.org/gems/cerealize]
|
8
|
+
* {rdoc}[http://rdoc.info/projects/cardinalblue/cerealize]
|
9
|
+
|
10
|
+
== DESCRIPTION:
|
11
|
+
|
12
|
+
Serialize out of the Cerealize Box
|
13
|
+
- a drop-in replacement for ActiveRecord's serialize
|
14
|
+
|
15
|
+
It can auto transcode old encoding (yaml if you're using AR's serialize),
|
16
|
+
to new encoding (marshal, json, you name it) without any migration.
|
17
|
+
|
18
|
+
Current supported encoding:
|
19
|
+
1. YAML
|
20
|
+
2. Marshal
|
21
|
+
3. JSON (planned)
|
22
|
+
|
23
|
+
Current supported ORM:
|
24
|
+
1. ActiveRecord (tested with 2.3.5)
|
25
|
+
2. DataMapper (planned)
|
26
|
+
|
27
|
+
== SYNOPSIS:
|
28
|
+
|
29
|
+
require 'cerealize'
|
30
|
+
class User < ActiveRecord::Base
|
31
|
+
include Cerealize
|
32
|
+
# when force_encoding set to false (this is default), cerealize is
|
33
|
+
# smart enough to transcode old encoding (e.g. yaml) to new encoding
|
34
|
+
# (i.e. marshal)
|
35
|
+
cerealize :data, Hash, :encoding => :marshal, :force_encoding => false
|
36
|
+
|
37
|
+
# and this could create accessors for values store in the hash
|
38
|
+
attr_hash :data, [:name, :mail]
|
39
|
+
|
40
|
+
# which makes below two equivalent:
|
41
|
+
|
42
|
+
# user.name = 'ham'
|
43
|
+
|
44
|
+
# which is equivalent to:
|
45
|
+
|
46
|
+
# user.data ||= {}
|
47
|
+
# user.data[:name] = 'ham'
|
48
|
+
end
|
49
|
+
|
50
|
+
== REQUIREMENTS:
|
51
|
+
|
52
|
+
* tested with MRI 1.8.7 and 1.9.1
|
53
|
+
* one of your desired ORM
|
54
|
+
|
55
|
+
== INSTALL:
|
56
|
+
|
57
|
+
> gem install cerealize
|
58
|
+
# or if you want rails plugin and bleeding edge
|
59
|
+
> script/plugin install git://github.com/cardinalblue/cerealize.git
|
60
|
+
|
61
|
+
== LICENSE:
|
62
|
+
|
63
|
+
Apache License 2.0
|
64
|
+
|
65
|
+
Copyright (c) 2010, Cardinal Blue
|
66
|
+
|
67
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
68
|
+
you may not use this file except in compliance with the License.
|
69
|
+
You may obtain a copy of the License at
|
70
|
+
|
71
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
72
|
+
|
73
|
+
Unless required by applicable law or agreed to in writing, software
|
74
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
75
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
76
|
+
See the License for the specific language governing permissions and
|
77
|
+
limitations under the License.
|
data/README.rdoc
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
= cerealize 0.8.
|
1
|
+
= cerealize 0.8.2
|
2
2
|
by Cardinal Blue ( http://cardinalblue.com )
|
3
3
|
|
4
4
|
== LINKS:
|
@@ -33,6 +33,18 @@ by Cardinal Blue ( http://cardinalblue.com )
|
|
33
33
|
# smart enough to transcode old encoding (e.g. yaml) to new encoding
|
34
34
|
# (i.e. marshal)
|
35
35
|
cerealize :data, Hash, :encoding => :marshal, :force_encoding => false
|
36
|
+
|
37
|
+
# and this could create accessors for values store in the hash
|
38
|
+
attr_hash :data, [:name, :mail]
|
39
|
+
|
40
|
+
# which makes below two equivalent:
|
41
|
+
|
42
|
+
# user.name = 'ham'
|
43
|
+
|
44
|
+
# which is equivalent to:
|
45
|
+
|
46
|
+
# user.data ||= {}
|
47
|
+
# user.data[:name] = 'ham'
|
36
48
|
end
|
37
49
|
|
38
50
|
== REQUIREMENTS:
|
data/Rakefile
CHANGED
@@ -25,10 +25,10 @@ Bones{
|
|
25
25
|
email 'dev (XD) cardinalblue.com'
|
26
26
|
|
27
27
|
history_file 'CHANGES'
|
28
|
-
readme_file 'README
|
28
|
+
readme_file 'README'
|
29
29
|
ignore_file '.gitignore'
|
30
30
|
rdoc.include ['\w+']
|
31
|
-
rdoc.exclude ['test', 'doc', 'Rakefile']
|
31
|
+
rdoc.exclude ['test', 'doc', 'Rakefile', 'slide']
|
32
32
|
}
|
33
33
|
|
34
34
|
CLEAN.include Dir['**/*.rbc']
|
data/cerealize.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
|
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Cardinal Blue", "Lin Jen-Shin (aka godfat 真常)", "Jaime Cham"]
|
9
|
-
s.date = %q{2010-
|
9
|
+
s.date = %q{2010-08-04}
|
10
10
|
s.description = %q{ Serialize out of the Cerealize Box
|
11
11
|
- a drop-in replacement for ActiveRecord's serialize
|
12
12
|
|
@@ -22,15 +22,15 @@ Gem::Specification.new do |s|
|
|
22
22
|
1. ActiveRecord (tested with 2.3.5)
|
23
23
|
2. DataMapper (planned)}
|
24
24
|
s.email = %q{dev (XD) cardinalblue.com}
|
25
|
-
s.extra_rdoc_files = ["CHANGES", "LICENSE", "
|
26
|
-
s.files = ["CHANGES", "LICENSE", "README.rdoc", "Rakefile", "TODO", "bench/simple.png", "bench/simple.rb", "cerealize.gemspec", "init.rb", "lib/cerealize.rb", "lib/cerealize/
|
25
|
+
s.extra_rdoc_files = ["CHANGES", "LICENSE", "README", "TODO", "bench/simple.png", "cerealize.gemspec"]
|
26
|
+
s.files = ["CHANGES", "LICENSE", "README", "README.rdoc", "Rakefile", "TODO", "bench/simple.png", "bench/simple.rb", "cerealize.gemspec", "init.rb", "lib/cerealize.rb", "lib/cerealize/attr_hash.rb", "lib/cerealize/codec/marshal.rb", "lib/cerealize/codec/yaml.rb", "lib/cerealize/version.rb", "test/common.rb", "test/real.rb", "test/stub.rb", "test/test_all_codec.rb", "test/test_attr_hash.rb", "test/test_basic.rb", "test/test_transcode.rb"]
|
27
27
|
s.homepage = %q{http://github.com/cardinalblue/cerealize}
|
28
|
-
s.rdoc_options = ["--main", "README
|
28
|
+
s.rdoc_options = ["--main", "README"]
|
29
29
|
s.require_paths = ["lib"]
|
30
30
|
s.rubyforge_project = %q{cerealize}
|
31
31
|
s.rubygems_version = %q{1.3.7}
|
32
32
|
s.summary = %q{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}
|
33
|
-
s.test_files = ["test/test_all_codec.rb", "test/test_basic.rb", "test/test_transcode.rb"]
|
33
|
+
s.test_files = ["test/test_all_codec.rb", "test/test_attr_hash.rb", "test/test_basic.rb", "test/test_transcode.rb"]
|
34
34
|
|
35
35
|
if s.respond_to? :specification_version then
|
36
36
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
data/lib/cerealize.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
+
require 'cerealize/attr_hash'
|
4
|
+
|
3
5
|
require 'active_record'
|
4
6
|
autoload :YAML, 'yaml'
|
5
7
|
|
6
8
|
module Cerealize
|
9
|
+
InternalName = 'CerealizeMethods'
|
10
|
+
|
7
11
|
module Codec
|
8
12
|
autoload 'Yaml', 'cerealize/codec/yaml'
|
9
13
|
autoload 'Marshal', 'cerealize/codec/marshal'
|
@@ -93,10 +97,10 @@ module Cerealize
|
|
93
97
|
attr_accessor field_orig
|
94
98
|
private field_orig, "#{field_orig}="
|
95
99
|
|
96
|
-
mod = if const_defined?(
|
97
|
-
const_get(
|
100
|
+
mod = if const_defined?(Cerealize::InternalName)
|
101
|
+
const_get(Cerealize::InternalName)
|
98
102
|
else
|
99
|
-
const_set(
|
103
|
+
const_set(Cerealize::InternalName, Module.new)
|
100
104
|
end
|
101
105
|
|
102
106
|
mod.module_eval <<-RUBY, __FILE__, __LINE__ + 1
|
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
module Cerealize
|
3
|
+
module ClassMethods
|
4
|
+
def attr_hash property, attrs
|
5
|
+
ruby = attrs.inject([]){ |codes, attr|
|
6
|
+
codes << <<-RUBY
|
7
|
+
def #{attr}
|
8
|
+
if #{property}
|
9
|
+
#{property}[:#{attr}]
|
10
|
+
else
|
11
|
+
nil
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def #{attr}= value
|
16
|
+
self.#{property} ||= {}
|
17
|
+
#{property}[:#{attr}] = value
|
18
|
+
end
|
19
|
+
RUBY
|
20
|
+
}.join("\n")
|
21
|
+
|
22
|
+
mod = if const_defined?(Cerealize::InternalName)
|
23
|
+
const_get(Cerealize::InternalName)
|
24
|
+
else
|
25
|
+
const_set(Cerealize::InternalName, Module.new)
|
26
|
+
end
|
27
|
+
|
28
|
+
mod.module_eval ruby
|
29
|
+
include mod unless self < mod
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/cerealize/version.rb
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
+
require 'rubygems' if RUBY_VERSION < '1.9.1'
|
4
|
+
require 'cerealize'
|
5
|
+
|
6
|
+
require_relative 'stub'
|
7
|
+
require_relative 'real'
|
8
|
+
|
9
|
+
require 'test/unit'
|
10
|
+
|
3
11
|
def set_encoding(encoding)
|
4
12
|
Boat.cerealize_option[:captain] = {:class => nil,
|
5
13
|
:encoding => encoding}
|
@@ -5,6 +5,8 @@ ActiveRecord::Base.establish_connection(
|
|
5
5
|
:database => ':memory:'
|
6
6
|
)
|
7
7
|
|
8
|
+
# ===================================================================
|
9
|
+
|
8
10
|
class Boat < ActiveRecord::Base
|
9
11
|
include Cerealize
|
10
12
|
cerealize :captain
|
@@ -18,7 +20,7 @@ ActiveRecord::Base.connection.create_table :boats, :force => true do |t|
|
|
18
20
|
t.string :cargo
|
19
21
|
end
|
20
22
|
|
21
|
-
|
23
|
+
# ===================================================================
|
22
24
|
|
23
25
|
class Cat < ActiveRecord::Base
|
24
26
|
include Cerealize
|
@@ -33,7 +35,7 @@ ActiveRecord::Base.connection.create_table :cats, :force => true do |t|
|
|
33
35
|
t.text :food
|
34
36
|
end
|
35
37
|
|
36
|
-
|
38
|
+
# ===================================================================
|
37
39
|
|
38
40
|
class Dog < ActiveRecord::Base
|
39
41
|
include Cerealize
|
@@ -47,3 +49,15 @@ end
|
|
47
49
|
ActiveRecord::Base.connection.create_table :dogs, :force => true do |t|
|
48
50
|
t.text :mood
|
49
51
|
end
|
52
|
+
|
53
|
+
# ===================================================================
|
54
|
+
|
55
|
+
class Apple < ActiveRecord::Base
|
56
|
+
include Cerealize
|
57
|
+
cerealize :data
|
58
|
+
attr_hash :data, [:name, :size]
|
59
|
+
end
|
60
|
+
|
61
|
+
ActiveRecord::Base.connection.create_table :apples, :force => true do |t|
|
62
|
+
t.text :data
|
63
|
+
end
|
data/test/test_all_codec.rb
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
require 'test/helper_active_record'
|
3
|
+
unless respond_to?(:require_relative, true)
|
4
|
+
def require_relative path
|
5
|
+
require "#{File.dirname(__FILE__)}/#{path}"
|
6
|
+
end
|
7
|
+
end
|
9
8
|
|
10
|
-
|
9
|
+
require_relative 'common'
|
11
10
|
|
12
11
|
class AllCodecTest < Test::Unit::TestCase
|
13
12
|
def setup
|
@@ -0,0 +1,33 @@
|
|
1
|
+
|
2
|
+
unless respond_to?(:require_relative, true)
|
3
|
+
def require_relative path
|
4
|
+
require "#{File.dirname(__FILE__)}/#{path}"
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
require_relative 'common'
|
9
|
+
|
10
|
+
class AttrHashTest < Test::Unit::TestCase
|
11
|
+
def test_simple
|
12
|
+
hh = {:name => 'wane', :size => 123456}
|
13
|
+
ah = Apple.new(hh)
|
14
|
+
|
15
|
+
simple_case(hh, ah)
|
16
|
+
|
17
|
+
ah.name , ah.size = ah.size , ah.name
|
18
|
+
hh[:name], hh[:size] = hh[:size], hh[:name]
|
19
|
+
|
20
|
+
simple_case(hh, ah)
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_nil
|
24
|
+
assert_nil Apple.new.name
|
25
|
+
assert_nil Apple.new.data
|
26
|
+
end
|
27
|
+
|
28
|
+
def simple_case hh, ah
|
29
|
+
assert_equal hh[:name], ah.name
|
30
|
+
assert_equal hh[:size], ah.size
|
31
|
+
assert_equal hh , ah.data
|
32
|
+
end
|
33
|
+
end
|
data/test/test_basic.rb
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
require 'test/helper_active_record'
|
3
|
+
unless respond_to?(:require_relative, true)
|
4
|
+
def require_relative path
|
5
|
+
require "#{File.dirname(__FILE__)}/#{path}"
|
6
|
+
end
|
7
|
+
end
|
9
8
|
|
10
|
-
|
9
|
+
require_relative 'common'
|
11
10
|
|
12
11
|
class BasicTest < Test::Unit::TestCase
|
13
12
|
def setup
|
data/test/test_transcode.rb
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
require 'test/helper_active_record'
|
3
|
+
unless respond_to?(:require_relative, true)
|
4
|
+
def require_relative path
|
5
|
+
require "#{File.dirname(__FILE__)}/#{path}"
|
6
|
+
end
|
7
|
+
end
|
9
8
|
|
10
|
-
|
9
|
+
require_relative 'common'
|
11
10
|
|
12
11
|
class TranscodeTest < Test::Unit::TestCase
|
13
12
|
def setup
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cerealize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 59
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 0.8.
|
9
|
+
- 2
|
10
|
+
version: 0.8.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Cardinal Blue
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-
|
20
|
+
date: 2010-08-04 00:00:00 +08:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
@@ -77,43 +77,14 @@ extensions: []
|
|
77
77
|
extra_rdoc_files:
|
78
78
|
- CHANGES
|
79
79
|
- LICENSE
|
80
|
+
- README
|
80
81
|
- TODO
|
81
82
|
- bench/simple.png
|
82
83
|
- cerealize.gemspec
|
83
|
-
- slide/2010-04-24-cerealize.key/Contents/PkgInfo
|
84
|
-
- slide/2010-04-24-cerealize.key/QuickLook/Thumbnail.jpg
|
85
|
-
- slide/2010-04-24-cerealize.key/background.png
|
86
|
-
- slide/2010-04-24-cerealize.key/cardinal-blue-black_200.png
|
87
|
-
- slide/2010-04-24-cerealize.key/cereal-box.png
|
88
|
-
- slide/2010-04-24-cerealize.key/color-profile
|
89
|
-
- slide/2010-04-24-cerealize.key/index.apxl.gz
|
90
|
-
- slide/2010-04-24-cerealize.key/simple.png
|
91
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-11.tiff
|
92
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-16.tiff
|
93
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-19.tiff
|
94
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-2.tiff
|
95
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-22.tiff
|
96
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-27.tiff
|
97
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-29.tiff
|
98
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-30.tiff
|
99
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-32.tiff
|
100
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-34.tiff
|
101
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-38.tiff
|
102
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-40.tiff
|
103
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-46.tiff
|
104
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-50.tiff
|
105
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-51.tiff
|
106
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-52.tiff
|
107
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-54.tiff
|
108
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-7.tiff
|
109
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0.tiff
|
110
|
-
- slide/2010-04-24-cerealize.pdf
|
111
|
-
- slide/cereal-box.ai
|
112
|
-
- slide/cereal-box.jpg
|
113
|
-
- slide/cereal-box.png
|
114
84
|
files:
|
115
85
|
- CHANGES
|
116
86
|
- LICENSE
|
87
|
+
- README
|
117
88
|
- README.rdoc
|
118
89
|
- Rakefile
|
119
90
|
- TODO
|
@@ -122,44 +93,15 @@ files:
|
|
122
93
|
- cerealize.gemspec
|
123
94
|
- init.rb
|
124
95
|
- lib/cerealize.rb
|
96
|
+
- lib/cerealize/attr_hash.rb
|
125
97
|
- lib/cerealize/codec/marshal.rb
|
126
98
|
- lib/cerealize/codec/yaml.rb
|
127
99
|
- lib/cerealize/version.rb
|
128
|
-
-
|
129
|
-
-
|
130
|
-
- slide/2010-04-24-cerealize.key/background.png
|
131
|
-
- slide/2010-04-24-cerealize.key/cardinal-blue-black_200.png
|
132
|
-
- slide/2010-04-24-cerealize.key/cereal-box.png
|
133
|
-
- slide/2010-04-24-cerealize.key/color-profile
|
134
|
-
- slide/2010-04-24-cerealize.key/index.apxl.gz
|
135
|
-
- slide/2010-04-24-cerealize.key/simple.png
|
136
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-11.tiff
|
137
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-16.tiff
|
138
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-19.tiff
|
139
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-2.tiff
|
140
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-22.tiff
|
141
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-27.tiff
|
142
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-29.tiff
|
143
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-30.tiff
|
144
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-32.tiff
|
145
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-34.tiff
|
146
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-38.tiff
|
147
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-40.tiff
|
148
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-46.tiff
|
149
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-50.tiff
|
150
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-51.tiff
|
151
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-52.tiff
|
152
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-54.tiff
|
153
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0-7.tiff
|
154
|
-
- slide/2010-04-24-cerealize.key/thumbs/st0.tiff
|
155
|
-
- slide/2010-04-24-cerealize.pdf
|
156
|
-
- slide/cereal-box.ai
|
157
|
-
- slide/cereal-box.jpg
|
158
|
-
- slide/cereal-box.png
|
159
|
-
- test/helper.rb
|
160
|
-
- test/helper_active_record.rb
|
100
|
+
- test/common.rb
|
101
|
+
- test/real.rb
|
161
102
|
- test/stub.rb
|
162
103
|
- test/test_all_codec.rb
|
104
|
+
- test/test_attr_hash.rb
|
163
105
|
- test/test_basic.rb
|
164
106
|
- test/test_transcode.rb
|
165
107
|
has_rdoc: true
|
@@ -169,7 +111,7 @@ licenses: []
|
|
169
111
|
post_install_message:
|
170
112
|
rdoc_options:
|
171
113
|
- --main
|
172
|
-
- README
|
114
|
+
- README
|
173
115
|
require_paths:
|
174
116
|
- lib
|
175
117
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -199,5 +141,6 @@ specification_version: 3
|
|
199
141
|
summary: 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
|
200
142
|
test_files:
|
201
143
|
- test/test_all_codec.rb
|
144
|
+
- test/test_attr_hash.rb
|
202
145
|
- test/test_basic.rb
|
203
146
|
- test/test_transcode.rb
|