neo4j-core 6.0.2 → 6.0.3

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: 115195d15890a6df1bf73485c14724b873c41859
4
- data.tar.gz: d13f2cf8374c12aa053d041c4f69a391321cab42
3
+ metadata.gz: 4f9471ddb19829732fa6557faf552c7f3f41b760
4
+ data.tar.gz: 4b5514acd0eb0a5128461365e4e572c141567bbc
5
5
  SHA512:
6
- metadata.gz: 13a7462cf79c75caee9b06c47e78343bcd0b71f86f462712a22ed59c4f5f8737f6462c6aaf8ecda6934349c61da3a9733194c9a4950ce1d1b61075e3186d654d
7
- data.tar.gz: 3d117e86ce43c6fdd07ce584de68dc1427afd2517a54b52bc4c4f2bf09bc89ef1ec75c550d8677beff491db98182b733693442e568c53385c788d498e03cd694
6
+ metadata.gz: ae04ef8d6ac2c5ae498e2a4e37af5c16b77d70dd13fe2acd0598cd3cfd75c67d0d1d593de0d6ad0c5fe5621986666ca80c5e0bf4da3bb6b1930e4196a63bb0f6
7
+ data.tar.gz: e1571ff74a3c8e3cb79b86a79f1d7a67f22e814a6507689345276fa2ee17ad5c98c7b26dfb3f15e1ba71287c71f217651b42ab20c1ccc459fcdd09bdd8b98c04
@@ -66,8 +66,7 @@ module Neo4j
66
66
  end
67
67
 
68
68
  def initialize(options = {})
69
- @session = options[:session]
70
- @session = Neo4j::Session.current if !options.key?(:session)
69
+ @session = options.key?(:session) ? options[:session] : Neo4j::Session.current
71
70
 
72
71
  @options = options
73
72
  @clauses = []
@@ -226,13 +225,17 @@ module Neo4j
226
225
  !!@_unwrapped_obj
227
226
  end
228
227
 
228
+ def session_is_new_api?
229
+ defined?(::Neo4j::Core::CypherSession) && @session.is_a?(::Neo4j::Core::CypherSession)
230
+ end
231
+
229
232
  def response
230
233
  return @response if @response
231
234
 
232
235
  cypher = to_cypher
233
236
  pretty_cypher = to_cypher(pretty: true) if self.class.pretty_cypher
234
237
 
235
- @response = if @session.is_a?(::Neo4j::Core::CypherSession)
238
+ @response = if session_is_new_api?
236
239
  @session.query(self)
237
240
  else
238
241
  @session._query(cypher, merge_params, context: @options[:context], pretty_cypher: pretty_cypher)
@@ -1,5 +1,5 @@
1
1
  module Neo4j
2
2
  module Core
3
- VERSION = '6.0.2'
3
+ VERSION = '6.0.3'
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.2
4
+ version: 6.0.3
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-18 00:00:00.000000000 Z
11
+ date: 2015-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty