active_node 2.2.5 → 2.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/active_node.gemspec +1 -1
- data/lib/active_node/dirty.rb +1 -0
- data/lib/active_node/persistence.rb +4 -3
- data/lib/active_node/version.rb +1 -1
- data/spec/functional/associations_spec.rb +10 -0
- data/spec/functional/persistence_spec.rb +5 -1
- metadata +25 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3416059b31793c6207482121cf2f34de2d24b11f
|
4
|
+
data.tar.gz: 8286a0af63a32878cfaa64902877c1290899744c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7af0ea851c7d6b59474a3a67eb739c2c76edf424fd7ada60eac28302ca438cacc20a6863f74ed60fc0bf84242af505a905da495d1e5e4996aa595891abe1e41b
|
7
|
+
data.tar.gz: bfe66442b9408ab7f09946e48813c1741b0158fd73add2b4d0c29144a4f00ef5f13f4a8a81d39b209ca75105e7545ac6d6bdd856bb81792e6d236a68bc25a8ea
|
data/.travis.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
script: "bundle exec rake neo4j:install['enterprise','2.
|
1
|
+
script: "bundle exec rake neo4j:install['enterprise','2.1.3'] neo4j:start spec --trace"
|
2
2
|
language: ruby
|
3
3
|
rvm:
|
4
|
-
- 2.1.
|
4
|
+
- 2.1.2
|
5
5
|
addons:
|
6
6
|
code_climate:
|
7
7
|
repo_token: 88fa9b8eb0bfc48e8c5077253d829e94af9f76aca60df9e75ae0e50a4c7cd9f0
|
data/active_node.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.add_dependency "neography"
|
23
23
|
s.add_dependency "activesupport"
|
24
24
|
s.add_dependency "activemodel"
|
25
|
-
s.add_development_dependency "rspec", "
|
25
|
+
s.add_development_dependency "rspec", "<= 2.14.1"
|
26
26
|
s.add_development_dependency "net-http-spy", "0.2.1"
|
27
27
|
s.add_development_dependency "rake", ">= 0.8.7"
|
28
28
|
s.add_development_dependency "coveralls"
|
data/lib/active_node/dirty.rb
CHANGED
@@ -50,7 +50,7 @@ module ActiveNode
|
|
50
50
|
|
51
51
|
private
|
52
52
|
def new_instance node, klass=nil
|
53
|
-
(klass || find_suitable_class(Neo.db.get_node_labels(node))).try(:new, data(node), :declared?)
|
53
|
+
node && (klass || find_suitable_class(Neo.db.get_node_labels(node))).try(:new, data(node), :declared?)
|
54
54
|
end
|
55
55
|
|
56
56
|
def data hash
|
@@ -180,8 +180,9 @@ module ActiveNode
|
|
180
180
|
end
|
181
181
|
|
182
182
|
def destroy_associations include_associations
|
183
|
-
rels=Neo.db.get_node_relationships(id)
|
184
|
-
rels.
|
183
|
+
rels = Neo.db.get_node_relationships(id)
|
184
|
+
rels.each { |rel| Neo.db.delete_relationship(rel) } if include_associations
|
185
|
+
rels.empty? || include_associations
|
185
186
|
end
|
186
187
|
|
187
188
|
def create_or_update
|
data/lib/active_node/version.rb
CHANGED
@@ -178,5 +178,15 @@ describe ActiveNode::Associations do
|
|
178
178
|
person = Person.create! children: [Person.create!(address: address)]
|
179
179
|
Person.find(person.id).children(:address).first.address.should == address
|
180
180
|
end
|
181
|
+
|
182
|
+
it 'should handle simultaneous updates to father and children' do
|
183
|
+
pending
|
184
|
+
child1 = Person.create!
|
185
|
+
father = Person.create! children: [child1]
|
186
|
+
father = Person.includes(:children).find(father.id)
|
187
|
+
father.children.first.update_attributes(father: nil)
|
188
|
+
father.update_attributes(name: "John")
|
189
|
+
Person.find(father.id).children.should be_empty?
|
190
|
+
end
|
181
191
|
end
|
182
192
|
end
|
metadata
CHANGED
@@ -1,85 +1,85 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_node
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Heinrich Klobuczek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_attr
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: neography
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: activesupport
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: activemodel
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - "<="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 2.14.1
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - "<="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 2.14.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: net-http-spy
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,42 +98,42 @@ dependencies:
|
|
98
98
|
name: rake
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: 0.8.7
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 0.8.7
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: coveralls
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: codeclimate-test-reporter
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
description: ActiveRecord style Object Graph Mapping for neo4j
|
@@ -143,8 +143,8 @@ executables: []
|
|
143
143
|
extensions: []
|
144
144
|
extra_rdoc_files: []
|
145
145
|
files:
|
146
|
-
- .gitignore
|
147
|
-
- .travis.yml
|
146
|
+
- ".gitignore"
|
147
|
+
- ".travis.yml"
|
148
148
|
- Gemfile
|
149
149
|
- LICENSE
|
150
150
|
- README.md
|
@@ -202,17 +202,17 @@ require_paths:
|
|
202
202
|
- lib
|
203
203
|
required_ruby_version: !ruby/object:Gem::Requirement
|
204
204
|
requirements:
|
205
|
-
- -
|
205
|
+
- - ">="
|
206
206
|
- !ruby/object:Gem::Version
|
207
207
|
version: '0'
|
208
208
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
209
209
|
requirements:
|
210
|
-
- -
|
210
|
+
- - ">="
|
211
211
|
- !ruby/object:Gem::Version
|
212
212
|
version: '0'
|
213
213
|
requirements: []
|
214
214
|
rubyforge_project: active_node
|
215
|
-
rubygems_version: 2.
|
215
|
+
rubygems_version: 2.2.2
|
216
216
|
signing_key:
|
217
217
|
specification_version: 4
|
218
218
|
summary: ActiveRecord style Object Graph Mapping for neo4j
|