neo4j-core 7.0.0.alpha.1 → 7.0.0.alpha.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: d35477edf97f10ae13b42128f88351fd5823160f
4
- data.tar.gz: ef4e066f6673584c3863f0a68a7c0f78034755eb
3
+ metadata.gz: df21104c64aac0e5c31d57b3cac9fd30054c2ab6
4
+ data.tar.gz: c82e507fc09975bd20435df0cb6282300f1ca062
5
5
  SHA512:
6
- metadata.gz: 6855bc2443d440660c73c1f8d0270abf0ca18dca819cbae37f57a2a277e0ef9c49d166209f8377c87397d6ed1314eda0cba700e3b729c764f2b3077c38770476
7
- data.tar.gz: 0887b3a29ca9c0ce06c1352df53824678f2c571a15fd0b89da9383374af3faab6add251f927079689695d323e412c1d00721e77eb23917331b78972014f72b80
6
+ metadata.gz: b27caa2963787801f0e8bb96aefa8d83134d777bf558b610c99465fde90a28e4a100d9e7bb45f39c0396d215a47a2fd0c8bb39658cdae43f2b62d5e329401885
7
+ data.tar.gz: ab6fd5a98e469939d69f259483d0b45f11420f89012bcbab8b3d754c294e11cd9c858a6e8c4e3754a110a655efcd0b20387dec411801fc7f8134daa9912d8fd1
@@ -1,5 +1,5 @@
1
1
  module Neo4j
2
2
  module Core
3
- VERSION = '7.0.0.alpha.1'
3
+ VERSION = '7.0.0.alpha.2'
4
4
  end
5
5
  end
@@ -6,20 +6,24 @@ module Neo4j
6
6
  module Core
7
7
  class CypherSession
8
8
  class CypherError < StandardError
9
- attr_reader :code, :message, :stack_trace
9
+ attr_reader :code, :original_message, :stack_trace
10
10
 
11
- def self.new_from(code, message, stack_trace = nil)
11
+ def initialize(code = nil, original_message = nil, stack_trace = nil)
12
12
  @code = code
13
- @message = message
13
+ @original_message = original_message
14
14
  @stack_trace = stack_trace
15
15
 
16
16
  msg = <<-ERROR
17
17
  Cypher error:
18
- #{ANSI::CYAN}#{code}#{ANSI::CLEAR}: #{message}
18
+ #{ANSI::CYAN}#{code}#{ANSI::CLEAR}: #{original_message}
19
19
  #{stack_trace}
20
20
  ERROR
21
+ super(msg)
22
+ end
21
23
 
22
- error_class_from(code).new(msg)
24
+
25
+ def self.new_from(code, message, stack_trace = nil)
26
+ error_class_from(code).new(code, message, stack_trace)
23
27
  end
24
28
 
25
29
  def self.error_class_from(code)
@@ -86,7 +90,12 @@ ERROR
86
90
  end
87
91
 
88
92
  def query(session, *args)
89
- options = (args.size == 3 || (args[0].is_a?(::Neo4j::Core::Query) && args.size == 2)) ? args.pop : {}
93
+ options = case args.size
94
+ when 3
95
+ args.pop
96
+ when 2
97
+ args.pop if args[0].is_a?(::Neo4j::Core::Query)
98
+ end || {}
90
99
 
91
100
  queries(session, options) { append(*args) }[0]
92
101
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neo4j-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0.alpha.1
4
+ version: 7.0.0.alpha.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Ronge, Chris Grigg, Brian Underwood