neo4j-core 6.0.1 → 6.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/neo4j/session.rb +4 -5
- data/lib/neo4j-core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 115195d15890a6df1bf73485c14724b873c41859
|
4
|
+
data.tar.gz: d13f2cf8374c12aa053d041c4f69a391321cab42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13a7462cf79c75caee9b06c47e78343bcd0b71f86f462712a22ed59c4f5f8737f6462c6aaf8ecda6934349c61da3a9733194c9a4950ce1d1b61075e3186d654d
|
7
|
+
data.tar.gz: 3d117e86ce43c6fdd07ce584de68dc1427afd2517a54b52bc4c4f2bf09bc89ef1ec75c550d8677beff491db98182b733693442e568c53385c788d498e03cd694
|
data/lib/neo4j/session.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
module Neo4j
|
2
2
|
class Session
|
3
|
-
@@current_session = nil
|
4
3
|
@@all_sessions = {}
|
5
4
|
@@factories = {}
|
6
5
|
|
@@ -122,7 +121,7 @@ module Neo4j
|
|
122
121
|
|
123
122
|
# @return [Neo4j::Session] the current session
|
124
123
|
def current
|
125
|
-
|
124
|
+
Thread.current[:neo4j_curr_session]
|
126
125
|
end
|
127
126
|
|
128
127
|
# Returns the current session or raise an exception if no session is available
|
@@ -144,7 +143,7 @@ module Neo4j
|
|
144
143
|
# Sets the session to be used as default
|
145
144
|
# @param [Neo4j::Session] session the session to use
|
146
145
|
def set_current(session)
|
147
|
-
|
146
|
+
Thread.current[:neo4j_curr_session] = session
|
148
147
|
end
|
149
148
|
|
150
149
|
# Registers a callback which will be called immediately if session is already available,
|
@@ -193,7 +192,7 @@ module Neo4j
|
|
193
192
|
if default == true
|
194
193
|
set_current(session)
|
195
194
|
elsif default.nil?
|
196
|
-
set_current(session) unless
|
195
|
+
set_current(session) unless current
|
197
196
|
end
|
198
197
|
@@all_sessions[name] = session if name
|
199
198
|
session
|
@@ -201,7 +200,7 @@ module Neo4j
|
|
201
200
|
|
202
201
|
# @private
|
203
202
|
def unregister(session)
|
204
|
-
|
203
|
+
set_current(nil) if current == session
|
205
204
|
end
|
206
205
|
|
207
206
|
def inspect
|
data/lib/neo4j-core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neo4j-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.0.
|
4
|
+
version: 6.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Ronge, Chris Grigg, Brian Underwood
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|