mongoid_acts_as_tree 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.6
1
+ 0.1.7
@@ -132,12 +132,8 @@ module Mongoid
132
132
  alias replace children=
133
133
 
134
134
  def descendants
135
- # workorund for mongoid unexpected behavior
136
- _new_record_var = self.instance_variable_get(:@new_record)
137
- _new_record = _new_record_var != false
138
-
139
- return [] if _new_record
140
- acts_as_tree_options[:class].all_in(path_field => [self._id]).order_by tree_order
135
+ return [] if new_record?
136
+ self.class.all_in(path_field => [self._id]).order_by tree_order
141
137
  end
142
138
 
143
139
  def self_and_descendants
@@ -1,54 +1,51 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mongoid_acts_as_tree}
8
- s.version = "0.1.6"
8
+ s.version = "0.1.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jakob Vidmar, Aliaksandr Rahalevich"]
12
- s.date = %q{2010-11-02}
12
+ s.date = %q{2011-02-10}
13
13
  s.description = %q{Port of the old, venerable ActsAsTree with a bit of a twist}
14
14
  s.email = %q{saksmlz@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.rdoc"
17
+ "README.rdoc"
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
21
- ".gitignore",
22
- "CHANGELOG",
23
- "LICENSE",
24
- "README.rdoc",
25
- "Rakefile",
26
- "VERSION",
27
- "lib/mongoid_acts_as_tree.rb",
28
- "mongoid_acts_as_tree.gemspec",
29
- "test/helper.rb",
30
- "test/models/category.rb",
31
- "test/models/ordered_category.rb",
32
- "test/models/sub_category.rb",
33
- "test/test_order.rb",
34
- "test/test_tree.rb"
21
+ "CHANGELOG",
22
+ "LICENSE",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "lib/mongoid_acts_as_tree.rb",
27
+ "mongoid_acts_as_tree.gemspec",
28
+ "test/helper.rb",
29
+ "test/models/category.rb",
30
+ "test/models/ordered_category.rb",
31
+ "test/models/sub_category.rb",
32
+ "test/test_order.rb",
33
+ "test/test_tree.rb"
35
34
  ]
36
35
  s.homepage = %q{http://github.com/saks/mongoid_acts_as_tree}
37
- s.rdoc_options = ["--charset=UTF-8"]
38
36
  s.require_paths = ["lib"]
39
- s.rubygems_version = %q{1.3.7}
37
+ s.rubygems_version = %q{1.5.0}
40
38
  s.summary = %q{ActsAsTree plugin for Mongoid}
41
39
  s.test_files = [
40
+ "test/helper.rb",
42
41
  "test/models/category.rb",
43
- "test/models/ordered_category.rb",
44
- "test/models/sub_category.rb",
45
- "test/helper.rb",
46
- "test/test_tree.rb",
47
- "test/test_order.rb"
42
+ "test/models/ordered_category.rb",
43
+ "test/models/sub_category.rb",
44
+ "test/test_order.rb",
45
+ "test/test_tree.rb"
48
46
  ]
49
47
 
50
48
  if s.respond_to? :specification_version then
51
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
52
49
  s.specification_version = 3
53
50
 
54
51
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_acts_as_tree
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 6
9
- version: 0.1.6
4
+ prerelease:
5
+ version: 0.1.7
10
6
  platform: ruby
11
7
  authors:
12
8
  - Jakob Vidmar, Aliaksandr Rahalevich
@@ -14,7 +10,7 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2010-11-02 00:00:00 +02:00
13
+ date: 2011-02-10 00:00:00 +02:00
18
14
  default_executable:
19
15
  dependencies:
20
16
  - !ruby/object:Gem::Dependency
@@ -25,10 +21,6 @@ dependencies:
25
21
  requirements:
26
22
  - - <=
27
23
  - !ruby/object:Gem::Version
28
- segments:
29
- - 2
30
- - 0
31
- - 0
32
24
  version: 2.0.0
33
25
  type: :runtime
34
26
  version_requirements: *id001
@@ -40,10 +32,6 @@ dependencies:
40
32
  requirements:
41
33
  - - ">="
42
34
  - !ruby/object:Gem::Version
43
- segments:
44
- - 0
45
- - 20
46
- - 1
47
35
  version: 0.20.1
48
36
  type: :runtime
49
37
  version_requirements: *id002
@@ -55,10 +43,6 @@ dependencies:
55
43
  requirements:
56
44
  - - ">="
57
45
  - !ruby/object:Gem::Version
58
- segments:
59
- - 2
60
- - 10
61
- - 2
62
46
  version: 2.10.2
63
47
  type: :development
64
48
  version_requirements: *id003
@@ -73,7 +57,6 @@ extra_rdoc_files:
73
57
  - README.rdoc
74
58
  files:
75
59
  - .document
76
- - .gitignore
77
60
  - CHANGELOG
78
61
  - LICENSE
79
62
  - README.rdoc
@@ -92,8 +75,8 @@ homepage: http://github.com/saks/mongoid_acts_as_tree
92
75
  licenses: []
93
76
 
94
77
  post_install_message:
95
- rdoc_options:
96
- - --charset=UTF-8
78
+ rdoc_options: []
79
+
97
80
  require_paths:
98
81
  - lib
99
82
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -101,28 +84,24 @@ required_ruby_version: !ruby/object:Gem::Requirement
101
84
  requirements:
102
85
  - - ">="
103
86
  - !ruby/object:Gem::Version
104
- segments:
105
- - 0
106
87
  version: "0"
107
88
  required_rubygems_version: !ruby/object:Gem::Requirement
108
89
  none: false
109
90
  requirements:
110
91
  - - ">="
111
92
  - !ruby/object:Gem::Version
112
- segments:
113
- - 0
114
93
  version: "0"
115
94
  requirements: []
116
95
 
117
96
  rubyforge_project:
118
- rubygems_version: 1.3.7
97
+ rubygems_version: 1.5.0
119
98
  signing_key:
120
99
  specification_version: 3
121
100
  summary: ActsAsTree plugin for Mongoid
122
101
  test_files:
102
+ - test/helper.rb
123
103
  - test/models/category.rb
124
104
  - test/models/ordered_category.rb
125
105
  - test/models/sub_category.rb
126
- - test/helper.rb
127
- - test/test_tree.rb
128
106
  - test/test_order.rb
107
+ - test/test_tree.rb
data/.gitignore DELETED
@@ -1,21 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC