neo4j-core 7.0.1 → 7.0.2
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/cypher_session/adaptors/http.rb +13 -7
- 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: 79b7e103a27aff9b5fd84802d7d526ca193b1ce5
|
4
|
+
data.tar.gz: 162dc719209c631148c1006a78981b621906516e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db90c90341b4665fe0dc2e43acc46a105873365baa215ec6838ca3cd2ae2c65e0385ad121ec150d871dc06a83f0f9ee825fff147c749acfb04bcd50d445bca8d
|
7
|
+
data.tar.gz: 0379d0927ec45eaa39910ed3e275bdc66ba7bd8f41d333825af47087a5080a051e8692afa47de443028a50a5fab0fd817607d71830a897e426bfa146245e997e
|
@@ -17,8 +17,6 @@ module Neo4j
|
|
17
17
|
|
18
18
|
def connect
|
19
19
|
@requestor = Requestor.new(@url, USER_AGENT_STRING, self.class.method(:instrument_request))
|
20
|
-
rescue Faraday::ConnectionFailed => e
|
21
|
-
raise CypherSession::ConnectionFailedError, "#{e.class}: #{e.message}"
|
22
20
|
end
|
23
21
|
|
24
22
|
ROW_REST = %w(row REST)
|
@@ -109,7 +107,7 @@ module Neo4j
|
|
109
107
|
@user = user
|
110
108
|
@password = password
|
111
109
|
@user_agent_string = user_agent_string
|
112
|
-
@faraday = faraday_connection
|
110
|
+
@faraday = wrap_connection_failed! { faraday_connection }
|
113
111
|
@instrument_proc = instrument_proc
|
114
112
|
end
|
115
113
|
|
@@ -124,10 +122,12 @@ module Neo4j
|
|
124
122
|
request_body = request_body(body)
|
125
123
|
url = url_from_path(path)
|
126
124
|
@instrument_proc.call(method, url, request_body) do
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
125
|
+
wrap_connection_failed! do
|
126
|
+
@faraday.run_request(method, url, request_body, REQUEST_HEADERS) do |req|
|
127
|
+
# Temporary
|
128
|
+
# req.options.timeout = 5
|
129
|
+
# req.options.open_timeout = 5
|
130
|
+
end
|
131
131
|
end
|
132
132
|
end
|
133
133
|
end
|
@@ -178,6 +178,12 @@ module Neo4j
|
|
178
178
|
end
|
179
179
|
end
|
180
180
|
|
181
|
+
def wrap_connection_failed!
|
182
|
+
yield
|
183
|
+
rescue Faraday::ConnectionFailed => e
|
184
|
+
raise CypherSession::ConnectionFailedError, "#{e.class}: #{e.message}"
|
185
|
+
end
|
186
|
+
|
181
187
|
class << self
|
182
188
|
private
|
183
189
|
|
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: 7.0.
|
4
|
+
version: 7.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: 2016-12-
|
11
|
+
date: 2016-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|