neo4j-core 6.0.1 → 6.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dd1d6ba3b0b7755db583aa51c4f07fe15644b830
4
- data.tar.gz: 28762ff5d6ed8589e01db34c01aabea4bcaac525
3
+ metadata.gz: 115195d15890a6df1bf73485c14724b873c41859
4
+ data.tar.gz: d13f2cf8374c12aa053d041c4f69a391321cab42
5
5
  SHA512:
6
- metadata.gz: 1949a038cf490c4fc8e40f6254ea897a602295d27a1ec7507fba95501192e9a24b1ce972ab9c07c66b410baa23a2274c0da30ae1e88be51c28299fc9519090aa
7
- data.tar.gz: ad8b725b6ef57f2a2f692eb3f0baae81a215b0de815ea0961dfde9350e24d169b854f9b99617f7796698093bd3a954572bf6b12ac64f1a0f0a4570b657ee3ea6
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
- @@current_session
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
- @@current_session = session
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 @@current_session
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
- @@current_session = nil if @@current_session == session
203
+ set_current(nil) if current == session
205
204
  end
206
205
 
207
206
  def inspect
@@ -1,5 +1,5 @@
1
1
  module Neo4j
2
2
  module Core
3
- VERSION = '6.0.1'
3
+ VERSION = '6.0.2'
4
4
  end
5
5
  end
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.1
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-10 00:00:00.000000000 Z
11
+ date: 2015-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty