awesome_nested_set 3.0.0.rc.3 → 3.0.0.rc.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +2 -0
- data/README.md +19 -0
- data/lib/awesome_nested_set/awesome_nested_set.rb +8 -2
- data/lib/awesome_nested_set/columns.rb +9 -1
- data/lib/awesome_nested_set/helper.rb +2 -2
- data/lib/awesome_nested_set/model.rb +10 -6
- data/lib/awesome_nested_set/model/prunable.rb +9 -2
- data/lib/awesome_nested_set/model/rebuildable.rb +3 -1
- data/lib/awesome_nested_set/model/relatable.rb +1 -1
- data/lib/awesome_nested_set/model/validatable.rb +1 -0
- data/lib/awesome_nested_set/move.rb +24 -10
- data/lib/awesome_nested_set/set_validator.rb +3 -3
- data/lib/awesome_nested_set/tree.rb +1 -1
- data/lib/awesome_nested_set/version.rb +1 -1
- metadata +25 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b906a0322b3f2d297483d2ba0b15ff50388291a6
|
4
|
+
data.tar.gz: 350093eb665d7ae7c23de6338d0f1793c11d8e8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e90aeca23cb8729cccbf9b87f47176363fc009797eb0ec929823093ebdcd2a4c7dfd590bb2aee131defb15b0de8780a32d5ade6ad0e8de6c2897a7522c5ae84
|
7
|
+
data.tar.gz: c09e4c671b3c45e7092ccde2c5c9f0e865fc6748cc85433350f342b3e5f83cf0737459ff6f15cabc989afb78df53198a5beba908c4cf5a9afd7672e75e76491a
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
* Support Rails 4.1 [Micah Geisel]
|
2
|
+
* Support dependent: restrict_with_error [Tiago Moraes]
|
1
3
|
* Added information to the README regarding indexes to be added for performance [bdarfler]
|
2
4
|
* Modified associate_parents to add child objects to the parent#children collection [Tiago Moraes]
|
3
5
|
|
data/README.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# AwesomeNestedSet
|
2
2
|
|
3
|
+
[![Build Status][Build Status Image]][Build Status]
|
4
|
+
[Build Status Image]: https://travis-ci.org/collectiveidea/awesome_nested_set.png?branch=master
|
5
|
+
[Build Status]: https://travis-ci.org/collectiveidea/awesome_nested_set
|
6
|
+
|
3
7
|
Awesome Nested Set is an implementation of the nested set pattern for ActiveRecord models.
|
4
8
|
It is a replacement for acts_as_nested_set and BetterNestedSet, but more awesome.
|
5
9
|
|
@@ -53,6 +57,21 @@ end
|
|
53
57
|
|
54
58
|
Run `rake rdoc` to generate the API docs and see [CollectiveIdea::Acts::NestedSet](lib/awesome_nested_set/awesome_nested_set.rb) for more information.
|
55
59
|
|
60
|
+
## Options
|
61
|
+
|
62
|
+
You can pass various options to `acts_as_nested_set` macro. Configuration options are:
|
63
|
+
|
64
|
+
* `parent_column`: specifies the column name to use for keeping the position integer (default: parent_id)
|
65
|
+
* `left_column`: column name for left boundry data (default: lft)
|
66
|
+
* `right_column`: column name for right boundry data (default: rgt)
|
67
|
+
* `depth_column`: column name for the depth data default (default: depth)
|
68
|
+
* `scope`: restricts what is to be considered a list. Given a symbol, it'll attach “_id” (if it hasn't been already) and use that as the foreign key restriction. You can also pass an array to scope by multiple attributes. Example: `acts_as_nested_set :scope => [:notable_id, :notable_type]`
|
69
|
+
* `dependent`: behavior for cascading destroy. If set to :destroy, all the child objects are destroyed alongside this object by calling their destroy method. If set to :delete_all (default), all the child objects are deleted without calling their destroy method.
|
70
|
+
* `counter_cache`: adds a counter cache for the number of children. defaults to false. Example: `acts_as_nested_set :counter_cache => :children_count`
|
71
|
+
* `order_column`: on which column to do sorting, by default it is the left_column_name. Example: `acts_as_nested_set :order_column => :position`
|
72
|
+
|
73
|
+
See [CollectiveIdea::Acts::NestedSet::Model::ClassMethods](/lib/awesome_nested_set/model.rb#L26) for a list of class methods and [CollectiveIdea::Acts::NestedSet::Model](lib/awesome_nested_set/model.rb#L13) for a list of instance methods added to acts_as_nested_set models
|
74
|
+
|
56
75
|
## Indexes
|
57
76
|
|
58
77
|
It is highly recommended that you add an index to the `rgt` column on your models. Every insertion requires finding the next `rgt` value to use and this can be slow for large tables without an index. It is probably best to index the other fields as well (`parent_id`, `lft`, `depth`).
|
@@ -24,6 +24,7 @@ module CollectiveIdea #:nodoc:
|
|
24
24
|
# Configuration options are:
|
25
25
|
#
|
26
26
|
# * +:parent_column+ - specifies the column name to use for keeping the position integer (default: parent_id)
|
27
|
+
# * +:primary_column+ - specifies the column name to use as the inverse of the parent column (default: id)
|
27
28
|
# * +:left_column+ - column name for left boundry data, default "lft"
|
28
29
|
# * +:right_column+ - column name for right boundry data, default "rgt"
|
29
30
|
# * +:depth_column+ - column name for the depth data, default "depth"
|
@@ -75,6 +76,7 @@ module CollectiveIdea #:nodoc:
|
|
75
76
|
has_many_children_options = {
|
76
77
|
:class_name => self.base_class.to_s,
|
77
78
|
:foreign_key => parent_column_name,
|
79
|
+
:primary_key => primary_column_name,
|
78
80
|
:inverse_of => (:parent unless acts_as_nested_set_options[:polymorphic]),
|
79
81
|
}
|
80
82
|
|
@@ -92,20 +94,24 @@ module CollectiveIdea #:nodoc:
|
|
92
94
|
def acts_as_nested_set_relate_parent!
|
93
95
|
belongs_to :parent, :class_name => self.base_class.to_s,
|
94
96
|
:foreign_key => parent_column_name,
|
97
|
+
:primary_key => primary_column_name,
|
95
98
|
:counter_cache => acts_as_nested_set_options[:counter_cache],
|
96
99
|
:inverse_of => (:children unless acts_as_nested_set_options[:polymorphic]),
|
97
|
-
:polymorphic => acts_as_nested_set_options[:polymorphic]
|
100
|
+
:polymorphic => acts_as_nested_set_options[:polymorphic],
|
101
|
+
:touch => acts_as_nested_set_options[:touch]
|
98
102
|
end
|
99
103
|
|
100
104
|
def acts_as_nested_set_default_options
|
101
105
|
{
|
102
106
|
:parent_column => 'parent_id',
|
107
|
+
:primary_column => 'id',
|
103
108
|
:left_column => 'lft',
|
104
109
|
:right_column => 'rgt',
|
105
110
|
:depth_column => 'depth',
|
106
111
|
:dependent => :delete_all, # or :destroy
|
107
112
|
:polymorphic => false,
|
108
|
-
:counter_cache => false
|
113
|
+
:counter_cache => false,
|
114
|
+
:touch => false
|
109
115
|
}.freeze
|
110
116
|
end
|
111
117
|
|
@@ -19,6 +19,10 @@ module CollectiveIdea #:nodoc:
|
|
19
19
|
acts_as_nested_set_options[:parent_column]
|
20
20
|
end
|
21
21
|
|
22
|
+
def primary_column_name
|
23
|
+
acts_as_nested_set_options[:primary_column]
|
24
|
+
end
|
25
|
+
|
22
26
|
def order_column
|
23
27
|
acts_as_nested_set_options[:order_column] || left_column_name
|
24
28
|
end
|
@@ -39,6 +43,10 @@ module CollectiveIdea #:nodoc:
|
|
39
43
|
ActiveRecord::Base.connection.quote_column_name(depth_column_name)
|
40
44
|
end
|
41
45
|
|
46
|
+
def quoted_primary_column_name
|
47
|
+
ActiveRecord::Base.connection.quote_column_name(primary_column_name)
|
48
|
+
end
|
49
|
+
|
42
50
|
def quoted_parent_column_name
|
43
51
|
ActiveRecord::Base.connection.quote_column_name(parent_column_name)
|
44
52
|
end
|
@@ -52,7 +60,7 @@ module CollectiveIdea #:nodoc:
|
|
52
60
|
end
|
53
61
|
|
54
62
|
def quoted_primary_key_column_full_name
|
55
|
-
"#{quoted_table_name}.#{
|
63
|
+
"#{quoted_table_name}.#{quoted_primary_column_name}"
|
56
64
|
end
|
57
65
|
|
58
66
|
def quoted_left_column_full_name
|
@@ -25,14 +25,14 @@ module CollectiveIdea #:nodoc:
|
|
25
25
|
if class_or_item.is_a? Array
|
26
26
|
items = class_or_item.reject { |e| !e.root? }
|
27
27
|
else
|
28
|
-
class_or_item = class_or_item.roots if class_or_item.respond_to?(:
|
28
|
+
class_or_item = class_or_item.roots if class_or_item.respond_to?(:scope)
|
29
29
|
items = Array(class_or_item)
|
30
30
|
end
|
31
31
|
result = []
|
32
32
|
items.each do |root|
|
33
33
|
result += root.class.associate_parents(root.self_and_descendants).map do |i|
|
34
34
|
if mover.nil? || mover.new_record? || mover.move_possible?(i)
|
35
|
-
[yield(i), i.
|
35
|
+
[yield(i), i.primary_id]
|
36
36
|
end
|
37
37
|
end.compact
|
38
38
|
end
|
@@ -27,7 +27,7 @@ module CollectiveIdea #:nodoc:
|
|
27
27
|
def associate_parents(objects)
|
28
28
|
return objects unless objects.all? {|o| o.respond_to?(:association)}
|
29
29
|
|
30
|
-
id_indexed = objects.index_by(
|
30
|
+
id_indexed = objects.index_by(&primary_column_name.to_sym)
|
31
31
|
objects.each do |object|
|
32
32
|
association = object.association(:parent)
|
33
33
|
parent = id_indexed[object.parent_id]
|
@@ -85,7 +85,7 @@ module CollectiveIdea #:nodoc:
|
|
85
85
|
end
|
86
86
|
|
87
87
|
def primary_key_scope(id)
|
88
|
-
where arel_table[
|
88
|
+
where arel_table[primary_column_name].eq(id)
|
89
89
|
end
|
90
90
|
|
91
91
|
def root
|
@@ -106,6 +106,10 @@ module CollectiveIdea #:nodoc:
|
|
106
106
|
target[parent_column_name]
|
107
107
|
end
|
108
108
|
|
109
|
+
def primary_id(target = self)
|
110
|
+
target[primary_column_name]
|
111
|
+
end
|
112
|
+
|
109
113
|
# Value of the left column
|
110
114
|
def left(target = self)
|
111
115
|
target[left_column_name]
|
@@ -146,7 +150,7 @@ module CollectiveIdea #:nodoc:
|
|
146
150
|
|
147
151
|
def to_text
|
148
152
|
self_and_descendants.map do |node|
|
149
|
-
"#{'*'*(node.level+1)} #{node.
|
153
|
+
"#{'*'*(node.level+1)} #{node.primary_id} #{node.to_s} (#{node.parent_id}, #{node.left}, #{node.right})"
|
150
154
|
end.join("\n")
|
151
155
|
end
|
152
156
|
|
@@ -154,7 +158,7 @@ module CollectiveIdea #:nodoc:
|
|
154
158
|
|
155
159
|
def without_self(scope)
|
156
160
|
return scope if new_record?
|
157
|
-
scope.where(["#{self.class.quoted_table_name}.#{self.class.
|
161
|
+
scope.where(["#{self.class.quoted_table_name}.#{self.class.quoted_primary_column_name} != ?", self.primary_id])
|
158
162
|
end
|
159
163
|
|
160
164
|
def store_new_parent
|
@@ -186,7 +190,7 @@ module CollectiveIdea #:nodoc:
|
|
186
190
|
|
187
191
|
in_tenacious_transaction do
|
188
192
|
reload
|
189
|
-
nested_set_scope.primary_key_scope(
|
193
|
+
nested_set_scope.primary_key_scope(primary_id).
|
190
194
|
update_all(["#{quoted_depth_column_name} = ?", level])
|
191
195
|
end
|
192
196
|
self[depth_column_name] = self.level
|
@@ -210,7 +214,7 @@ module CollectiveIdea #:nodoc:
|
|
210
214
|
if target.is_a? self.class.base_class
|
211
215
|
target.reload
|
212
216
|
elsif position != :root
|
213
|
-
nested_set_scope.
|
217
|
+
nested_set_scope.where(primary_column_name => target).first!
|
214
218
|
end
|
215
219
|
end
|
216
220
|
end
|
@@ -12,9 +12,9 @@ module CollectiveIdea #:nodoc:
|
|
12
12
|
in_tenacious_transaction do
|
13
13
|
reload_nested_set
|
14
14
|
# select the rows in the model that extend past the deletion point and apply a lock
|
15
|
-
nested_set_scope.right_of(left).select(
|
15
|
+
nested_set_scope.right_of(left).select(primary_id).lock(true)
|
16
16
|
|
17
|
-
destroy_or_delete_descendants
|
17
|
+
return false unless destroy_or_delete_descendants
|
18
18
|
|
19
19
|
# update lefts and rights for remaining nodes
|
20
20
|
update_siblings_for_remaining_nodes
|
@@ -32,6 +32,13 @@ module CollectiveIdea #:nodoc:
|
|
32
32
|
end
|
33
33
|
elsif acts_as_nested_set_options[:dependent] == :restrict_with_exception
|
34
34
|
raise ActiveRecord::DeleteRestrictionError.new(:children) unless leaf?
|
35
|
+
elsif acts_as_nested_set_options[:dependent] == :restrict_with_error
|
36
|
+
unless leaf?
|
37
|
+
record = self.class.human_attribute_name(:children).downcase
|
38
|
+
errors.add(:base, :"restrict_dependent_destroy.many", record: record)
|
39
|
+
return false
|
40
|
+
end
|
41
|
+
return true
|
35
42
|
else
|
36
43
|
descendants.delete_all
|
37
44
|
end
|
@@ -22,7 +22,9 @@ module CollectiveIdea
|
|
22
22
|
if acts_as_nested_set_options[:scope]
|
23
23
|
scope = proc {|node|
|
24
24
|
scope_column_names.inject("") {|str, column_name|
|
25
|
-
|
25
|
+
column_value = node.send(column_name)
|
26
|
+
cond = column_value.nil? ? "IS NULL" : "= #{connection.quote(column_value)}"
|
27
|
+
str << "AND #{connection.quote_column_name(column_name)} #{cond} "
|
26
28
|
}
|
27
29
|
}
|
28
30
|
end
|
@@ -86,7 +86,7 @@ module CollectiveIdea
|
|
86
86
|
def root
|
87
87
|
return self_and_ancestors.children_of(nil).first if persisted?
|
88
88
|
|
89
|
-
if parent_id && current_parent = nested_set_scope.
|
89
|
+
if parent_id && current_parent = nested_set_scope.where(primary_column_name => parent_id).first!
|
90
90
|
current_parent.root
|
91
91
|
else
|
92
92
|
self
|
@@ -20,6 +20,7 @@ module CollectiveIdea
|
|
20
20
|
select("#{scope_string}#{column}, COUNT(#{column})").
|
21
21
|
group("#{scope_string}#{column}", quoted_primary_key_column_full_name).
|
22
22
|
having("COUNT(#{column}) > 1").
|
23
|
+
order(quoted_primary_key_column_full_name).
|
23
24
|
first.nil?
|
24
25
|
end
|
25
26
|
end
|
@@ -24,8 +24,9 @@ module CollectiveIdea #:nodoc:
|
|
24
24
|
|
25
25
|
lock_nodes_between! a, d
|
26
26
|
|
27
|
-
nested_set_scope.where(where_statement(a, d)).
|
28
|
-
|
27
|
+
nested_set_scope.where(where_statement(a, d)).update_all(
|
28
|
+
conditions(a, b, c, d)
|
29
|
+
)
|
29
30
|
end
|
30
31
|
|
31
32
|
private
|
@@ -33,6 +34,7 @@ module CollectiveIdea #:nodoc:
|
|
33
34
|
delegate :left, :right, :left_column_name, :right_column_name,
|
34
35
|
:quoted_left_column_name, :quoted_right_column_name,
|
35
36
|
:quoted_parent_column_name, :parent_column_name, :nested_set_scope,
|
37
|
+
:primary_column_name, :quoted_primary_column_name, :primary_id,
|
36
38
|
:to => :instance
|
37
39
|
|
38
40
|
delegate :arel_table, :class, :to => :instance, :prefix => true
|
@@ -44,11 +46,23 @@ module CollectiveIdea #:nodoc:
|
|
44
46
|
end
|
45
47
|
|
46
48
|
def conditions(a, b, c, d)
|
49
|
+
_conditions = case_condition_for_direction(:quoted_left_column_name) +
|
50
|
+
case_condition_for_direction(:quoted_right_column_name) +
|
51
|
+
case_condition_for_parent
|
52
|
+
|
53
|
+
# We want the record to be 'touched' if it timestamps.
|
54
|
+
if @instance.respond_to?(:updated_at)
|
55
|
+
_conditions << ", updated_at = :timestamp"
|
56
|
+
end
|
57
|
+
|
47
58
|
[
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
59
|
+
_conditions,
|
60
|
+
{
|
61
|
+
:a => a, :b => b, :c => c, :d => d,
|
62
|
+
:primary_id => instance.primary_id,
|
63
|
+
:new_parent_id => new_parent_id,
|
64
|
+
:timestamp => Time.now.utc
|
65
|
+
}
|
52
66
|
]
|
53
67
|
end
|
54
68
|
|
@@ -64,23 +78,23 @@ module CollectiveIdea #:nodoc:
|
|
64
78
|
|
65
79
|
def case_condition_for_parent
|
66
80
|
"#{quoted_parent_column_name} = CASE " +
|
67
|
-
"WHEN #{
|
81
|
+
"WHEN #{quoted_primary_column_name} = :primary_id THEN :new_parent_id " +
|
68
82
|
"ELSE #{quoted_parent_column_name} END"
|
69
83
|
end
|
70
84
|
|
71
85
|
def lock_nodes_between!(left_bound, right_bound)
|
72
86
|
# select the rows in the model between a and d, and apply a lock
|
73
87
|
instance_base_class.right_of(left_bound).left_of_right_side(right_bound).
|
74
|
-
select(
|
88
|
+
select(primary_column_name).lock(true)
|
75
89
|
end
|
76
90
|
|
77
91
|
def root
|
78
92
|
position == :root
|
79
93
|
end
|
80
94
|
|
81
|
-
def
|
95
|
+
def new_parent_id
|
82
96
|
case position
|
83
|
-
when :child then target.
|
97
|
+
when :child then target.primary_id
|
84
98
|
when :root then nil
|
85
99
|
else target[parent_column_name]
|
86
100
|
end
|
@@ -18,8 +18,8 @@ module CollectiveIdea #:nodoc:
|
|
18
18
|
attr_reader :model, :parent
|
19
19
|
attr_accessor :scope
|
20
20
|
|
21
|
-
delegate :parent_column_name, :primary_key, :left_column_name, :right_column_name, :arel_table,
|
22
|
-
:quoted_table_name, :quoted_parent_column_full_name, :quoted_left_column_full_name, :quoted_right_column_full_name, :quoted_left_column_name, :quoted_right_column_name,
|
21
|
+
delegate :parent_column_name, :primary_column_name, :primary_key, :left_column_name, :right_column_name, :arel_table,
|
22
|
+
:quoted_table_name, :quoted_parent_column_full_name, :quoted_left_column_full_name, :quoted_right_column_full_name, :quoted_left_column_name, :quoted_right_column_name, :quoted_primary_column_name,
|
23
23
|
:to => :model
|
24
24
|
|
25
25
|
def query
|
@@ -28,7 +28,7 @@ module CollectiveIdea #:nodoc:
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def join_scope
|
31
|
-
join_arel = arel_table.join(parent, Arel::Nodes::OuterJoin).on(parent[
|
31
|
+
join_arel = arel_table.join(parent, Arel::Nodes::OuterJoin).on(parent[primary_column_name].eq(arel_table[parent_column_name]))
|
32
32
|
self.scope = scope.joins(join_arel.join_sql)
|
33
33
|
end
|
34
34
|
|
@@ -42,7 +42,7 @@ module CollectiveIdea #:nodoc:
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def node_children(node)
|
45
|
-
model.where(["#{quoted_parent_column_full_name} = ? #{scope_for_rebuild.call(node)}", node]).
|
45
|
+
model.where(["#{quoted_parent_column_full_name} = ? #{scope_for_rebuild.call(node)}", node.primary_id]).
|
46
46
|
order(order_for_rebuild)
|
47
47
|
end
|
48
48
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awesome_nested_set
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.rc.
|
4
|
+
version: 3.0.0.rc.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Keepers
|
@@ -10,82 +10,82 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2014-04-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ">="
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: 4.0.0
|
22
|
-
- - <
|
22
|
+
- - "<"
|
23
23
|
- !ruby/object:Gem::Version
|
24
24
|
version: '5'
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
27
|
version_requirements: !ruby/object:Gem::Requirement
|
28
28
|
requirements:
|
29
|
-
- -
|
29
|
+
- - ">="
|
30
30
|
- !ruby/object:Gem::Version
|
31
31
|
version: 4.0.0
|
32
|
-
- - <
|
32
|
+
- - "<"
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '5'
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: rspec-rails
|
37
37
|
requirement: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - ~>
|
39
|
+
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '2.12'
|
42
42
|
type: :development
|
43
43
|
prerelease: false
|
44
44
|
version_requirements: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - ~>
|
46
|
+
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '2.12'
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: rake
|
51
51
|
requirement: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- - ~>
|
53
|
+
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '10'
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
58
|
version_requirements: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- - ~>
|
60
|
+
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '10'
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
64
|
name: combustion
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: 0.3.3
|
70
70
|
type: :development
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: 0.3.3
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
78
|
name: database_cleaner
|
79
79
|
requirement: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- -
|
81
|
+
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
type: :development
|
85
85
|
prerelease: false
|
86
86
|
version_requirements: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- -
|
88
|
+
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
description: An awesome nested set implementation for Active Record
|
@@ -95,50 +95,50 @@ extensions: []
|
|
95
95
|
extra_rdoc_files:
|
96
96
|
- README.md
|
97
97
|
files:
|
98
|
+
- CHANGELOG
|
99
|
+
- MIT-LICENSE
|
100
|
+
- README.md
|
101
|
+
- lib/awesome_nested_set.rb
|
98
102
|
- lib/awesome_nested_set/awesome_nested_set.rb
|
99
103
|
- lib/awesome_nested_set/columns.rb
|
100
104
|
- lib/awesome_nested_set/helper.rb
|
101
105
|
- lib/awesome_nested_set/iterator.rb
|
106
|
+
- lib/awesome_nested_set/model.rb
|
102
107
|
- lib/awesome_nested_set/model/movable.rb
|
103
108
|
- lib/awesome_nested_set/model/prunable.rb
|
104
109
|
- lib/awesome_nested_set/model/rebuildable.rb
|
105
110
|
- lib/awesome_nested_set/model/relatable.rb
|
106
111
|
- lib/awesome_nested_set/model/transactable.rb
|
107
112
|
- lib/awesome_nested_set/model/validatable.rb
|
108
|
-
- lib/awesome_nested_set/model.rb
|
109
113
|
- lib/awesome_nested_set/move.rb
|
110
114
|
- lib/awesome_nested_set/set_validator.rb
|
111
115
|
- lib/awesome_nested_set/tree.rb
|
112
116
|
- lib/awesome_nested_set/version.rb
|
113
|
-
- lib/awesome_nested_set.rb
|
114
|
-
- MIT-LICENSE
|
115
|
-
- README.md
|
116
|
-
- CHANGELOG
|
117
117
|
homepage: http://github.com/collectiveidea/awesome_nested_set
|
118
118
|
licenses:
|
119
119
|
- MIT
|
120
120
|
metadata: {}
|
121
121
|
post_install_message:
|
122
122
|
rdoc_options:
|
123
|
-
- --main
|
123
|
+
- "--main"
|
124
124
|
- README.md
|
125
|
-
- --inline-source
|
126
|
-
- --line-numbers
|
125
|
+
- "--inline-source"
|
126
|
+
- "--line-numbers"
|
127
127
|
require_paths:
|
128
128
|
- lib
|
129
129
|
required_ruby_version: !ruby/object:Gem::Requirement
|
130
130
|
requirements:
|
131
|
-
- -
|
131
|
+
- - ">="
|
132
132
|
- !ruby/object:Gem::Version
|
133
133
|
version: '0'
|
134
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ">"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: 1.3.1
|
139
139
|
requirements: []
|
140
140
|
rubyforge_project:
|
141
|
-
rubygems_version: 2.
|
141
|
+
rubygems_version: 2.2.2
|
142
142
|
signing_key:
|
143
143
|
specification_version: 4
|
144
144
|
summary: An awesome nested set implementation for Active Record
|