mongoid-ancestry 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +3 -0
- data/Gemfile.lock +75 -0
- data/Guardfile +10 -0
- data/MIT-LICENSE +20 -0
- data/README.md +225 -0
- data/Rakefile +42 -0
- data/VERSION +1 -0
- data/init.rb +1 -0
- data/install.rb +1 -0
- data/lib/mongoid/ancestry/class_methods.rb +233 -0
- data/lib/mongoid/ancestry/exceptions.rb +6 -0
- data/lib/mongoid/ancestry/instance_methods.rb +246 -0
- data/lib/mongoid/ancestry.rb +14 -0
- data/log/.gitkeep +0 -0
- data/mongoid-ancestry.gemspec +125 -0
- data/spec/mongoid/ancestry/class_methods_spec.rb +305 -0
- data/spec/mongoid/ancestry/instance_methods_spec.rb +266 -0
- data/spec/mongoid/ancestry_spec.rb +117 -0
- data/spec/spec_helper.rb +20 -0
- data/spec/support/models.rb +44 -0
- metadata +310 -0
metadata
ADDED
@@ -0,0 +1,310 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mongoid-ancestry
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Stefan Kroes
|
9
|
+
- Anton Orel
|
10
|
+
autorequire:
|
11
|
+
bindir: bin
|
12
|
+
cert_chain: []
|
13
|
+
date: 2011-04-16 00:00:00.000000000 +04:00
|
14
|
+
default_executable:
|
15
|
+
dependencies:
|
16
|
+
- !ruby/object:Gem::Dependency
|
17
|
+
name: mongoid-ancestry
|
18
|
+
requirement: &14616680 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ! '>='
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '0'
|
24
|
+
type: :runtime
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: *14616680
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: &14615720 !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ~>
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '2.5'
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: *14615720
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
name: bundler
|
40
|
+
requirement: &14615060 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '1.0'
|
46
|
+
type: :development
|
47
|
+
prerelease: false
|
48
|
+
version_requirements: *14615060
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: guard-rspec
|
51
|
+
requirement: &14614380 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ~>
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0.2'
|
57
|
+
type: :development
|
58
|
+
prerelease: false
|
59
|
+
version_requirements: *14614380
|
60
|
+
- !ruby/object:Gem::Dependency
|
61
|
+
name: libnotify
|
62
|
+
requirement: &14613640 !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ~>
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0.3'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: *14613640
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: rb-inotify
|
73
|
+
requirement: &14610600 !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ~>
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0.8'
|
79
|
+
type: :development
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: *14610600
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: fuubar
|
84
|
+
requirement: &14609780 !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ~>
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.0.4
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: *14609780
|
93
|
+
- !ruby/object:Gem::Dependency
|
94
|
+
name: rspec
|
95
|
+
requirement: &14608880 !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
97
|
+
requirements:
|
98
|
+
- - ~>
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '2.5'
|
101
|
+
type: :development
|
102
|
+
prerelease: false
|
103
|
+
version_requirements: *14608880
|
104
|
+
- !ruby/object:Gem::Dependency
|
105
|
+
name: bundler
|
106
|
+
requirement: &14608080 !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ~>
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '1.0'
|
112
|
+
type: :development
|
113
|
+
prerelease: false
|
114
|
+
version_requirements: *14608080
|
115
|
+
- !ruby/object:Gem::Dependency
|
116
|
+
name: guard-rspec
|
117
|
+
requirement: &14607000 !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
119
|
+
requirements:
|
120
|
+
- - ~>
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '0.2'
|
123
|
+
type: :development
|
124
|
+
prerelease: false
|
125
|
+
version_requirements: *14607000
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: libnotify
|
128
|
+
requirement: &14606100 !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ~>
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0.3'
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: *14606100
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: rb-inotify
|
139
|
+
requirement: &14605080 !ruby/object:Gem::Requirement
|
140
|
+
none: false
|
141
|
+
requirements:
|
142
|
+
- - ~>
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0.8'
|
145
|
+
type: :development
|
146
|
+
prerelease: false
|
147
|
+
version_requirements: *14605080
|
148
|
+
- !ruby/object:Gem::Dependency
|
149
|
+
name: fuubar
|
150
|
+
requirement: &14604300 !ruby/object:Gem::Requirement
|
151
|
+
none: false
|
152
|
+
requirements:
|
153
|
+
- - ~>
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: 0.0.4
|
156
|
+
type: :development
|
157
|
+
prerelease: false
|
158
|
+
version_requirements: *14604300
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: mongoid
|
161
|
+
requirement: &14603580 !ruby/object:Gem::Requirement
|
162
|
+
none: false
|
163
|
+
requirements:
|
164
|
+
- - ~>
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '2.0'
|
167
|
+
type: :runtime
|
168
|
+
prerelease: false
|
169
|
+
version_requirements: *14603580
|
170
|
+
- !ruby/object:Gem::Dependency
|
171
|
+
name: bson_ext
|
172
|
+
requirement: &14598940 !ruby/object:Gem::Requirement
|
173
|
+
none: false
|
174
|
+
requirements:
|
175
|
+
- - ~>
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: '1.3'
|
178
|
+
type: :runtime
|
179
|
+
prerelease: false
|
180
|
+
version_requirements: *14598940
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: rspec
|
183
|
+
requirement: &14598160 !ruby/object:Gem::Requirement
|
184
|
+
none: false
|
185
|
+
requirements:
|
186
|
+
- - ~>
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '2.5'
|
189
|
+
type: :development
|
190
|
+
prerelease: false
|
191
|
+
version_requirements: *14598160
|
192
|
+
- !ruby/object:Gem::Dependency
|
193
|
+
name: bundler
|
194
|
+
requirement: &14597460 !ruby/object:Gem::Requirement
|
195
|
+
none: false
|
196
|
+
requirements:
|
197
|
+
- - ~>
|
198
|
+
- !ruby/object:Gem::Version
|
199
|
+
version: '1.0'
|
200
|
+
type: :development
|
201
|
+
prerelease: false
|
202
|
+
version_requirements: *14597460
|
203
|
+
- !ruby/object:Gem::Dependency
|
204
|
+
name: guard-rspec
|
205
|
+
requirement: &14596700 !ruby/object:Gem::Requirement
|
206
|
+
none: false
|
207
|
+
requirements:
|
208
|
+
- - ~>
|
209
|
+
- !ruby/object:Gem::Version
|
210
|
+
version: '0.2'
|
211
|
+
type: :development
|
212
|
+
prerelease: false
|
213
|
+
version_requirements: *14596700
|
214
|
+
- !ruby/object:Gem::Dependency
|
215
|
+
name: libnotify
|
216
|
+
requirement: &14595820 !ruby/object:Gem::Requirement
|
217
|
+
none: false
|
218
|
+
requirements:
|
219
|
+
- - ~>
|
220
|
+
- !ruby/object:Gem::Version
|
221
|
+
version: '0.3'
|
222
|
+
type: :development
|
223
|
+
prerelease: false
|
224
|
+
version_requirements: *14595820
|
225
|
+
- !ruby/object:Gem::Dependency
|
226
|
+
name: rb-inotify
|
227
|
+
requirement: &14594360 !ruby/object:Gem::Requirement
|
228
|
+
none: false
|
229
|
+
requirements:
|
230
|
+
- - ~>
|
231
|
+
- !ruby/object:Gem::Version
|
232
|
+
version: '0.8'
|
233
|
+
type: :development
|
234
|
+
prerelease: false
|
235
|
+
version_requirements: *14594360
|
236
|
+
- !ruby/object:Gem::Dependency
|
237
|
+
name: fuubar
|
238
|
+
requirement: &14593540 !ruby/object:Gem::Requirement
|
239
|
+
none: false
|
240
|
+
requirements:
|
241
|
+
- - ~>
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
version: 0.0.4
|
244
|
+
type: :development
|
245
|
+
prerelease: false
|
246
|
+
version_requirements: *14593540
|
247
|
+
description: Organise Mongoid model into a tree structure
|
248
|
+
email: eagle.anton@gmail.com
|
249
|
+
executables: []
|
250
|
+
extensions: []
|
251
|
+
extra_rdoc_files:
|
252
|
+
- README.md
|
253
|
+
files:
|
254
|
+
- Gemfile
|
255
|
+
- Gemfile.lock
|
256
|
+
- Guardfile
|
257
|
+
- MIT-LICENSE
|
258
|
+
- README.md
|
259
|
+
- Rakefile
|
260
|
+
- VERSION
|
261
|
+
- init.rb
|
262
|
+
- install.rb
|
263
|
+
- lib/mongoid/ancestry.rb
|
264
|
+
- lib/mongoid/ancestry/class_methods.rb
|
265
|
+
- lib/mongoid/ancestry/exceptions.rb
|
266
|
+
- lib/mongoid/ancestry/instance_methods.rb
|
267
|
+
- log/.gitkeep
|
268
|
+
- mongoid-ancestry.gemspec
|
269
|
+
- spec/mongoid/ancestry/class_methods_spec.rb
|
270
|
+
- spec/mongoid/ancestry/instance_methods_spec.rb
|
271
|
+
- spec/mongoid/ancestry_spec.rb
|
272
|
+
- spec/spec_helper.rb
|
273
|
+
- spec/support/models.rb
|
274
|
+
has_rdoc: true
|
275
|
+
homepage: http://github.com/skyeagle/mongoid-ancestry
|
276
|
+
licenses:
|
277
|
+
- MIT
|
278
|
+
post_install_message:
|
279
|
+
rdoc_options: []
|
280
|
+
require_paths:
|
281
|
+
- lib
|
282
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
283
|
+
none: false
|
284
|
+
requirements:
|
285
|
+
- - ! '>='
|
286
|
+
- !ruby/object:Gem::Version
|
287
|
+
version: '0'
|
288
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
289
|
+
none: false
|
290
|
+
requirements:
|
291
|
+
- - ! '>='
|
292
|
+
- !ruby/object:Gem::Version
|
293
|
+
version: '0'
|
294
|
+
requirements: []
|
295
|
+
rubyforge_project:
|
296
|
+
rubygems_version: 1.5.2
|
297
|
+
signing_key:
|
298
|
+
specification_version: 3
|
299
|
+
summary: ! '''Ancestry allows the records of a Mongoid model to be organised in a
|
300
|
+
tree structure, using a single, intuitively formatted database field. It exposes
|
301
|
+
all the standard tree structure relations (ancestors, parent, root, children, siblings,
|
302
|
+
descendants) and all of them can be fetched in a single query. Additional features
|
303
|
+
are named_scopes, integrity checking, integrity restoration, arrangement of (sub)tree
|
304
|
+
into hashes and different strategies for dealing with orphaned records.'''
|
305
|
+
test_files:
|
306
|
+
- spec/mongoid/ancestry/class_methods_spec.rb
|
307
|
+
- spec/mongoid/ancestry/instance_methods_spec.rb
|
308
|
+
- spec/mongoid/ancestry_spec.rb
|
309
|
+
- spec/spec_helper.rb
|
310
|
+
- spec/support/models.rb
|