arboreal 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +20 -0
- data/README.rdoc +7 -0
- data/Rakefile +9 -0
- data/lib/arboreal.rb +4 -0
- data/lib/arboreal/active_record_extensions.rb +31 -0
- data/lib/arboreal/class_methods.rb +34 -0
- data/lib/arboreal/instance_methods.rb +94 -0
- data/lib/arboreal/version.rb +3 -0
- data/spec/arboreal_spec.rb +250 -0
- data/spec/spec_helper.rb +32 -0
- data/spec/test.log +8531 -0
- data/spec/test.sqlite +0 -0
- metadata +92 -0
data/spec/test.sqlite
ADDED
Binary file
|
metadata
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: arboreal
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mike Williams
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2010-04-01 00:00:00 +11:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: activerecord
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 2.3.0
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rspec
|
27
|
+
type: :development
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.2.9
|
34
|
+
version:
|
35
|
+
description: |
|
36
|
+
Arboreal is yet another extension to ActiveRecord to support tree-shaped data structures.
|
37
|
+
|
38
|
+
Internally, Arboreal maintains a computed "ancestry_string" column, which caches the path from the root of a tree to each node, allowing efficient retrieval of both ancestors and descendants.
|
39
|
+
|
40
|
+
Arboreal surfaces relationships within the tree like +children+, +ancestors+, +descendants+, and +siblings+ as scopes, so that additional filtering/pagination can be performed.
|
41
|
+
|
42
|
+
email: mdub@dogbiscuit.org
|
43
|
+
executables: []
|
44
|
+
|
45
|
+
extensions: []
|
46
|
+
|
47
|
+
extra_rdoc_files:
|
48
|
+
- README.rdoc
|
49
|
+
- LICENSE
|
50
|
+
files:
|
51
|
+
- lib/arboreal/active_record_extensions.rb
|
52
|
+
- lib/arboreal/class_methods.rb
|
53
|
+
- lib/arboreal/instance_methods.rb
|
54
|
+
- lib/arboreal/version.rb
|
55
|
+
- lib/arboreal.rb
|
56
|
+
- spec/arboreal_spec.rb
|
57
|
+
- spec/spec_helper.rb
|
58
|
+
- spec/test.log
|
59
|
+
- spec/test.sqlite
|
60
|
+
- Rakefile
|
61
|
+
- README.rdoc
|
62
|
+
- LICENSE
|
63
|
+
has_rdoc: true
|
64
|
+
homepage: http://github.com/mdub/arboreal
|
65
|
+
licenses: []
|
66
|
+
|
67
|
+
post_install_message:
|
68
|
+
rdoc_options: []
|
69
|
+
|
70
|
+
require_paths:
|
71
|
+
- lib
|
72
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 1.8.7
|
77
|
+
version:
|
78
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: "0"
|
83
|
+
version:
|
84
|
+
requirements: []
|
85
|
+
|
86
|
+
rubyforge_project:
|
87
|
+
rubygems_version: 1.3.5
|
88
|
+
signing_key:
|
89
|
+
specification_version: 3
|
90
|
+
summary: Efficient tree structures for ActiveRecord
|
91
|
+
test_files: []
|
92
|
+
|