mongo_mapper_acts_as_tree 0.1.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,8 +2,11 @@ module MongoMapper
2
2
  module Plugins
3
3
  module ActsAsTree
4
4
 
5
- require 'mongo_mapper'
5
+ extend ActiveSupport::Concern
6
6
 
7
+
8
+
9
+ # --------------------------------------------------------------------------------
7
10
  module ClassMethods
8
11
  def acts_as_tree(options = {})
9
12
  configuration = { :foreign_key => :parent_id, :order => nil, :counter_cache => nil }
@@ -24,6 +27,9 @@ module MongoMapper
24
27
  end
25
28
  end
26
29
 
30
+
31
+
32
+ # --------------------------------------------------------------------------------
27
33
  module InstanceMethods
28
34
  # Returns list of ancestors, starting from parent until root.
29
35
  #
@@ -2,7 +2,7 @@
2
2
  module MongoMapper
3
3
  module Plugins
4
4
  module ActsAsTree
5
- Version = '0.1.1'
5
+ Version = '0.2'
6
6
  end
7
7
  end
8
8
  end
@@ -0,0 +1 @@
1
+ require 'mongo_mapper/plugins/acts_as_tree'
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo_mapper_acts_as_tree
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
5
- prerelease: false
4
+ hash: 15
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
- - 1
9
- - 1
10
- version: 0.1.1
8
+ - 2
9
+ version: "0.2"
11
10
  platform: ruby
12
11
  authors:
13
12
  - Tomas Celizna
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-12-09 00:00:00 +01:00
17
+ date: 2011-02-18 00:00:00 +01:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
@@ -58,6 +57,7 @@ extra_rdoc_files: []
58
57
  files:
59
58
  - lib/mongo_mapper/plugins/acts_as_tree.rb
60
59
  - lib/mongo_mapper/plugins/version.rb
60
+ - lib/mongo_mapper_acts_as_tree.rb
61
61
  - test/acts_as_tree_test.rb
62
62
  - test/test_helper.rb
63
63
  - README.rdoc
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  requirements: []
92
92
 
93
93
  rubyforge_project:
94
- rubygems_version: 1.3.7
94
+ rubygems_version: 1.4.1
95
95
  signing_key:
96
96
  specification_version: 3
97
97
  summary: Port of classic Rails ActsAsTree for MongoMapper