toystore 0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.autotest +11 -0
- data/.bundle/config +2 -0
- data/.gitignore +6 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +49 -0
- data/LICENSE +9 -0
- data/LOGGING.rdoc +16 -0
- data/README.rdoc +13 -0
- data/Rakefile +7 -0
- data/examples/memcached.rb +20 -0
- data/examples/memory.rb +20 -0
- data/examples/models.rb +51 -0
- data/examples/redis.rb +20 -0
- data/lib/toy.rb +81 -0
- data/lib/toy/attribute.rb +73 -0
- data/lib/toy/attributes.rb +137 -0
- data/lib/toy/caching.rb +20 -0
- data/lib/toy/callbacks.rb +48 -0
- data/lib/toy/collection.rb +55 -0
- data/lib/toy/connection.rb +28 -0
- data/lib/toy/dirty.rb +47 -0
- data/lib/toy/dolly.rb +30 -0
- data/lib/toy/embedded_list.rb +45 -0
- data/lib/toy/embedded_lists.rb +68 -0
- data/lib/toy/equality.rb +19 -0
- data/lib/toy/exceptions.rb +29 -0
- data/lib/toy/extensions/array.rb +22 -0
- data/lib/toy/extensions/boolean.rb +43 -0
- data/lib/toy/extensions/date.rb +24 -0
- data/lib/toy/extensions/float.rb +13 -0
- data/lib/toy/extensions/hash.rb +17 -0
- data/lib/toy/extensions/integer.rb +22 -0
- data/lib/toy/extensions/nil_class.rb +17 -0
- data/lib/toy/extensions/object.rb +26 -0
- data/lib/toy/extensions/set.rb +23 -0
- data/lib/toy/extensions/string.rb +17 -0
- data/lib/toy/extensions/time.rb +29 -0
- data/lib/toy/identity.rb +26 -0
- data/lib/toy/identity/abstract_key_factory.rb +10 -0
- data/lib/toy/identity/uuid_key_factory.rb +9 -0
- data/lib/toy/identity_map.rb +109 -0
- data/lib/toy/index.rb +74 -0
- data/lib/toy/indices.rb +56 -0
- data/lib/toy/inspect.rb +12 -0
- data/lib/toy/list.rb +46 -0
- data/lib/toy/lists.rb +37 -0
- data/lib/toy/logger.rb +26 -0
- data/lib/toy/mass_assignment_security.rb +16 -0
- data/lib/toy/persistence.rb +138 -0
- data/lib/toy/plugins.rb +23 -0
- data/lib/toy/proxies/embedded_list.rb +74 -0
- data/lib/toy/proxies/list.rb +97 -0
- data/lib/toy/proxies/proxy.rb +59 -0
- data/lib/toy/querying.rb +57 -0
- data/lib/toy/reference.rb +134 -0
- data/lib/toy/references.rb +19 -0
- data/lib/toy/serialization.rb +81 -0
- data/lib/toy/store.rb +36 -0
- data/lib/toy/timestamps.rb +22 -0
- data/lib/toy/validations.rb +45 -0
- data/lib/toy/version.rb +3 -0
- data/lib/toystore.rb +1 -0
- data/spec/helper.rb +35 -0
- data/spec/spec.opts +3 -0
- data/spec/support/constants.rb +41 -0
- data/spec/support/identity_map_matcher.rb +20 -0
- data/spec/support/name_and_number_key_factory.rb +5 -0
- data/spec/toy/attribute_spec.rb +176 -0
- data/spec/toy/attributes_spec.rb +394 -0
- data/spec/toy/caching_spec.rb +62 -0
- data/spec/toy/callbacks_spec.rb +97 -0
- data/spec/toy/connection_spec.rb +47 -0
- data/spec/toy/dirty_spec.rb +99 -0
- data/spec/toy/dolly_spec.rb +76 -0
- data/spec/toy/embedded_list_spec.rb +607 -0
- data/spec/toy/embedded_lists_spec.rb +172 -0
- data/spec/toy/equality_spec.rb +46 -0
- data/spec/toy/exceptions_spec.rb +18 -0
- data/spec/toy/extensions/array_spec.rb +25 -0
- data/spec/toy/extensions/boolean_spec.rb +41 -0
- data/spec/toy/extensions/date_spec.rb +48 -0
- data/spec/toy/extensions/float_spec.rb +14 -0
- data/spec/toy/extensions/hash_spec.rb +21 -0
- data/spec/toy/extensions/integer_spec.rb +29 -0
- data/spec/toy/extensions/nil_class_spec.rb +14 -0
- data/spec/toy/extensions/set_spec.rb +27 -0
- data/spec/toy/extensions/string_spec.rb +28 -0
- data/spec/toy/extensions/time_spec.rb +94 -0
- data/spec/toy/identity/abstract_key_factory_spec.rb +7 -0
- data/spec/toy/identity/uuid_key_factory_spec.rb +7 -0
- data/spec/toy/identity_map_spec.rb +150 -0
- data/spec/toy/identity_spec.rb +52 -0
- data/spec/toy/index_spec.rb +230 -0
- data/spec/toy/indices_spec.rb +141 -0
- data/spec/toy/inspect_spec.rb +15 -0
- data/spec/toy/list_spec.rb +576 -0
- data/spec/toy/lists_spec.rb +95 -0
- data/spec/toy/logger_spec.rb +33 -0
- data/spec/toy/mass_assignment_security_spec.rb +116 -0
- data/spec/toy/persistence_spec.rb +312 -0
- data/spec/toy/plugins_spec.rb +39 -0
- data/spec/toy/querying_spec.rb +162 -0
- data/spec/toy/reference_spec.rb +400 -0
- data/spec/toy/references_spec.rb +86 -0
- data/spec/toy/serialization_spec.rb +354 -0
- data/spec/toy/store_spec.rb +41 -0
- data/spec/toy/timestamps_spec.rb +63 -0
- data/spec/toy/validations_spec.rb +171 -0
- data/spec/toy_spec.rb +26 -0
- data/specs.watchr +52 -0
- data/test/lint_test.rb +40 -0
- data/toystore.gemspec +24 -0
- metadata +290 -0
@@ -0,0 +1,63 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
describe Toy::Timestamps do
|
4
|
+
uses_constants('User')
|
5
|
+
|
6
|
+
before do
|
7
|
+
User.timestamps
|
8
|
+
end
|
9
|
+
|
10
|
+
it "adds created_at attribute" do
|
11
|
+
User.attribute?(:created_at)
|
12
|
+
end
|
13
|
+
|
14
|
+
it "adds updated_at attribute" do
|
15
|
+
User.attribute?(:updated_at)
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "on create" do
|
19
|
+
before do
|
20
|
+
@now = Time.now.utc
|
21
|
+
Timecop.freeze(@now) do
|
22
|
+
@user = User.create
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
it "sets created at" do
|
27
|
+
@user.created_at.to_i.should == @now.to_i
|
28
|
+
end
|
29
|
+
|
30
|
+
it "sets updated at" do
|
31
|
+
@user.updated_at.to_i.should == @now.to_i
|
32
|
+
end
|
33
|
+
|
34
|
+
it "uses created_at if provided" do
|
35
|
+
yesterday = @now - 1.day
|
36
|
+
@user = User.create(:created_at => yesterday)
|
37
|
+
@user.created_at.to_i.should == yesterday.to_i
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe "on update" do
|
42
|
+
before do
|
43
|
+
@now = Time.now.utc
|
44
|
+
@yesterday = @now - 1.day
|
45
|
+
|
46
|
+
Timecop.freeze(@yesterday) do
|
47
|
+
@user = User.create
|
48
|
+
end
|
49
|
+
|
50
|
+
Timecop.freeze(@now) do
|
51
|
+
@user.save
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
it "does not change created at" do
|
56
|
+
@user.created_at.to_i.should == @yesterday.to_i
|
57
|
+
end
|
58
|
+
|
59
|
+
it "updates updated at" do
|
60
|
+
@user.updated_at.to_i.should == @now.to_i
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,171 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
describe Toy::Validations do
|
4
|
+
uses_constants('User', 'Game', 'Move')
|
5
|
+
|
6
|
+
before do
|
7
|
+
User.class_eval do
|
8
|
+
attribute :name, String
|
9
|
+
validates_presence_of :name
|
10
|
+
|
11
|
+
[:before_validation, :after_validation].each do |callback|
|
12
|
+
callback_method = "#{callback}_callback"
|
13
|
+
send(callback, callback_method)
|
14
|
+
define_method(callback_method) { history << callback.to_sym }
|
15
|
+
end
|
16
|
+
|
17
|
+
def history
|
18
|
+
@history ||= []
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
it "runs validation callbacks around valid?" do
|
24
|
+
doc = User.new(:name => 'John')
|
25
|
+
doc.valid?
|
26
|
+
doc.history.should == [:before_validation, :after_validation]
|
27
|
+
end
|
28
|
+
|
29
|
+
describe "validate callback" do
|
30
|
+
before do
|
31
|
+
User.class_eval do
|
32
|
+
attribute :name, String
|
33
|
+
validate :name_not_john
|
34
|
+
|
35
|
+
private
|
36
|
+
def name_not_john
|
37
|
+
errors.add(:name, 'cannot be John') if name == 'John'
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
it "adds error if fails" do
|
43
|
+
doc = User.new(:name => 'John')
|
44
|
+
doc.valid?
|
45
|
+
doc.errors[:name].should include('cannot be John')
|
46
|
+
end
|
47
|
+
|
48
|
+
it "does not add error if all good" do
|
49
|
+
doc = User.new(:name => 'Frank')
|
50
|
+
doc.should be_valid
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
describe "#save" do
|
55
|
+
context "with valid" do
|
56
|
+
before do
|
57
|
+
@doc = User.new(:name => 'John')
|
58
|
+
@result = @doc.save
|
59
|
+
end
|
60
|
+
|
61
|
+
it "returns true" do
|
62
|
+
@result.should be_true
|
63
|
+
end
|
64
|
+
|
65
|
+
it "persists the instance" do
|
66
|
+
@doc.should be_persisted
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
context "with invalid" do
|
71
|
+
before do
|
72
|
+
@doc = User.new
|
73
|
+
@result = @doc.save
|
74
|
+
end
|
75
|
+
|
76
|
+
it "returns false" do
|
77
|
+
@result.should be_false
|
78
|
+
end
|
79
|
+
|
80
|
+
it "does not persist instance" do
|
81
|
+
@doc.should_not be_persisted
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
context "with invalid option" do
|
86
|
+
it "raises error" do
|
87
|
+
lambda { User.new.save(:foobar => '') }.should raise_error
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
context "with :validate option" do
|
92
|
+
before do
|
93
|
+
User.validates_presence_of(:name)
|
94
|
+
@doc = User.new
|
95
|
+
end
|
96
|
+
|
97
|
+
it "does not perform validations if false" do
|
98
|
+
@doc.save(:validate => false).should be_true
|
99
|
+
User.key?(@doc.id).should be_true
|
100
|
+
end
|
101
|
+
|
102
|
+
it "does perform validations if true" do
|
103
|
+
@doc.save(:validate => true).should be_false
|
104
|
+
User.key?(@doc.id).should be_false
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
describe "#save!" do
|
110
|
+
context "with valid" do
|
111
|
+
before do
|
112
|
+
@doc = User.new(:name => 'John')
|
113
|
+
@result = @doc.save!
|
114
|
+
end
|
115
|
+
|
116
|
+
it "returns true" do
|
117
|
+
@result.should be_true
|
118
|
+
end
|
119
|
+
|
120
|
+
it "persists the instance" do
|
121
|
+
@doc.should be_persisted
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
context "with invalid" do
|
126
|
+
before do
|
127
|
+
@doc = User.new
|
128
|
+
end
|
129
|
+
|
130
|
+
it "raises an RecordInvalidError" do
|
131
|
+
lambda { @doc.save! }.should raise_error(Toy::RecordInvalidError)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
describe "#create!" do
|
137
|
+
context "with valid" do
|
138
|
+
it "persists the instance" do
|
139
|
+
@doc = User.create!(:name => 'John')
|
140
|
+
@doc.should be_persisted
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
context "with invalid" do
|
145
|
+
it "raises an RecordInvalidError" do
|
146
|
+
lambda { User.create! }.should raise_error(Toy::RecordInvalidError)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
describe ".validates_embedded" do
|
152
|
+
before do
|
153
|
+
Game.embedded_list(:moves)
|
154
|
+
Move.attribute(:index, Integer)
|
155
|
+
Move.validates_presence_of(:index)
|
156
|
+
Game.validates_embedded(:moves)
|
157
|
+
end
|
158
|
+
|
159
|
+
it "adds errors if any of the embedded are invalid" do
|
160
|
+
game = Game.new(:moves => [Move.new])
|
161
|
+
game.valid?
|
162
|
+
game.errors[:moves].should include('is invalid')
|
163
|
+
end
|
164
|
+
|
165
|
+
it "does not have errors if all embedded are valid" do
|
166
|
+
game = Game.new(:moves => [Move.new(:index => 1)])
|
167
|
+
game.valid?
|
168
|
+
game.errors[:moves].should_not include('is invalid')
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|
data/spec/toy_spec.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
describe Toy do
|
4
|
+
uses_constants('User', 'Game', 'Move')
|
5
|
+
|
6
|
+
describe ".clear" do
|
7
|
+
it "can clear all the stores in one magical moment" do
|
8
|
+
Game.embedded_list(:moves)
|
9
|
+
user = User.create!
|
10
|
+
game = Game.create!(:moves => [Move.new])
|
11
|
+
Toy.clear
|
12
|
+
User.get(user.id).should be_nil
|
13
|
+
Game.get(game.id).should be_nil
|
14
|
+
end
|
15
|
+
|
16
|
+
it "does not raise error when no default store set" do
|
17
|
+
klass = Class.new { include Toy::Store }
|
18
|
+
lambda { Toy.clear }.should_not raise_error
|
19
|
+
end
|
20
|
+
|
21
|
+
it "does not raise error when no cache set" do
|
22
|
+
klass = Class.new { include Toy::Store }
|
23
|
+
lambda { Toy.clear }.should_not raise_error
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/specs.watchr
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
def growl(title, msg, img)
|
2
|
+
%x{growlnotify -m #{ msg.inspect} -t #{title.inspect} --image ~/.watchr/#{img}.png}
|
3
|
+
end
|
4
|
+
|
5
|
+
def form_growl_message(str)
|
6
|
+
msg = str.split("\n").last
|
7
|
+
if msg =~ /(\d)\sfailure/
|
8
|
+
img = $1.to_i > 0 ? 'fail' : 'pass'
|
9
|
+
end
|
10
|
+
growl 'Results', msg, img
|
11
|
+
end
|
12
|
+
|
13
|
+
def run(cmd)
|
14
|
+
puts cmd
|
15
|
+
output = ""
|
16
|
+
IO.popen(cmd) do |com|
|
17
|
+
com.each_char do |c|
|
18
|
+
print c
|
19
|
+
output << c
|
20
|
+
$stdout.flush
|
21
|
+
end
|
22
|
+
end
|
23
|
+
form_growl_message output
|
24
|
+
end
|
25
|
+
|
26
|
+
def run_all
|
27
|
+
run('bundle exec rake')
|
28
|
+
end
|
29
|
+
|
30
|
+
def run_spec(path)
|
31
|
+
path.gsub!('lib/', 'spec/')
|
32
|
+
path.gsub!('_spec', '')
|
33
|
+
file_name = File.basename(path, '.rb')
|
34
|
+
path.gsub!(file_name, file_name + "_spec")
|
35
|
+
if File.exists?(path)
|
36
|
+
system('clear')
|
37
|
+
run(%Q(bundle exec spec #{path}))
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
watch('spec/helper\.rb') { run_all }
|
42
|
+
watch('lib/.*\.rb') { |m| run_spec(m[0]) }
|
43
|
+
watch('spec/.*_spec\.rb') { |m| run_spec(m[0]) }
|
44
|
+
|
45
|
+
# Ctrl-\
|
46
|
+
Signal.trap('QUIT') do
|
47
|
+
puts " --- Running all tests ---\n\n"
|
48
|
+
run_all
|
49
|
+
end
|
50
|
+
|
51
|
+
# Ctrl-C
|
52
|
+
Signal.trap('INT') { abort("\n") }
|
data/test/lint_test.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'bundler/setup'
|
2
|
+
require 'pathname'
|
3
|
+
|
4
|
+
root_path = Pathname(__FILE__).dirname.join('..').expand_path
|
5
|
+
lib_path = root_path.join('lib')
|
6
|
+
|
7
|
+
$:.unshift(lib_path)
|
8
|
+
|
9
|
+
require 'toy'
|
10
|
+
|
11
|
+
Adapter.define(:memory) do
|
12
|
+
def read(key)
|
13
|
+
deserialize(client[key_for(key)])
|
14
|
+
end
|
15
|
+
|
16
|
+
def write(key, value)
|
17
|
+
client[key_for(key)] = serialize(value)
|
18
|
+
end
|
19
|
+
|
20
|
+
def delete(key)
|
21
|
+
client.delete(key_for(key))
|
22
|
+
end
|
23
|
+
|
24
|
+
def clear
|
25
|
+
client.clear
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
class User
|
30
|
+
include Toy::Store
|
31
|
+
store :memory, {}
|
32
|
+
end
|
33
|
+
|
34
|
+
class LintTest < ActiveModel::TestCase
|
35
|
+
include ActiveModel::Lint::Tests
|
36
|
+
|
37
|
+
def setup
|
38
|
+
@model = User.new
|
39
|
+
end
|
40
|
+
end
|
data/toystore.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "toy/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "toystore"
|
7
|
+
s.version = Toy::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ['Geoffrey Dagley', 'John Nunemaker']
|
10
|
+
s.email = ['gdagley@gmail.com', 'nunemaker@gmail.com']
|
11
|
+
s.homepage = 'http://github.com/newtoy/toystore'
|
12
|
+
s.summary = 'An object mapper for anything that can read, write and delete data'
|
13
|
+
s.description = 'An object mapper for anything that can read, write and delete data'
|
14
|
+
|
15
|
+
s.files = `git ls-files`.split("\n")
|
16
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
18
|
+
s.require_paths = ["lib"]
|
19
|
+
|
20
|
+
s.add_dependency 'adapter', '~> 0.5.1'
|
21
|
+
s.add_dependency 'activemodel', '~> 3.0.3'
|
22
|
+
s.add_dependency 'activesupport', '~> 3.0.3'
|
23
|
+
s.add_dependency 'simple_uuid', '~> 0.1.1'
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,290 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: toystore
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 1
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 5
|
9
|
+
version: "0.5"
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Geoffrey Dagley
|
13
|
+
- John Nunemaker
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-01-26 00:00:00 -05:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: adapter
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 9
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
- 5
|
33
|
+
- 1
|
34
|
+
version: 0.5.1
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: activemodel
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 1
|
46
|
+
segments:
|
47
|
+
- 3
|
48
|
+
- 0
|
49
|
+
- 3
|
50
|
+
version: 3.0.3
|
51
|
+
type: :runtime
|
52
|
+
version_requirements: *id002
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: activesupport
|
55
|
+
prerelease: false
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
hash: 1
|
62
|
+
segments:
|
63
|
+
- 3
|
64
|
+
- 0
|
65
|
+
- 3
|
66
|
+
version: 3.0.3
|
67
|
+
type: :runtime
|
68
|
+
version_requirements: *id003
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: simple_uuid
|
71
|
+
prerelease: false
|
72
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
hash: 25
|
78
|
+
segments:
|
79
|
+
- 0
|
80
|
+
- 1
|
81
|
+
- 1
|
82
|
+
version: 0.1.1
|
83
|
+
type: :runtime
|
84
|
+
version_requirements: *id004
|
85
|
+
description: An object mapper for anything that can read, write and delete data
|
86
|
+
email:
|
87
|
+
- gdagley@gmail.com
|
88
|
+
- nunemaker@gmail.com
|
89
|
+
executables: []
|
90
|
+
|
91
|
+
extensions: []
|
92
|
+
|
93
|
+
extra_rdoc_files: []
|
94
|
+
|
95
|
+
files:
|
96
|
+
- .autotest
|
97
|
+
- .bundle/config
|
98
|
+
- .gitignore
|
99
|
+
- Gemfile
|
100
|
+
- Gemfile.lock
|
101
|
+
- LICENSE
|
102
|
+
- LOGGING.rdoc
|
103
|
+
- README.rdoc
|
104
|
+
- Rakefile
|
105
|
+
- examples/memcached.rb
|
106
|
+
- examples/memory.rb
|
107
|
+
- examples/models.rb
|
108
|
+
- examples/redis.rb
|
109
|
+
- lib/toy.rb
|
110
|
+
- lib/toy/attribute.rb
|
111
|
+
- lib/toy/attributes.rb
|
112
|
+
- lib/toy/caching.rb
|
113
|
+
- lib/toy/callbacks.rb
|
114
|
+
- lib/toy/collection.rb
|
115
|
+
- lib/toy/connection.rb
|
116
|
+
- lib/toy/dirty.rb
|
117
|
+
- lib/toy/dolly.rb
|
118
|
+
- lib/toy/embedded_list.rb
|
119
|
+
- lib/toy/embedded_lists.rb
|
120
|
+
- lib/toy/equality.rb
|
121
|
+
- lib/toy/exceptions.rb
|
122
|
+
- lib/toy/extensions/array.rb
|
123
|
+
- lib/toy/extensions/boolean.rb
|
124
|
+
- lib/toy/extensions/date.rb
|
125
|
+
- lib/toy/extensions/float.rb
|
126
|
+
- lib/toy/extensions/hash.rb
|
127
|
+
- lib/toy/extensions/integer.rb
|
128
|
+
- lib/toy/extensions/nil_class.rb
|
129
|
+
- lib/toy/extensions/object.rb
|
130
|
+
- lib/toy/extensions/set.rb
|
131
|
+
- lib/toy/extensions/string.rb
|
132
|
+
- lib/toy/extensions/time.rb
|
133
|
+
- lib/toy/identity.rb
|
134
|
+
- lib/toy/identity/abstract_key_factory.rb
|
135
|
+
- lib/toy/identity/uuid_key_factory.rb
|
136
|
+
- lib/toy/identity_map.rb
|
137
|
+
- lib/toy/index.rb
|
138
|
+
- lib/toy/indices.rb
|
139
|
+
- lib/toy/inspect.rb
|
140
|
+
- lib/toy/list.rb
|
141
|
+
- lib/toy/lists.rb
|
142
|
+
- lib/toy/logger.rb
|
143
|
+
- lib/toy/mass_assignment_security.rb
|
144
|
+
- lib/toy/persistence.rb
|
145
|
+
- lib/toy/plugins.rb
|
146
|
+
- lib/toy/proxies/embedded_list.rb
|
147
|
+
- lib/toy/proxies/list.rb
|
148
|
+
- lib/toy/proxies/proxy.rb
|
149
|
+
- lib/toy/querying.rb
|
150
|
+
- lib/toy/reference.rb
|
151
|
+
- lib/toy/references.rb
|
152
|
+
- lib/toy/serialization.rb
|
153
|
+
- lib/toy/store.rb
|
154
|
+
- lib/toy/timestamps.rb
|
155
|
+
- lib/toy/validations.rb
|
156
|
+
- lib/toy/version.rb
|
157
|
+
- lib/toystore.rb
|
158
|
+
- spec/helper.rb
|
159
|
+
- spec/spec.opts
|
160
|
+
- spec/support/constants.rb
|
161
|
+
- spec/support/identity_map_matcher.rb
|
162
|
+
- spec/support/name_and_number_key_factory.rb
|
163
|
+
- spec/toy/attribute_spec.rb
|
164
|
+
- spec/toy/attributes_spec.rb
|
165
|
+
- spec/toy/caching_spec.rb
|
166
|
+
- spec/toy/callbacks_spec.rb
|
167
|
+
- spec/toy/connection_spec.rb
|
168
|
+
- spec/toy/dirty_spec.rb
|
169
|
+
- spec/toy/dolly_spec.rb
|
170
|
+
- spec/toy/embedded_list_spec.rb
|
171
|
+
- spec/toy/embedded_lists_spec.rb
|
172
|
+
- spec/toy/equality_spec.rb
|
173
|
+
- spec/toy/exceptions_spec.rb
|
174
|
+
- spec/toy/extensions/array_spec.rb
|
175
|
+
- spec/toy/extensions/boolean_spec.rb
|
176
|
+
- spec/toy/extensions/date_spec.rb
|
177
|
+
- spec/toy/extensions/float_spec.rb
|
178
|
+
- spec/toy/extensions/hash_spec.rb
|
179
|
+
- spec/toy/extensions/integer_spec.rb
|
180
|
+
- spec/toy/extensions/nil_class_spec.rb
|
181
|
+
- spec/toy/extensions/set_spec.rb
|
182
|
+
- spec/toy/extensions/string_spec.rb
|
183
|
+
- spec/toy/extensions/time_spec.rb
|
184
|
+
- spec/toy/identity/abstract_key_factory_spec.rb
|
185
|
+
- spec/toy/identity/uuid_key_factory_spec.rb
|
186
|
+
- spec/toy/identity_map_spec.rb
|
187
|
+
- spec/toy/identity_spec.rb
|
188
|
+
- spec/toy/index_spec.rb
|
189
|
+
- spec/toy/indices_spec.rb
|
190
|
+
- spec/toy/inspect_spec.rb
|
191
|
+
- spec/toy/list_spec.rb
|
192
|
+
- spec/toy/lists_spec.rb
|
193
|
+
- spec/toy/logger_spec.rb
|
194
|
+
- spec/toy/mass_assignment_security_spec.rb
|
195
|
+
- spec/toy/persistence_spec.rb
|
196
|
+
- spec/toy/plugins_spec.rb
|
197
|
+
- spec/toy/querying_spec.rb
|
198
|
+
- spec/toy/reference_spec.rb
|
199
|
+
- spec/toy/references_spec.rb
|
200
|
+
- spec/toy/serialization_spec.rb
|
201
|
+
- spec/toy/store_spec.rb
|
202
|
+
- spec/toy/timestamps_spec.rb
|
203
|
+
- spec/toy/validations_spec.rb
|
204
|
+
- spec/toy_spec.rb
|
205
|
+
- specs.watchr
|
206
|
+
- test/lint_test.rb
|
207
|
+
- toystore.gemspec
|
208
|
+
has_rdoc: true
|
209
|
+
homepage: http://github.com/newtoy/toystore
|
210
|
+
licenses: []
|
211
|
+
|
212
|
+
post_install_message:
|
213
|
+
rdoc_options: []
|
214
|
+
|
215
|
+
require_paths:
|
216
|
+
- lib
|
217
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
218
|
+
none: false
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
hash: 3
|
223
|
+
segments:
|
224
|
+
- 0
|
225
|
+
version: "0"
|
226
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
227
|
+
none: false
|
228
|
+
requirements:
|
229
|
+
- - ">="
|
230
|
+
- !ruby/object:Gem::Version
|
231
|
+
hash: 3
|
232
|
+
segments:
|
233
|
+
- 0
|
234
|
+
version: "0"
|
235
|
+
requirements: []
|
236
|
+
|
237
|
+
rubyforge_project:
|
238
|
+
rubygems_version: 1.3.7
|
239
|
+
signing_key:
|
240
|
+
specification_version: 3
|
241
|
+
summary: An object mapper for anything that can read, write and delete data
|
242
|
+
test_files:
|
243
|
+
- spec/helper.rb
|
244
|
+
- spec/spec.opts
|
245
|
+
- spec/support/constants.rb
|
246
|
+
- spec/support/identity_map_matcher.rb
|
247
|
+
- spec/support/name_and_number_key_factory.rb
|
248
|
+
- spec/toy/attribute_spec.rb
|
249
|
+
- spec/toy/attributes_spec.rb
|
250
|
+
- spec/toy/caching_spec.rb
|
251
|
+
- spec/toy/callbacks_spec.rb
|
252
|
+
- spec/toy/connection_spec.rb
|
253
|
+
- spec/toy/dirty_spec.rb
|
254
|
+
- spec/toy/dolly_spec.rb
|
255
|
+
- spec/toy/embedded_list_spec.rb
|
256
|
+
- spec/toy/embedded_lists_spec.rb
|
257
|
+
- spec/toy/equality_spec.rb
|
258
|
+
- spec/toy/exceptions_spec.rb
|
259
|
+
- spec/toy/extensions/array_spec.rb
|
260
|
+
- spec/toy/extensions/boolean_spec.rb
|
261
|
+
- spec/toy/extensions/date_spec.rb
|
262
|
+
- spec/toy/extensions/float_spec.rb
|
263
|
+
- spec/toy/extensions/hash_spec.rb
|
264
|
+
- spec/toy/extensions/integer_spec.rb
|
265
|
+
- spec/toy/extensions/nil_class_spec.rb
|
266
|
+
- spec/toy/extensions/set_spec.rb
|
267
|
+
- spec/toy/extensions/string_spec.rb
|
268
|
+
- spec/toy/extensions/time_spec.rb
|
269
|
+
- spec/toy/identity/abstract_key_factory_spec.rb
|
270
|
+
- spec/toy/identity/uuid_key_factory_spec.rb
|
271
|
+
- spec/toy/identity_map_spec.rb
|
272
|
+
- spec/toy/identity_spec.rb
|
273
|
+
- spec/toy/index_spec.rb
|
274
|
+
- spec/toy/indices_spec.rb
|
275
|
+
- spec/toy/inspect_spec.rb
|
276
|
+
- spec/toy/list_spec.rb
|
277
|
+
- spec/toy/lists_spec.rb
|
278
|
+
- spec/toy/logger_spec.rb
|
279
|
+
- spec/toy/mass_assignment_security_spec.rb
|
280
|
+
- spec/toy/persistence_spec.rb
|
281
|
+
- spec/toy/plugins_spec.rb
|
282
|
+
- spec/toy/querying_spec.rb
|
283
|
+
- spec/toy/reference_spec.rb
|
284
|
+
- spec/toy/references_spec.rb
|
285
|
+
- spec/toy/serialization_spec.rb
|
286
|
+
- spec/toy/store_spec.rb
|
287
|
+
- spec/toy/timestamps_spec.rb
|
288
|
+
- spec/toy/validations_spec.rb
|
289
|
+
- spec/toy_spec.rb
|
290
|
+
- test/lint_test.rb
|