neo4j 10.0.0.pre.alpha.2 → 10.0.0.pre.alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/neo4j/active_base.rb +5 -0
- data/lib/neo4j/active_node/has_n.rb +1 -1
- data/lib/neo4j/core/driver.rb +0 -18
- data/lib/neo4j/core/instrumentable.rb +2 -2
- data/lib/neo4j/transaction.rb +1 -2
- data/lib/neo4j/version.rb +1 -1
- data/neo4j.gemspec +1 -1
- metadata +42 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff515286e8e1202f648f372e9041d1fe09398d2f337125efec503ce9172232de
|
4
|
+
data.tar.gz: 506ee61427202c6233706f419f0386ead7db0dcf8b2c88ae87c2486eb8834efe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69e84ff47a1ad8eae95c942b6a91a6e8c5fbf3de71b81043d664a1ff9ccd0aee5c8645c659e38a4500f9eee21a7efb69562cff82875a829808a9784f66dbd05c
|
7
|
+
data.tar.gz: 044ff7c2a4f7a5dcef788254b82ab834ef29e9c04c8a837beed669536d9a4df25f392ea4381b92eecb96372945e2be35e5571b2525a9bbda8b1b7b680c107e27
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file.
|
|
3
3
|
This file should follow the standards specified on [http://keepachangelog.com/]
|
4
4
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
5
5
|
|
6
|
+
## [9.6.1] 2019-12-18
|
7
|
+
|
8
|
+
## Fixed
|
9
|
+
|
10
|
+
- Fixed duplicate records with with_associations on QueryProxy. (#1576)
|
11
|
+
|
6
12
|
## [9.6.0] 2019-09-3
|
7
13
|
|
8
14
|
## Added
|
data/lib/neo4j/active_base.rb
CHANGED
@@ -2,6 +2,10 @@ module Neo4j
|
|
2
2
|
# To contain any base login for ActiveNode/ActiveRel which
|
3
3
|
# is external to the main classes
|
4
4
|
module ActiveBase
|
5
|
+
at_exit do
|
6
|
+
@driver&.close
|
7
|
+
end
|
8
|
+
|
5
9
|
class << self
|
6
10
|
# private?
|
7
11
|
def current_driver
|
@@ -34,6 +38,7 @@ module Neo4j
|
|
34
38
|
|
35
39
|
# Should support setting driver via config options
|
36
40
|
def driver=(driver)
|
41
|
+
@driver&.close
|
37
42
|
@driver = driver
|
38
43
|
end
|
39
44
|
|
@@ -103,7 +103,7 @@ module Neo4j::ActiveNode
|
|
103
103
|
|
104
104
|
def add_to_cache(object, rel = nil)
|
105
105
|
(@cached_rels ||= []) << rel if rel
|
106
|
-
(@cached_result ||= []) << object
|
106
|
+
(@cached_result ||= []).tap { |results| results << object unless results.include?(object) }
|
107
107
|
end
|
108
108
|
|
109
109
|
def rels
|
data/lib/neo4j/core/driver.rb
CHANGED
@@ -10,16 +10,10 @@ module Neo4j
|
|
10
10
|
|
11
11
|
USER_AGENT_STRING = "neo4j-gem/#{::Neo4j::VERSION} (https://github.com/neo4jrb/neo4j)"
|
12
12
|
|
13
|
-
cattr_reader :singleton
|
14
13
|
attr_accessor :wrap_level
|
15
14
|
attr_reader :options, :driver
|
16
15
|
delegate :close, to: :driver
|
17
16
|
|
18
|
-
@@mutex = Mutex.new
|
19
|
-
at_exit do
|
20
|
-
close
|
21
|
-
end
|
22
|
-
|
23
17
|
default_url('bolt://neo4:neo4j@localhost:7687')
|
24
18
|
|
25
19
|
validate_uri do |uri|
|
@@ -27,13 +21,6 @@ module Neo4j
|
|
27
21
|
end
|
28
22
|
|
29
23
|
class << self
|
30
|
-
def singleton=(driver)
|
31
|
-
@@mutex.synchronize do
|
32
|
-
singleton&.close
|
33
|
-
class_variable_set(:@@singleton, driver)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
24
|
def new_instance(url)
|
38
25
|
uri = URI(url)
|
39
26
|
user = uri.user
|
@@ -45,16 +32,11 @@ module Neo4j
|
|
45
32
|
end
|
46
33
|
Neo4j::Driver::GraphDatabase.driver(url, auth_token)
|
47
34
|
end
|
48
|
-
|
49
|
-
def close
|
50
|
-
singleton&.close
|
51
|
-
end
|
52
35
|
end
|
53
36
|
|
54
37
|
def initialize(url, options = {})
|
55
38
|
self.url = url
|
56
39
|
@driver = self.class.new_instance(url)
|
57
|
-
self.class.singleton = self
|
58
40
|
@options = options
|
59
41
|
end
|
60
42
|
|
@@ -14,7 +14,7 @@ module Neo4j
|
|
14
14
|
def subscribe_to_request
|
15
15
|
ActiveSupport::Notifications.subscribe('neo4j.core.bolt.request') do |_, start, finish, _id, _payload|
|
16
16
|
ms = (finish - start) * 1000
|
17
|
-
yield " #{ANSI::BLUE}BOLT:#{ANSI::CLEAR} #{ANSI::YELLOW}#{ms.round}ms#{ANSI::CLEAR} #{
|
17
|
+
yield " #{ANSI::BLUE}BOLT:#{ANSI::CLEAR} #{ANSI::YELLOW}#{ms.round}ms#{ANSI::CLEAR} #{ActiveBase.current_driver.url_without_password}"
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
@@ -27,7 +27,7 @@ module Neo4j
|
|
27
27
|
source_line, line_number = Logging.first_external_path_and_line(caller_locations)
|
28
28
|
|
29
29
|
yield " #{ANSI::CYAN}#{query.context || 'CYPHER'}#{ANSI::CLEAR} #{cypher} #{params_string}" +
|
30
|
-
("\n ↳ #{source_line}:#{line_number}" if
|
30
|
+
("\n ↳ #{source_line}:#{line_number}" if ActiveBase.current_driver.options[:verbose_query_logs] && source_line).to_s
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
data/lib/neo4j/transaction.rb
CHANGED
@@ -22,7 +22,6 @@ module Neo4j
|
|
22
22
|
tx = Neo4j::Transaction.new
|
23
23
|
yield tx
|
24
24
|
rescue Exception => e # rubocop:disable Lint/RescueException
|
25
|
-
|
26
25
|
tx.mark_failed unless tx.nil?
|
27
26
|
raise e
|
28
27
|
ensure
|
@@ -39,7 +38,7 @@ module Neo4j
|
|
39
38
|
|
40
39
|
@root = stack.first
|
41
40
|
return unless root?
|
42
|
-
@driver_session =
|
41
|
+
@driver_session = ActiveBase.current_driver.driver.session(Neo4j::Driver::AccessMode::WRITE)
|
43
42
|
@driver_tx = @driver_session.begin_transaction
|
44
43
|
rescue StandardError => e
|
45
44
|
self.stack = []
|
data/lib/neo4j/version.rb
CHANGED
data/neo4j.gemspec
CHANGED
@@ -40,7 +40,7 @@ DESCRIPTION
|
|
40
40
|
s.add_development_dependency('guard-rspec')
|
41
41
|
s.add_development_dependency('guard-rubocop')
|
42
42
|
s.add_development_dependency('neo4j-rake_tasks', '>= 0.3.0')
|
43
|
-
s.add_development_dependency("neo4j-#{RUBY_PLATFORM =~ /java/ ? 'java' : 'ruby'}-driver", '>= 0.1.
|
43
|
+
s.add_development_dependency("neo4j-#{RUBY_PLATFORM =~ /java/ ? 'java' : 'ruby'}-driver", '>= 0.1.10')
|
44
44
|
s.add_development_dependency('os')
|
45
45
|
s.add_development_dependency('pry')
|
46
46
|
s.add_development_dependency('railties', '>= 4.0')
|
metadata
CHANGED
@@ -1,234 +1,234 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neo4j
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 10.0.0.pre.alpha.
|
4
|
+
version: 10.0.0.pre.alpha.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Ronge, Brian Underwood, Chris Grigg, Heinrich Klobuczek
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: activemodel
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
16
15
|
requirements:
|
17
16
|
- - ">="
|
18
17
|
- !ruby/object:Gem::Version
|
19
18
|
version: '4.0'
|
20
|
-
|
19
|
+
name: activemodel
|
21
20
|
prerelease: false
|
21
|
+
type: :runtime
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name: activesupport
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
30
29
|
requirements:
|
31
30
|
- - ">="
|
32
31
|
- !ruby/object:Gem::Version
|
33
32
|
version: '4.0'
|
34
|
-
|
33
|
+
name: activesupport
|
35
34
|
prerelease: false
|
35
|
+
type: :runtime
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '4.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name: i18n
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
44
43
|
requirements:
|
45
44
|
- - "!="
|
46
45
|
- !ruby/object:Gem::Version
|
47
46
|
version: 1.3.0
|
48
|
-
|
47
|
+
name: i18n
|
49
48
|
prerelease: false
|
49
|
+
type: :runtime
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "!="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.3.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name: orm_adapter
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
58
57
|
requirements:
|
59
58
|
- - "~>"
|
60
59
|
- !ruby/object:Gem::Version
|
61
60
|
version: 0.5.0
|
62
|
-
|
61
|
+
name: orm_adapter
|
63
62
|
prerelease: false
|
63
|
+
type: :runtime
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.5.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name: guard
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
72
71
|
requirements:
|
73
72
|
- - ">="
|
74
73
|
- !ruby/object:Gem::Version
|
75
74
|
version: '0'
|
76
|
-
|
75
|
+
name: guard
|
77
76
|
prerelease: false
|
77
|
+
type: :development
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name: guard-rspec
|
85
84
|
requirement: !ruby/object:Gem::Requirement
|
86
85
|
requirements:
|
87
86
|
- - ">="
|
88
87
|
- !ruby/object:Gem::Version
|
89
88
|
version: '0'
|
90
|
-
|
89
|
+
name: guard-rspec
|
91
90
|
prerelease: false
|
91
|
+
type: :development
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name: guard-rubocop
|
99
98
|
requirement: !ruby/object:Gem::Requirement
|
100
99
|
requirements:
|
101
100
|
- - ">="
|
102
101
|
- !ruby/object:Gem::Version
|
103
102
|
version: '0'
|
104
|
-
|
103
|
+
name: guard-rubocop
|
105
104
|
prerelease: false
|
105
|
+
type: :development
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name: neo4j-rake_tasks
|
113
112
|
requirement: !ruby/object:Gem::Requirement
|
114
113
|
requirements:
|
115
114
|
- - ">="
|
116
115
|
- !ruby/object:Gem::Version
|
117
116
|
version: 0.3.0
|
118
|
-
|
117
|
+
name: neo4j-rake_tasks
|
119
118
|
prerelease: false
|
119
|
+
type: :development
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: 0.3.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name: neo4j-ruby-driver
|
127
126
|
requirement: !ruby/object:Gem::Requirement
|
128
127
|
requirements:
|
129
128
|
- - ">="
|
130
129
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.1.
|
132
|
-
|
130
|
+
version: 0.1.10
|
131
|
+
name: neo4j-java-driver
|
133
132
|
prerelease: false
|
133
|
+
type: :development
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.1.
|
138
|
+
version: 0.1.10
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name: os
|
141
140
|
requirement: !ruby/object:Gem::Requirement
|
142
141
|
requirements:
|
143
142
|
- - ">="
|
144
143
|
- !ruby/object:Gem::Version
|
145
144
|
version: '0'
|
146
|
-
|
145
|
+
name: os
|
147
146
|
prerelease: false
|
147
|
+
type: :development
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
|
-
name: pry
|
155
154
|
requirement: !ruby/object:Gem::Requirement
|
156
155
|
requirements:
|
157
156
|
- - ">="
|
158
157
|
- !ruby/object:Gem::Version
|
159
158
|
version: '0'
|
160
|
-
|
159
|
+
name: pry
|
161
160
|
prerelease: false
|
161
|
+
type: :development
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
|
-
name: railties
|
169
168
|
requirement: !ruby/object:Gem::Requirement
|
170
169
|
requirements:
|
171
170
|
- - ">="
|
172
171
|
- !ruby/object:Gem::Version
|
173
172
|
version: '4.0'
|
174
|
-
|
173
|
+
name: railties
|
175
174
|
prerelease: false
|
175
|
+
type: :development
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - ">="
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '4.0'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
|
-
name: rake
|
183
182
|
requirement: !ruby/object:Gem::Requirement
|
184
183
|
requirements:
|
185
184
|
- - ">="
|
186
185
|
- !ruby/object:Gem::Version
|
187
186
|
version: '0'
|
188
|
-
|
187
|
+
name: rake
|
189
188
|
prerelease: false
|
189
|
+
type: :development
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
192
|
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
|
-
name: rubocop
|
197
196
|
requirement: !ruby/object:Gem::Requirement
|
198
197
|
requirements:
|
199
198
|
- - "~>"
|
200
199
|
- !ruby/object:Gem::Version
|
201
200
|
version: 0.56.0
|
202
|
-
|
201
|
+
name: rubocop
|
203
202
|
prerelease: false
|
203
|
+
type: :development
|
204
204
|
version_requirements: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - "~>"
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: 0.56.0
|
209
209
|
- !ruby/object:Gem::Dependency
|
210
|
-
name: yard
|
211
210
|
requirement: !ruby/object:Gem::Requirement
|
212
211
|
requirements:
|
213
212
|
- - ">="
|
214
213
|
- !ruby/object:Gem::Version
|
215
214
|
version: '0'
|
216
|
-
|
215
|
+
name: yard
|
217
216
|
prerelease: false
|
217
|
+
type: :development
|
218
218
|
version_requirements: !ruby/object:Gem::Requirement
|
219
219
|
requirements:
|
220
220
|
- - ">="
|
221
221
|
- !ruby/object:Gem::Version
|
222
222
|
version: '0'
|
223
223
|
- !ruby/object:Gem::Dependency
|
224
|
-
name: dryspec
|
225
224
|
requirement: !ruby/object:Gem::Requirement
|
226
225
|
requirements:
|
227
226
|
- - ">="
|
228
227
|
- !ruby/object:Gem::Version
|
229
228
|
version: '0'
|
230
|
-
|
229
|
+
name: dryspec
|
231
230
|
prerelease: false
|
231
|
+
type: :development
|
232
232
|
version_requirements: !ruby/object:Gem::Requirement
|
233
233
|
requirements:
|
234
234
|
- - ">="
|
@@ -392,7 +392,7 @@ metadata:
|
|
392
392
|
changelog_uri: https://github.com/neo4jrb/neo4j/blob/master/CHANGELOG.md
|
393
393
|
source_code_uri: https://github.com/neo4jrb/neo4j/
|
394
394
|
bug_tracker_uri: https://github.com/neo4jrb/neo4j/issues
|
395
|
-
post_install_message:
|
395
|
+
post_install_message:
|
396
396
|
rdoc_options:
|
397
397
|
- "--quiet"
|
398
398
|
- "--title"
|
@@ -407,15 +407,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
407
407
|
requirements:
|
408
408
|
- - ">="
|
409
409
|
- !ruby/object:Gem::Version
|
410
|
-
version:
|
410
|
+
version: 1.9.3
|
411
411
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
412
412
|
requirements:
|
413
413
|
- - ">"
|
414
414
|
- !ruby/object:Gem::Version
|
415
415
|
version: 1.3.1
|
416
416
|
requirements: []
|
417
|
-
|
418
|
-
|
417
|
+
rubyforge_project: neo4j
|
418
|
+
rubygems_version: 2.7.10
|
419
|
+
signing_key:
|
419
420
|
specification_version: 4
|
420
421
|
summary: A graph database for Ruby
|
421
422
|
test_files: []
|