collectiveidea-awesome_nested_set 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.autotest +13 -0
- data/.gitignore +5 -0
- data/README.rdoc +10 -14
- data/Rakefile +18 -10
- data/VERSION +1 -0
- data/awesome_nested_set.gemspec +68 -0
- data/lib/awesome_nested_set.rb +69 -46
- data/lib/awesome_nested_set/compatability.rb +2 -2
- data/lib/awesome_nested_set/helper.rb +2 -3
- data/lib/awesome_nested_set/named_scope.rb +4 -4
- data/test/awesome_nested_set_test.rb +28 -0
- data/test/fixtures/notes.yml +2 -2
- data/test/test_helper.rb +0 -1
- metadata +23 -17
data/.autotest
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
Autotest.add_hook :initialize do |at|
|
2
|
+
at.clear_mappings
|
3
|
+
|
4
|
+
at.add_mapping %r%^lib/(.*)\.rb$% do |_, m|
|
5
|
+
at.files_matching %r%^test/#{m[1]}_test.rb$%
|
6
|
+
end
|
7
|
+
|
8
|
+
at.add_mapping(%r%^test/.*\.rb$%) {|filename, _| filename }
|
9
|
+
|
10
|
+
at.add_mapping %r%^test/fixtures/(.*)s.yml% do |_, _|
|
11
|
+
at.files_matching %r%^test/.*\.rb$%
|
12
|
+
end
|
13
|
+
end
|
data/.gitignore
ADDED
data/README.rdoc
CHANGED
@@ -4,18 +4,14 @@ Awesome Nested Set is an implementation of the nested set pattern for ActiveReco
|
|
4
4
|
|
5
5
|
== What makes this so awesome?
|
6
6
|
|
7
|
-
This is a new implementation of nested set based off of BetterNestedSet that fixes some bugs, removes tons of duplication, adds a few useful methods, adds STI support
|
7
|
+
This is a new implementation of nested set based off of BetterNestedSet that fixes some bugs, removes tons of duplication, adds a few useful methods, and adds STI support.
|
8
8
|
|
9
9
|
== Installation
|
10
10
|
|
11
|
-
If you are on
|
11
|
+
If you are on Rails 2.1 or later:
|
12
12
|
|
13
13
|
script/plugin install git://github.com/collectiveidea/awesome_nested_set.git
|
14
14
|
|
15
|
-
If you are not on edge rails:
|
16
|
-
|
17
|
-
git clone git://github.com/collectiveidea/awesome_nested_set.git vendor/plugins/awesome_nested_set
|
18
|
-
|
19
15
|
== Usage
|
20
16
|
|
21
17
|
To make use of awesome_nested_set, your model needs to have 3 fields: lft, rgt, and parent_id:
|
@@ -44,14 +40,14 @@ Enable the nested set functionality by declaring acts_as_nested_set on your mode
|
|
44
40
|
Run `rake rdoc` to generate the API docs and see CollectiveIdea::Acts::NestedSet::SingletonMethods for more info.
|
45
41
|
|
46
42
|
== View Helper
|
47
|
-
|
48
|
-
The view helper is called #nested_set_options.
|
49
|
-
|
50
|
-
Example usage:
|
51
|
-
|
52
|
-
<%= f.select :parent_id, nested_set_options(Category, @category) {|i| "#{'
|
53
|
-
|
54
|
-
<%= select_tag 'parent_id', options_for_select(nested_set_options(Category) {|i| "#{'
|
43
|
+
|
44
|
+
The view helper is called #nested_set_options.
|
45
|
+
|
46
|
+
Example usage:
|
47
|
+
|
48
|
+
<%= f.select :parent_id, nested_set_options(Category, @category) {|i| "#{'-' * i.level} #{i.name}" } %>
|
49
|
+
|
50
|
+
<%= select_tag 'parent_id', options_for_select(nested_set_options(Category) {|i| "#{'-' * i.level} #{i.name}" } ) %>
|
55
51
|
|
56
52
|
See CollectiveIdea::Acts::NestedSet::Helper for more information about the helpers.
|
57
53
|
|
data/Rakefile
CHANGED
@@ -1,20 +1,28 @@
|
|
1
|
-
|
1
|
+
begin
|
2
|
+
require 'jeweler'
|
3
|
+
rescue LoadError
|
4
|
+
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
5
|
+
exit 1
|
6
|
+
end
|
2
7
|
require 'rake/testtask'
|
3
8
|
require 'rake/rdoctask'
|
4
|
-
require 'rake/gempackagetask'
|
5
9
|
require 'rcov/rcovtask'
|
6
10
|
require "load_multi_rails_rake_tasks"
|
7
11
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
Jeweler::Tasks.new do |s|
|
13
|
+
s.name = "awesome_nested_set"
|
14
|
+
s.summary = "An awesome nested set implementation for Active Record"
|
15
|
+
s.description = s.summary
|
16
|
+
s.email = "info@collectiveidea.com"
|
17
|
+
s.homepage = "http://github.com/collectiveidea/awesome_nested_set"
|
18
|
+
s.authors = ["Brandon Keepers", "Daniel Morrison"]
|
19
|
+
s.add_dependency "activerecord", ['>= 1.1']
|
20
|
+
s.has_rdoc = true
|
21
|
+
s.extra_rdoc_files = [ "README.rdoc"]
|
22
|
+
s.rdoc_options = ["--main", "README.rdoc", "--inline-source", "--line-numbers"]
|
23
|
+
s.test_files = Dir['test/**/*.{yml,rb}']
|
15
24
|
end
|
16
25
|
|
17
|
-
|
18
26
|
desc 'Default: run unit tests.'
|
19
27
|
task :default => :test
|
20
28
|
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.2.0
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{awesome_nested_set}
|
5
|
+
s.version = "1.2.0"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["Brandon Keepers", "Daniel Morrison"]
|
9
|
+
s.date = %q{2009-07-15}
|
10
|
+
s.description = %q{An awesome nested set implementation for Active Record}
|
11
|
+
s.email = %q{info@collectiveidea.com}
|
12
|
+
s.extra_rdoc_files = [
|
13
|
+
"README.rdoc"
|
14
|
+
]
|
15
|
+
s.files = [
|
16
|
+
".autotest",
|
17
|
+
".gitignore",
|
18
|
+
"MIT-LICENSE",
|
19
|
+
"README.rdoc",
|
20
|
+
"Rakefile",
|
21
|
+
"VERSION",
|
22
|
+
"awesome_nested_set.gemspec",
|
23
|
+
"init.rb",
|
24
|
+
"lib/awesome_nested_set.rb",
|
25
|
+
"lib/awesome_nested_set/compatability.rb",
|
26
|
+
"lib/awesome_nested_set/helper.rb",
|
27
|
+
"lib/awesome_nested_set/named_scope.rb",
|
28
|
+
"rails/init.rb",
|
29
|
+
"test/awesome_nested_set/helper_test.rb",
|
30
|
+
"test/awesome_nested_set_test.rb",
|
31
|
+
"test/db/database.yml",
|
32
|
+
"test/db/schema.rb",
|
33
|
+
"test/fixtures/categories.yml",
|
34
|
+
"test/fixtures/category.rb",
|
35
|
+
"test/fixtures/departments.yml",
|
36
|
+
"test/fixtures/notes.yml",
|
37
|
+
"test/test_helper.rb"
|
38
|
+
]
|
39
|
+
s.homepage = %q{http://github.com/collectiveidea/awesome_nested_set}
|
40
|
+
s.rdoc_options = ["--main", "README.rdoc", "--inline-source", "--line-numbers"]
|
41
|
+
s.require_paths = ["lib"]
|
42
|
+
s.rubygems_version = %q{1.3.3}
|
43
|
+
s.summary = %q{An awesome nested set implementation for Active Record}
|
44
|
+
s.test_files = [
|
45
|
+
"test/db/database.yml",
|
46
|
+
"test/fixtures/categories.yml",
|
47
|
+
"test/fixtures/departments.yml",
|
48
|
+
"test/fixtures/notes.yml",
|
49
|
+
"test/awesome_nested_set/helper_test.rb",
|
50
|
+
"test/awesome_nested_set_test.rb",
|
51
|
+
"test/db/schema.rb",
|
52
|
+
"test/fixtures/category.rb",
|
53
|
+
"test/test_helper.rb"
|
54
|
+
]
|
55
|
+
|
56
|
+
if s.respond_to? :specification_version then
|
57
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
58
|
+
s.specification_version = 3
|
59
|
+
|
60
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
61
|
+
s.add_runtime_dependency(%q<activerecord>, [">= 1.1"])
|
62
|
+
else
|
63
|
+
s.add_dependency(%q<activerecord>, [">= 1.1"])
|
64
|
+
end
|
65
|
+
else
|
66
|
+
s.add_dependency(%q<activerecord>, [">= 1.1"])
|
67
|
+
end
|
68
|
+
end
|
data/lib/awesome_nested_set.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
module CollectiveIdea
|
1
|
+
module CollectiveIdea #:nodoc:
|
2
2
|
module Acts #:nodoc:
|
3
3
|
module NestedSet #:nodoc:
|
4
4
|
def self.included(base)
|
@@ -66,31 +66,37 @@ module CollectiveIdea
|
|
66
66
|
write_inheritable_attribute :acts_as_nested_set_options, options
|
67
67
|
class_inheritable_reader :acts_as_nested_set_options
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
69
|
+
unless self.is_a?(ClassMethods)
|
70
|
+
include Comparable
|
71
|
+
include Columns
|
72
|
+
include InstanceMethods
|
73
|
+
extend Columns
|
74
|
+
extend ClassMethods
|
75
|
+
|
76
|
+
attr_accessor :skip_before_destroy
|
77
|
+
|
78
|
+
# no bulk assignment
|
79
|
+
attr_protected left_column_name.intern,
|
80
|
+
right_column_name.intern,
|
81
|
+
parent_column_name.intern
|
79
82
|
|
80
|
-
|
81
|
-
|
83
|
+
before_create :set_default_left_and_right
|
84
|
+
before_destroy :destroy_descendants
|
82
85
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
86
|
+
# no assignment to structure fields
|
87
|
+
[left_column_name, right_column_name, parent_column_name].each do |column|
|
88
|
+
module_eval <<-"end_eval", __FILE__, __LINE__
|
89
|
+
def #{column}=(x)
|
90
|
+
raise ActiveRecord::ActiveRecordError, "Unauthorized assignment to #{column}: it's an internal field handled by acts_as_nested_set code, use move_to_* methods instead."
|
91
|
+
end
|
92
|
+
end_eval
|
93
|
+
end
|
91
94
|
|
92
|
-
|
93
|
-
|
95
|
+
named_scope :roots, :conditions => {parent_column_name => nil}, :order => quoted_left_column_name
|
96
|
+
named_scope :leaves, :conditions => "#{quoted_right_column_name} - #{quoted_left_column_name} = 1", :order => quoted_left_column_name
|
97
|
+
|
98
|
+
define_callbacks("before_move", "after_move") if self.respond_to?(:define_callbacks)
|
99
|
+
end
|
94
100
|
|
95
101
|
end
|
96
102
|
|
@@ -263,6 +269,14 @@ module CollectiveIdea
|
|
263
269
|
def <=>(x)
|
264
270
|
left <=> x.left
|
265
271
|
end
|
272
|
+
|
273
|
+
# Redefine to act like active record
|
274
|
+
def ==(comparison_object)
|
275
|
+
comparison_object.equal?(self) ||
|
276
|
+
(comparison_object.instance_of?(self.class) &&
|
277
|
+
comparison_object.id == id &&
|
278
|
+
!comparison_object.new_record?)
|
279
|
+
end
|
266
280
|
|
267
281
|
# Returns root
|
268
282
|
def root
|
@@ -277,7 +291,7 @@ module CollectiveIdea
|
|
277
291
|
# Returns the array of all parents and self
|
278
292
|
def self_and_ancestors
|
279
293
|
nested_set_scope.scoped :conditions => [
|
280
|
-
"#{self.class.
|
294
|
+
"#{self.class.quoted_table_name}.#{quoted_left_column_name} <= ? AND #{self.class.quoted_table_name}.#{quoted_right_column_name} >= ?", left, right
|
281
295
|
]
|
282
296
|
end
|
283
297
|
|
@@ -298,7 +312,7 @@ module CollectiveIdea
|
|
298
312
|
|
299
313
|
# Returns a set of all of its nested children which do not have children
|
300
314
|
def leaves
|
301
|
-
descendants.scoped :conditions => "#{self.class.
|
315
|
+
descendants.scoped :conditions => "#{self.class.quoted_table_name}.#{quoted_right_column_name} - #{self.class.quoted_table_name}.#{quoted_left_column_name} = 1"
|
302
316
|
end
|
303
317
|
|
304
318
|
# Returns the level of this object in the tree
|
@@ -310,7 +324,7 @@ module CollectiveIdea
|
|
310
324
|
# Returns a set of itself and all of its nested children
|
311
325
|
def self_and_descendants
|
312
326
|
nested_set_scope.scoped :conditions => [
|
313
|
-
"#{self.class.
|
327
|
+
"#{self.class.quoted_table_name}.#{quoted_left_column_name} >= ? AND #{self.class.quoted_table_name}.#{quoted_right_column_name} <= ?", left, right
|
314
328
|
]
|
315
329
|
end
|
316
330
|
|
@@ -349,14 +363,13 @@ module CollectiveIdea
|
|
349
363
|
|
350
364
|
# Find the first sibling to the left
|
351
365
|
def left_sibling
|
352
|
-
siblings.find(:first, :conditions => ["#{self.class.
|
353
|
-
:order => "#{self.class.
|
366
|
+
siblings.find(:first, :conditions => ["#{self.class.quoted_table_name}.#{quoted_left_column_name} < ?", left],
|
367
|
+
:order => "#{self.class.quoted_table_name}.#{quoted_left_column_name} DESC")
|
354
368
|
end
|
355
369
|
|
356
370
|
# Find the first sibling to the right
|
357
371
|
def right_sibling
|
358
|
-
siblings.find(:first, :conditions => ["#{self.class.
|
359
|
-
:order => quoted_left_column_name)
|
372
|
+
siblings.find(:first, :conditions => ["#{self.class.quoted_table_name}.#{quoted_left_column_name} > ?", left])
|
360
373
|
end
|
361
374
|
|
362
375
|
# Shorthand method for finding the left sibling and moving to the left of it.
|
@@ -406,7 +419,7 @@ module CollectiveIdea
|
|
406
419
|
protected
|
407
420
|
|
408
421
|
def without_self(scope)
|
409
|
-
scope.scoped :conditions => ["#{self.class.
|
422
|
+
scope.scoped :conditions => ["#{self.class.quoted_table_name}.#{self.class.primary_key} != ?", self]
|
410
423
|
end
|
411
424
|
|
412
425
|
# All nested set queries should use this nested_set_scope, which performs finds on
|
@@ -431,29 +444,38 @@ module CollectiveIdea
|
|
431
444
|
|
432
445
|
# Prunes a branch off of the tree, shifting all of the elements on the right
|
433
446
|
# back to the left so the counts still work.
|
434
|
-
def
|
435
|
-
return if right.nil? || left.nil?
|
436
|
-
|
437
|
-
|
438
|
-
delete_method = acts_as_nested_set_options[:dependent] == :destroy ?
|
439
|
-
:destroy_all : :delete_all
|
440
|
-
|
447
|
+
def destroy_descendants
|
448
|
+
return if right.nil? || left.nil? || skip_before_destroy
|
449
|
+
|
441
450
|
self.class.base_class.transaction do
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
451
|
+
if acts_as_nested_set_options[:dependent] == :destroy
|
452
|
+
descendants.each do |model|
|
453
|
+
model.skip_before_destroy = true
|
454
|
+
model.destroy
|
455
|
+
end
|
456
|
+
else
|
457
|
+
nested_set_scope.delete_all(
|
458
|
+
["#{quoted_left_column_name} > ? AND #{quoted_right_column_name} < ?",
|
459
|
+
left, right]
|
460
|
+
)
|
461
|
+
end
|
462
|
+
|
463
|
+
# update lefts and rights for remaining nodes
|
464
|
+
diff = right - left + 1
|
446
465
|
nested_set_scope.update_all(
|
447
466
|
["#{quoted_left_column_name} = (#{quoted_left_column_name} - ?)", diff],
|
448
|
-
["#{quoted_left_column_name}
|
467
|
+
["#{quoted_left_column_name} > ?", right]
|
449
468
|
)
|
450
469
|
nested_set_scope.update_all(
|
451
470
|
["#{quoted_right_column_name} = (#{quoted_right_column_name} - ?)", diff],
|
452
|
-
["#{quoted_right_column_name}
|
471
|
+
["#{quoted_right_column_name} > ?", right]
|
453
472
|
)
|
473
|
+
|
474
|
+
# Don't allow multiple calls to destroy to corrupt the set
|
475
|
+
self.skip_before_destroy = true
|
454
476
|
end
|
455
477
|
end
|
456
|
-
|
478
|
+
|
457
479
|
# reload left, right, and parent
|
458
480
|
def reload_nested_set
|
459
481
|
reload(:select => "#{quoted_left_column_name}, " +
|
@@ -462,7 +484,7 @@ module CollectiveIdea
|
|
462
484
|
|
463
485
|
def move_to(target, position)
|
464
486
|
raise ActiveRecord::ActiveRecordError, "You cannot move a new node" if self.new_record?
|
465
|
-
|
487
|
+
return if callback(:before_move) == false
|
466
488
|
transaction do
|
467
489
|
if target.is_a? self.class.base_class
|
468
490
|
target.reload_nested_set
|
@@ -525,6 +547,7 @@ module CollectiveIdea
|
|
525
547
|
end
|
526
548
|
target.reload_nested_set if target
|
527
549
|
self.reload_nested_set
|
550
|
+
callback(:after_move)
|
528
551
|
end
|
529
552
|
|
530
553
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Rails <2.x doesn't define #except
|
2
|
-
class Hash
|
2
|
+
class Hash #:nodoc:
|
3
3
|
# Returns a new hash without the given keys.
|
4
4
|
def except(*keys)
|
5
5
|
clone.except!(*keys)
|
@@ -22,7 +22,7 @@ unless defined? ActiveRecord::NamedScope
|
|
22
22
|
end
|
23
23
|
|
24
24
|
# Rails 1.2.x doesn't define #quoted_table_name
|
25
|
-
class ActiveRecord::Base
|
25
|
+
class ActiveRecord::Base #:nodoc:
|
26
26
|
def self.quoted_table_name
|
27
27
|
self.connection.quote_column_name(self.table_name)
|
28
28
|
end unless methods.include?('quoted_table_name')
|
@@ -1,9 +1,8 @@
|
|
1
|
-
module CollectiveIdea
|
1
|
+
module CollectiveIdea #:nodoc:
|
2
2
|
module Acts #:nodoc:
|
3
3
|
module NestedSet #:nodoc:
|
4
4
|
# This module provides some helpers for the model classes using acts_as_nested_set.
|
5
|
-
# It is included by default in all views.
|
6
|
-
# of init.rb.
|
5
|
+
# It is included by default in all views.
|
7
6
|
#
|
8
7
|
module Helper
|
9
8
|
# Returns options for select.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Taken from Rails 2.1
|
2
|
-
module CollectiveIdea
|
3
|
-
module NamedScope
|
2
|
+
module CollectiveIdea #:nodoc:
|
3
|
+
module NamedScope #:nodoc:
|
4
4
|
# All subclasses of ActiveRecord::Base have two named_scopes:
|
5
5
|
# * <tt>all</tt>, which is similar to a <tt>find(:all)</tt> query, and
|
6
6
|
# * <tt>scoped</tt>, which allows for the creation of anonymous scopes, on the fly:
|
@@ -16,7 +16,7 @@ module CollectiveIdea
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
module ClassMethods
|
19
|
+
module ClassMethods #:nodoc:
|
20
20
|
def scopes
|
21
21
|
read_inheritable_attribute(:scopes) || write_inheritable_attribute(:scopes, {})
|
22
22
|
end
|
@@ -101,7 +101,7 @@ module CollectiveIdea
|
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
104
|
-
class Scope
|
104
|
+
class Scope #:nodoc:
|
105
105
|
attr_reader :proxy_scope, :proxy_options
|
106
106
|
[].methods.each { |m| delegate m, :to => :proxy_found unless m =~ /(^__|^nil\?|^send|class|extend|find|count|sum|average|maximum|minimum|paginate)/ }
|
107
107
|
delegate :scopes, :with_scope, :to => :proxy_scope
|
@@ -591,4 +591,32 @@ class AwesomeNestedSetTest < Test::Unit::TestCase
|
|
591
591
|
assert_equal ["\"notable_id\"", "\"notable_type\""], Note.quoted_scope_column_names
|
592
592
|
end
|
593
593
|
|
594
|
+
def test_equal_in_same_scope
|
595
|
+
assert_equal notes(:scope1), notes(:scope1)
|
596
|
+
assert_not_equal notes(:scope1), notes(:child_1)
|
597
|
+
end
|
598
|
+
|
599
|
+
def test_equal_in_different_scopes
|
600
|
+
assert_not_equal notes(:scope1), notes(:scope2)
|
601
|
+
end
|
602
|
+
|
603
|
+
def test_delete_does_not_invalidate
|
604
|
+
Category.acts_as_nested_set_options[:dependent] = :delete
|
605
|
+
categories(:child_2).destroy
|
606
|
+
assert Category.valid?
|
607
|
+
end
|
608
|
+
|
609
|
+
def test_destroy_does_not_invalidate
|
610
|
+
Category.acts_as_nested_set_options[:dependent] = :destroy
|
611
|
+
categories(:child_2).destroy
|
612
|
+
assert Category.valid?
|
613
|
+
end
|
614
|
+
|
615
|
+
def test_destroy_multiple_times_does_not_invalidate
|
616
|
+
Category.acts_as_nested_set_options[:dependent] = :destroy
|
617
|
+
categories(:child_2).destroy
|
618
|
+
categories(:child_2).destroy
|
619
|
+
assert Category.valid?
|
620
|
+
end
|
621
|
+
|
594
622
|
end
|
data/test/fixtures/notes.yml
CHANGED
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,19 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: collectiveidea-awesome_nested_set
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Brandon Keepers
|
8
|
+
- Daniel Morrison
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
12
|
|
12
|
-
date:
|
13
|
+
date: 2009-07-15 00:00:00 -07:00
|
13
14
|
default_executable:
|
14
15
|
dependencies:
|
15
16
|
- !ruby/object:Gem::Dependency
|
16
17
|
name: activerecord
|
18
|
+
type: :runtime
|
17
19
|
version_requirement:
|
18
20
|
version_requirements: !ruby/object:Gem::Requirement
|
19
21
|
requirements:
|
@@ -21,7 +23,7 @@ dependencies:
|
|
21
23
|
- !ruby/object:Gem::Version
|
22
24
|
version: "1.1"
|
23
25
|
version:
|
24
|
-
description: An awesome
|
26
|
+
description: An awesome nested set implementation for Active Record
|
25
27
|
email: info@collectiveidea.com
|
26
28
|
executables: []
|
27
29
|
|
@@ -30,26 +32,30 @@ extensions: []
|
|
30
32
|
extra_rdoc_files:
|
31
33
|
- README.rdoc
|
32
34
|
files:
|
33
|
-
-
|
35
|
+
- .autotest
|
36
|
+
- .gitignore
|
34
37
|
- MIT-LICENSE
|
35
|
-
- Rakefile
|
36
38
|
- README.rdoc
|
39
|
+
- Rakefile
|
40
|
+
- VERSION
|
41
|
+
- awesome_nested_set.gemspec
|
42
|
+
- init.rb
|
37
43
|
- lib/awesome_nested_set.rb
|
38
44
|
- lib/awesome_nested_set/compatability.rb
|
39
45
|
- lib/awesome_nested_set/helper.rb
|
40
46
|
- lib/awesome_nested_set/named_scope.rb
|
41
47
|
- rails/init.rb
|
42
|
-
- test/awesome_nested_set_test.rb
|
43
|
-
- test/test_helper.rb
|
44
48
|
- test/awesome_nested_set/helper_test.rb
|
49
|
+
- test/awesome_nested_set_test.rb
|
45
50
|
- test/db/database.yml
|
46
51
|
- test/db/schema.rb
|
47
52
|
- test/fixtures/categories.yml
|
48
53
|
- test/fixtures/category.rb
|
49
54
|
- test/fixtures/departments.yml
|
50
55
|
- test/fixtures/notes.yml
|
51
|
-
|
52
|
-
|
56
|
+
- test/test_helper.rb
|
57
|
+
has_rdoc: false
|
58
|
+
homepage: http://github.com/collectiveidea/awesome_nested_set
|
53
59
|
post_install_message:
|
54
60
|
rdoc_options:
|
55
61
|
- --main
|
@@ -75,15 +81,15 @@ requirements: []
|
|
75
81
|
rubyforge_project:
|
76
82
|
rubygems_version: 1.2.0
|
77
83
|
signing_key:
|
78
|
-
specification_version:
|
79
|
-
summary: An awesome
|
84
|
+
specification_version: 3
|
85
|
+
summary: An awesome nested set implementation for Active Record
|
80
86
|
test_files:
|
81
|
-
- test/awesome_nested_set_test.rb
|
82
|
-
- test/test_helper.rb
|
83
|
-
- test/awesome_nested_set/helper_test.rb
|
84
87
|
- test/db/database.yml
|
85
|
-
- test/db/schema.rb
|
86
88
|
- test/fixtures/categories.yml
|
87
|
-
- test/fixtures/category.rb
|
88
89
|
- test/fixtures/departments.yml
|
89
90
|
- test/fixtures/notes.yml
|
91
|
+
- test/awesome_nested_set/helper_test.rb
|
92
|
+
- test/awesome_nested_set_test.rb
|
93
|
+
- test/db/schema.rb
|
94
|
+
- test/fixtures/category.rb
|
95
|
+
- test/test_helper.rb
|