friendly 0.3.5 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +1 -1
- data/.gitignore +3 -0
- data/CHANGELOG.md +11 -0
- data/CONTRIBUTORS.md +6 -0
- data/README.md +93 -1
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/friendly.gemspec +32 -2
- data/lib/friendly.rb +4 -0
- data/lib/friendly/associations.rb +7 -0
- data/lib/friendly/associations/association.rb +34 -0
- data/lib/friendly/associations/set.rb +37 -0
- data/lib/friendly/attribute.rb +37 -11
- data/lib/friendly/boolean.rb +6 -2
- data/lib/friendly/document.rb +93 -1
- data/lib/friendly/named_scope.rb +17 -0
- data/lib/friendly/scope.rb +100 -0
- data/lib/friendly/scope_proxy.rb +45 -0
- data/lib/friendly/sequel_monkey_patches.rb +0 -1
- data/lib/friendly/table_creator.rb +11 -6
- data/lib/friendly/uuid.rb +5 -0
- data/spec/config.yml.example +7 -0
- data/spec/integration/ad_hoc_scopes_spec.rb +42 -0
- data/spec/integration/has_many_spec.rb +18 -0
- data/spec/integration/named_scope_spec.rb +34 -0
- data/spec/integration/scope_chaining_spec.rb +22 -0
- data/spec/integration/table_creator_spec.rb +17 -5
- data/spec/spec_helper.rb +19 -6
- data/spec/unit/associations/association_spec.rb +57 -0
- data/spec/unit/associations/set_spec.rb +43 -0
- data/spec/unit/attribute_spec.rb +41 -0
- data/spec/unit/document_spec.rb +47 -0
- data/spec/unit/named_scope_spec.rb +16 -0
- data/spec/unit/scope_proxy_spec.rb +44 -0
- data/spec/unit/scope_spec.rb +113 -0
- metadata +39 -2
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: friendly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Golick
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-22 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -42,6 +42,16 @@ dependencies:
|
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: "0"
|
44
44
|
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: memcached
|
47
|
+
type: :development
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: "0"
|
54
|
+
version:
|
45
55
|
- !ruby/object:Gem::Dependency
|
46
56
|
name: sequel
|
47
57
|
type: :runtime
|
@@ -95,6 +105,8 @@ files:
|
|
95
105
|
- .document
|
96
106
|
- .gitignore
|
97
107
|
- APACHE-LICENSE
|
108
|
+
- CHANGELOG.md
|
109
|
+
- CONTRIBUTORS.md
|
98
110
|
- LICENSE
|
99
111
|
- README.md
|
100
112
|
- Rakefile
|
@@ -102,6 +114,9 @@ files:
|
|
102
114
|
- examples/friendly.yml
|
103
115
|
- friendly.gemspec
|
104
116
|
- lib/friendly.rb
|
117
|
+
- lib/friendly/associations.rb
|
118
|
+
- lib/friendly/associations/association.rb
|
119
|
+
- lib/friendly/associations/set.rb
|
105
120
|
- lib/friendly/attribute.rb
|
106
121
|
- lib/friendly/boolean.rb
|
107
122
|
- lib/friendly/cache.rb
|
@@ -112,8 +127,11 @@ files:
|
|
112
127
|
- lib/friendly/document_table.rb
|
113
128
|
- lib/friendly/index.rb
|
114
129
|
- lib/friendly/memcached.rb
|
130
|
+
- lib/friendly/named_scope.rb
|
115
131
|
- lib/friendly/newrelic.rb
|
116
132
|
- lib/friendly/query.rb
|
133
|
+
- lib/friendly/scope.rb
|
134
|
+
- lib/friendly/scope_proxy.rb
|
117
135
|
- lib/friendly/sequel_monkey_patches.rb
|
118
136
|
- lib/friendly/storage.rb
|
119
137
|
- lib/friendly/storage_factory.rb
|
@@ -124,12 +142,14 @@ files:
|
|
124
142
|
- lib/friendly/translator.rb
|
125
143
|
- lib/friendly/uuid.rb
|
126
144
|
- rails/init.rb
|
145
|
+
- spec/config.yml.example
|
127
146
|
- spec/fakes/data_store_fake.rb
|
128
147
|
- spec/fakes/database_fake.rb
|
129
148
|
- spec/fakes/dataset_fake.rb
|
130
149
|
- spec/fakes/document.rb
|
131
150
|
- spec/fakes/serializer_fake.rb
|
132
151
|
- spec/fakes/time_fake.rb
|
152
|
+
- spec/integration/ad_hoc_scopes_spec.rb
|
133
153
|
- spec/integration/basic_object_lifecycle_spec.rb
|
134
154
|
- spec/integration/batch_insertion_spec.rb
|
135
155
|
- spec/integration/convenience_api_spec.rb
|
@@ -137,12 +157,17 @@ files:
|
|
137
157
|
- spec/integration/default_value_spec.rb
|
138
158
|
- spec/integration/find_via_cache_spec.rb
|
139
159
|
- spec/integration/finder_spec.rb
|
160
|
+
- spec/integration/has_many_spec.rb
|
140
161
|
- spec/integration/index_spec.rb
|
162
|
+
- spec/integration/named_scope_spec.rb
|
141
163
|
- spec/integration/pagination_spec.rb
|
164
|
+
- spec/integration/scope_chaining_spec.rb
|
142
165
|
- spec/integration/table_creator_spec.rb
|
143
166
|
- spec/integration/write_through_cache_spec.rb
|
144
167
|
- spec/spec.opts
|
145
168
|
- spec/spec_helper.rb
|
169
|
+
- spec/unit/associations/association_spec.rb
|
170
|
+
- spec/unit/associations/set_spec.rb
|
146
171
|
- spec/unit/attribute_spec.rb
|
147
172
|
- spec/unit/cache_by_id_spec.rb
|
148
173
|
- spec/unit/cache_spec.rb
|
@@ -153,7 +178,10 @@ files:
|
|
153
178
|
- spec/unit/friendly_spec.rb
|
154
179
|
- spec/unit/index_spec.rb
|
155
180
|
- spec/unit/memcached_spec.rb
|
181
|
+
- spec/unit/named_scope_spec.rb
|
156
182
|
- spec/unit/query_spec.rb
|
183
|
+
- spec/unit/scope_proxy_spec.rb
|
184
|
+
- spec/unit/scope_spec.rb
|
157
185
|
- spec/unit/storage_factory_spec.rb
|
158
186
|
- spec/unit/storage_proxy_spec.rb
|
159
187
|
- spec/unit/translator_spec.rb
|
@@ -236,6 +264,7 @@ test_files:
|
|
236
264
|
- spec/fakes/document.rb
|
237
265
|
- spec/fakes/serializer_fake.rb
|
238
266
|
- spec/fakes/time_fake.rb
|
267
|
+
- spec/integration/ad_hoc_scopes_spec.rb
|
239
268
|
- spec/integration/basic_object_lifecycle_spec.rb
|
240
269
|
- spec/integration/batch_insertion_spec.rb
|
241
270
|
- spec/integration/convenience_api_spec.rb
|
@@ -243,11 +272,16 @@ test_files:
|
|
243
272
|
- spec/integration/default_value_spec.rb
|
244
273
|
- spec/integration/find_via_cache_spec.rb
|
245
274
|
- spec/integration/finder_spec.rb
|
275
|
+
- spec/integration/has_many_spec.rb
|
246
276
|
- spec/integration/index_spec.rb
|
277
|
+
- spec/integration/named_scope_spec.rb
|
247
278
|
- spec/integration/pagination_spec.rb
|
279
|
+
- spec/integration/scope_chaining_spec.rb
|
248
280
|
- spec/integration/table_creator_spec.rb
|
249
281
|
- spec/integration/write_through_cache_spec.rb
|
250
282
|
- spec/spec_helper.rb
|
283
|
+
- spec/unit/associations/association_spec.rb
|
284
|
+
- spec/unit/associations/set_spec.rb
|
251
285
|
- spec/unit/attribute_spec.rb
|
252
286
|
- spec/unit/cache_by_id_spec.rb
|
253
287
|
- spec/unit/cache_spec.rb
|
@@ -258,7 +292,10 @@ test_files:
|
|
258
292
|
- spec/unit/friendly_spec.rb
|
259
293
|
- spec/unit/index_spec.rb
|
260
294
|
- spec/unit/memcached_spec.rb
|
295
|
+
- spec/unit/named_scope_spec.rb
|
261
296
|
- spec/unit/query_spec.rb
|
297
|
+
- spec/unit/scope_proxy_spec.rb
|
298
|
+
- spec/unit/scope_spec.rb
|
262
299
|
- spec/unit/storage_factory_spec.rb
|
263
300
|
- spec/unit/storage_proxy_spec.rb
|
264
301
|
- spec/unit/translator_spec.rb
|