toystore 0.9.0 → 0.10.0
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/.gitignore +2 -1
- data/.travis.yml +9 -0
- data/Changelog.md +10 -1
- data/Gemfile +14 -13
- data/README.md +213 -2
- data/examples/plain_old_object.rb +54 -0
- data/examples/plain_old_object_on_roids.rb +160 -0
- data/lib/toy.rb +3 -1
- data/lib/toy/association_serialization.rb +50 -0
- data/lib/toy/attribute.rb +17 -2
- data/lib/toy/equality.rb +5 -1
- data/lib/toy/identity/abstract_key_factory.rb +5 -0
- data/lib/toy/identity_map.rb +1 -2
- data/lib/toy/inheritance.rb +29 -0
- data/lib/toy/inspect.rb +17 -4
- data/lib/toy/object.rb +6 -0
- data/lib/toy/querying.rb +20 -3
- data/lib/toy/reference.rb +18 -4
- data/lib/toy/reloadable.rb +2 -2
- data/lib/toy/serialization.rb +1 -40
- data/lib/toy/store.rb +2 -2
- data/lib/toy/timestamps.rb +3 -1
- data/lib/toy/version.rb +2 -2
- data/spec/helper.rb +2 -3
- data/spec/support/constants.rb +15 -15
- data/spec/toy/association_serialization_spec.rb +103 -0
- data/spec/toy/attribute_spec.rb +17 -1
- data/spec/toy/equality_spec.rb +9 -2
- data/spec/toy/extensions/array_spec.rb +2 -2
- data/spec/toy/identity/uuid_key_factory_spec.rb +35 -3
- data/spec/toy/identity_map_spec.rb +4 -0
- data/spec/toy/inheritance_spec.rb +93 -0
- data/spec/toy/inspect_spec.rb +12 -4
- data/spec/toy/object_spec.rb +47 -0
- data/spec/toy/plugins_spec.rb +4 -4
- data/spec/toy/querying_spec.rb +71 -11
- data/spec/toy/reference_spec.rb +82 -72
- data/spec/toy/serialization_spec.rb +16 -111
- data/spec/toy/store_spec.rb +14 -28
- metadata +23 -13
- data/Gemfile.lock +0 -71
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toystore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 55
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 10
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.10.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Geoffrey Dagley
|
@@ -16,10 +16,10 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-
|
19
|
+
date: 2012-04-20 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
|
22
|
+
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
- 5
|
33
33
|
- 1
|
34
34
|
version: 0.5.1
|
35
|
-
type: :runtime
|
36
35
|
version_requirements: *id001
|
36
|
+
name: adapter
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
|
-
|
38
|
+
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
requirement: &id002 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
- 3
|
55
55
|
- 2
|
56
56
|
version: "3.2"
|
57
|
-
type: :runtime
|
58
57
|
version_requirements: *id002
|
58
|
+
name: activemodel
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
|
-
|
60
|
+
type: :runtime
|
61
61
|
prerelease: false
|
62
62
|
requirement: &id003 !ruby/object:Gem::Requirement
|
63
63
|
none: false
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
- 3
|
77
77
|
- 2
|
78
78
|
version: "3.2"
|
79
|
-
type: :runtime
|
80
79
|
version_requirements: *id003
|
80
|
+
name: activesupport
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
|
-
|
82
|
+
type: :runtime
|
83
83
|
prerelease: false
|
84
84
|
requirement: &id004 !ruby/object:Gem::Requirement
|
85
85
|
none: false
|
@@ -92,8 +92,8 @@ dependencies:
|
|
92
92
|
- 1
|
93
93
|
- 1
|
94
94
|
version: 0.1.1
|
95
|
-
type: :runtime
|
96
95
|
version_requirements: *id004
|
96
|
+
name: simple_uuid
|
97
97
|
description: An object mapper for anything that can read, write and delete data
|
98
98
|
email:
|
99
99
|
- gdagley@gmail.com
|
@@ -106,9 +106,9 @@ extra_rdoc_files: []
|
|
106
106
|
|
107
107
|
files:
|
108
108
|
- .gitignore
|
109
|
+
- .travis.yml
|
109
110
|
- Changelog.md
|
110
111
|
- Gemfile
|
111
|
-
- Gemfile.lock
|
112
112
|
- Guardfile
|
113
113
|
- LICENSE
|
114
114
|
- README.md
|
@@ -120,9 +120,12 @@ files:
|
|
120
120
|
- examples/memory.rb
|
121
121
|
- examples/mongo.rb
|
122
122
|
- examples/namespacing_keys.rb
|
123
|
+
- examples/plain_old_object.rb
|
124
|
+
- examples/plain_old_object_on_roids.rb
|
123
125
|
- examples/redis.rb
|
124
126
|
- examples/riak.rb
|
125
127
|
- lib/toy.rb
|
128
|
+
- lib/toy/association_serialization.rb
|
126
129
|
- lib/toy/attribute.rb
|
127
130
|
- lib/toy/attributes.rb
|
128
131
|
- lib/toy/caching.rb
|
@@ -148,6 +151,7 @@ files:
|
|
148
151
|
- lib/toy/identity/abstract_key_factory.rb
|
149
152
|
- lib/toy/identity/uuid_key_factory.rb
|
150
153
|
- lib/toy/identity_map.rb
|
154
|
+
- lib/toy/inheritance.rb
|
151
155
|
- lib/toy/inspect.rb
|
152
156
|
- lib/toy/list.rb
|
153
157
|
- lib/toy/lists.rb
|
@@ -177,6 +181,7 @@ files:
|
|
177
181
|
- spec/support/identity_map_matcher.rb
|
178
182
|
- spec/support/name_and_number_key_factory.rb
|
179
183
|
- spec/support/objects.rb
|
184
|
+
- spec/toy/association_serialization_spec.rb
|
180
185
|
- spec/toy/attribute_spec.rb
|
181
186
|
- spec/toy/attributes_spec.rb
|
182
187
|
- spec/toy/caching_spec.rb
|
@@ -200,12 +205,14 @@ files:
|
|
200
205
|
- spec/toy/identity/uuid_key_factory_spec.rb
|
201
206
|
- spec/toy/identity_map_spec.rb
|
202
207
|
- spec/toy/identity_spec.rb
|
208
|
+
- spec/toy/inheritance_spec.rb
|
203
209
|
- spec/toy/inspect_spec.rb
|
204
210
|
- spec/toy/list_spec.rb
|
205
211
|
- spec/toy/lists_spec.rb
|
206
212
|
- spec/toy/logger_spec.rb
|
207
213
|
- spec/toy/mass_assignment_security_spec.rb
|
208
214
|
- spec/toy/middleware/identity_map_spec.rb
|
215
|
+
- spec/toy/object_spec.rb
|
209
216
|
- spec/toy/persistence_spec.rb
|
210
217
|
- spec/toy/plugins_spec.rb
|
211
218
|
- spec/toy/querying_spec.rb
|
@@ -259,6 +266,7 @@ test_files:
|
|
259
266
|
- spec/support/identity_map_matcher.rb
|
260
267
|
- spec/support/name_and_number_key_factory.rb
|
261
268
|
- spec/support/objects.rb
|
269
|
+
- spec/toy/association_serialization_spec.rb
|
262
270
|
- spec/toy/attribute_spec.rb
|
263
271
|
- spec/toy/attributes_spec.rb
|
264
272
|
- spec/toy/caching_spec.rb
|
@@ -282,12 +290,14 @@ test_files:
|
|
282
290
|
- spec/toy/identity/uuid_key_factory_spec.rb
|
283
291
|
- spec/toy/identity_map_spec.rb
|
284
292
|
- spec/toy/identity_spec.rb
|
293
|
+
- spec/toy/inheritance_spec.rb
|
285
294
|
- spec/toy/inspect_spec.rb
|
286
295
|
- spec/toy/list_spec.rb
|
287
296
|
- spec/toy/lists_spec.rb
|
288
297
|
- spec/toy/logger_spec.rb
|
289
298
|
- spec/toy/mass_assignment_security_spec.rb
|
290
299
|
- spec/toy/middleware/identity_map_spec.rb
|
300
|
+
- spec/toy/object_spec.rb
|
291
301
|
- spec/toy/persistence_spec.rb
|
292
302
|
- spec/toy/plugins_spec.rb
|
293
303
|
- spec/toy/querying_spec.rb
|
data/Gemfile.lock
DELETED
@@ -1,71 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
toystore (0.8.3)
|
5
|
-
activemodel (~> 3.0, < 3.2)
|
6
|
-
activesupport (~> 3.0, < 3.2)
|
7
|
-
adapter (~> 0.5.1)
|
8
|
-
simple_uuid (~> 0.1.1)
|
9
|
-
|
10
|
-
GEM
|
11
|
-
remote: http://rubygems.org/
|
12
|
-
specs:
|
13
|
-
activemodel (3.1.3)
|
14
|
-
activesupport (= 3.1.3)
|
15
|
-
builder (~> 3.0.0)
|
16
|
-
i18n (~> 0.6)
|
17
|
-
activesupport (3.1.3)
|
18
|
-
multi_json (~> 1.0)
|
19
|
-
adapter (0.5.2)
|
20
|
-
bson (1.5.2)
|
21
|
-
bson_ext (1.5.2)
|
22
|
-
bson (= 1.5.2)
|
23
|
-
builder (3.0.0)
|
24
|
-
diff-lcs (1.1.3)
|
25
|
-
ffi (1.0.11)
|
26
|
-
growl (1.0.3)
|
27
|
-
guard (1.0.0)
|
28
|
-
ffi (>= 0.5.0)
|
29
|
-
thor (~> 0.14.6)
|
30
|
-
guard-bundler (0.1.3)
|
31
|
-
bundler (>= 1.0.0)
|
32
|
-
guard (>= 0.2.2)
|
33
|
-
guard-rspec (0.6.0)
|
34
|
-
guard (>= 0.10.0)
|
35
|
-
i18n (0.6.0)
|
36
|
-
log_buddy (0.5.0)
|
37
|
-
multi_json (1.0.4)
|
38
|
-
rack (1.4.0)
|
39
|
-
rack-test (0.6.1)
|
40
|
-
rack (>= 1.0)
|
41
|
-
rake (0.8.7)
|
42
|
-
rspec (2.8.0)
|
43
|
-
rspec-core (~> 2.8.0)
|
44
|
-
rspec-expectations (~> 2.8.0)
|
45
|
-
rspec-mocks (~> 2.8.0)
|
46
|
-
rspec-core (2.8.0)
|
47
|
-
rspec-expectations (2.8.0)
|
48
|
-
diff-lcs (~> 1.1.2)
|
49
|
-
rspec-mocks (2.8.0)
|
50
|
-
simple_uuid (0.1.2)
|
51
|
-
thor (0.14.6)
|
52
|
-
timecop (0.3.5)
|
53
|
-
tzinfo (0.3.31)
|
54
|
-
|
55
|
-
PLATFORMS
|
56
|
-
ruby
|
57
|
-
|
58
|
-
DEPENDENCIES
|
59
|
-
bson
|
60
|
-
bson_ext
|
61
|
-
growl
|
62
|
-
guard
|
63
|
-
guard-bundler
|
64
|
-
guard-rspec
|
65
|
-
log_buddy (~> 0.5.0)
|
66
|
-
rack-test
|
67
|
-
rake (~> 0.8.7)
|
68
|
-
rspec (~> 2.3)
|
69
|
-
timecop (~> 0.3.5)
|
70
|
-
toystore!
|
71
|
-
tzinfo (~> 0.3.23)
|