glebtv-mongoid_nested_set 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -8
- data/glebtv-mongoid_nested_set.gemspec +1 -1
- data/lib/mongoid_nested_set/base.rb +1 -1
- data/lib/mongoid_nested_set/version.rb +1 -1
- data/spec/mongoid_nested_set_spec.rb +3 -1
- data/spec/spec_helper.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff3955c3d64d7f85008ebda5e4776e56ec4adacb
|
4
|
+
data.tar.gz: 38c3737fca898de7a8ad033b4b9bb631c27546d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac8821aead3b13fb5888f1efa9fed6fe1654c686657977569fdccc4ddfb23361be71d69d5991ce1579acbc25e7ecdac257ef2ff549fd60b87a18d8d66ae03afb
|
7
|
+
data.tar.gz: 920ffbaf9362ac74f37d9c6dc77fb29773e47d01fa9b2f5bc07ff97ef72931e26de2002019339d945b0cc386f98b6d8aae73825b3c7ae211432300d877c062c9
|
data/.travis.yml
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
|
22
|
-
s.add_runtime_dependency 'mongoid', [">=
|
22
|
+
s.add_runtime_dependency 'mongoid', [">= 6.0", "< 7.0"]
|
23
23
|
|
24
24
|
s.add_development_dependency 'rake'
|
25
25
|
s.add_development_dependency 'rspec'
|
@@ -47,7 +47,7 @@ module Mongoid::Acts::NestedSet
|
|
47
47
|
field :depth, :type => Integer
|
48
48
|
|
49
49
|
has_many :children, :class_name => self.name, :foreign_key => parent_field_name, :inverse_of => :parent, :order => left_field_name.to_sym.asc
|
50
|
-
belongs_to :parent, :class_name => self.name, :foreign_key => parent_field_name
|
50
|
+
belongs_to :parent, :class_name => self.name, :foreign_key => parent_field_name, required: false, optional: true
|
51
51
|
|
52
52
|
attr_accessor :skip_before_destroy
|
53
53
|
|
@@ -55,7 +55,9 @@ describe "A Mongoid::Document" do
|
|
55
55
|
nodes.each_value do |node|
|
56
56
|
# As soon as there is no upsert callbacks set
|
57
57
|
# this is effectively identical to the straight driver call
|
58
|
-
node.with(:collection => collection_name)
|
58
|
+
node.with(:collection => collection_name) do |n|
|
59
|
+
n.upsert
|
60
|
+
end
|
59
61
|
node.new_record = false
|
60
62
|
end
|
61
63
|
nodes
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glebtv-mongoid_nested_set
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GlebTV
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-03-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mongoid
|
@@ -17,20 +17,20 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: '6.0'
|
21
21
|
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: '
|
23
|
+
version: '7.0'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
28
|
- - ">="
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version:
|
30
|
+
version: '6.0'
|
31
31
|
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '7.0'
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: rake
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
@@ -210,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
210
210
|
version: '0'
|
211
211
|
requirements: []
|
212
212
|
rubyforge_project: mongoid_nested_set
|
213
|
-
rubygems_version: 2.
|
213
|
+
rubygems_version: 2.6.10
|
214
214
|
signing_key:
|
215
215
|
specification_version: 4
|
216
216
|
summary: Nested set based tree implementation for Mongoid
|