mongoid_tree 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.textile CHANGED
@@ -113,4 +113,6 @@ h3. Note on Patches/Pull Requests
113
113
 
114
114
  h3. Copyright
115
115
 
116
+ Used Images are from "Wikipedia":http://commons.wikimedia.org/wiki/Main_Page
117
+
116
118
  Copyright (c) 2010 Rainer Kuhn, LittleWebLab.com. See LICENSE for details.
data/Rakefile CHANGED
@@ -11,6 +11,9 @@ begin
11
11
  gem.homepage = "http://github.com/ticktricktrack/mongoid_tree"
12
12
  gem.authors = ["Rainer Kuhn"]
13
13
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
14
+
15
+ gem.add_runtime_dependency('mongoid', '>= 2.0.0.beta.16')
16
+
14
17
  end
15
18
  Jeweler::GemcutterTasks.new
16
19
  rescue LoadError
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
data/lib/mongoid_tree.rb CHANGED
@@ -85,7 +85,7 @@ module Mongoid
85
85
  new_child.position = self.position
86
86
  self.parent.children.each do |child|
87
87
  if child.position >= new_child.position
88
- child.position += 1
88
+ child.update_attributes(:position => child.position + 1)
89
89
  end
90
90
  end
91
91
  self.parent.reload.children << new_child
@@ -95,7 +95,7 @@ module Mongoid
95
95
  new_child.position = self.position + 1
96
96
  self.parent.children.each do |child|
97
97
  if child.position >= new_child.position
98
- child.position += 1
98
+ child.update_attributes(:position => child.position + 1)
99
99
  end
100
100
  end
101
101
  self.parent.children << new_child
data/mongoid_tree.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mongoid_tree}
8
- s.version = "0.3.1"
8
+ s.version = "0.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Rainer Kuhn"]
12
- s.date = %q{2010-08-13}
12
+ s.date = %q{2010-08-18}
13
13
  s.description = %q{Fully featured tree implementation for Mongoid using materialized paths and relative associations. Featuring Depth and Breadth first search.}
14
14
  s.email = %q{rkuhn@littleweblab.com}
15
15
  s.extra_rdoc_files = [
@@ -73,9 +73,12 @@ Gem::Specification.new do |s|
73
73
  s.specification_version = 3
74
74
 
75
75
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
76
+ s.add_runtime_dependency(%q<mongoid>, [">= 2.0.0.beta.16"])
76
77
  else
78
+ s.add_dependency(%q<mongoid>, [">= 2.0.0.beta.16"])
77
79
  end
78
80
  else
81
+ s.add_dependency(%q<mongoid>, [">= 2.0.0.beta.16"])
79
82
  end
80
83
  end
81
84
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 1
9
- version: 0.3.1
8
+ - 2
9
+ version: 0.3.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Rainer Kuhn
@@ -14,10 +14,26 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-08-13 00:00:00 +02:00
17
+ date: 2010-08-18 00:00:00 +02:00
18
18
  default_executable:
19
- dependencies: []
20
-
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: mongoid
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 2
30
+ - 0
31
+ - 0
32
+ - beta
33
+ - 16
34
+ version: 2.0.0.beta.16
35
+ type: :runtime
36
+ version_requirements: *id001
21
37
  description: Fully featured tree implementation for Mongoid using materialized paths and relative associations. Featuring Depth and Breadth first search.
22
38
  email: rkuhn@littleweblab.com
23
39
  executables: []