neo4j-core 6.0.3 → 6.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/neo4j-core/version.rb +1 -1
- data/lib/neo4j/session.rb +5 -4
- 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: d95034073fb92df2e8b72de9492fe9aa15adb2e0
|
4
|
+
data.tar.gz: acc773e9876c5a9f3f061a3ce948a7756c1c1787
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d45f87366cf51dc62db63ece6ff67a75160f18bfb6bb46189368377a324f4604f2f6d6739baf1027fdd89f1c52a0e5bdacc485db7e8ee77922870b7f4ab34ff5
|
7
|
+
data.tar.gz: 54b90caf3e8546464bea2ad7acd88165177fc09001392a9440f1e0e89caae8332ccfac5a565675243a00e777a766fde9f7ec24128ffef13961953112d692ed6e
|
data/lib/neo4j-core/version.rb
CHANGED
data/lib/neo4j/session.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
module Neo4j
|
2
2
|
class Session
|
3
|
+
@@current_session = nil
|
3
4
|
@@all_sessions = {}
|
4
5
|
@@factories = {}
|
5
6
|
|
@@ -121,7 +122,7 @@ module Neo4j
|
|
121
122
|
|
122
123
|
# @return [Neo4j::Session] the current session
|
123
124
|
def current
|
124
|
-
|
125
|
+
@@current_session
|
125
126
|
end
|
126
127
|
|
127
128
|
# Returns the current session or raise an exception if no session is available
|
@@ -143,7 +144,7 @@ module Neo4j
|
|
143
144
|
# Sets the session to be used as default
|
144
145
|
# @param [Neo4j::Session] session the session to use
|
145
146
|
def set_current(session)
|
146
|
-
|
147
|
+
@@current_session = session
|
147
148
|
end
|
148
149
|
|
149
150
|
# Registers a callback which will be called immediately if session is already available,
|
@@ -192,7 +193,7 @@ module Neo4j
|
|
192
193
|
if default == true
|
193
194
|
set_current(session)
|
194
195
|
elsif default.nil?
|
195
|
-
set_current(session) unless
|
196
|
+
set_current(session) unless @@current_session
|
196
197
|
end
|
197
198
|
@@all_sessions[name] = session if name
|
198
199
|
session
|
@@ -200,7 +201,7 @@ module Neo4j
|
|
200
201
|
|
201
202
|
# @private
|
202
203
|
def unregister(session)
|
203
|
-
|
204
|
+
@@current_session = nil if @@current_session == session
|
204
205
|
end
|
205
206
|
|
206
207
|
def inspect
|
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.4
|
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-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|