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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a8e5f37f8a4737e5f3ced9b4f613f9d08316227
4
- data.tar.gz: 374a383a2539f26a79d43503b70a0b08ae5d5492
3
+ metadata.gz: 79b7e103a27aff9b5fd84802d7d526ca193b1ce5
4
+ data.tar.gz: 162dc719209c631148c1006a78981b621906516e
5
5
  SHA512:
6
- metadata.gz: 358527fc8331056ed618670c3f76f215d344c19e461bf3e130bc40080e146ac36aaad58ca8454b1190250e5ea5d27d7713b6838b1416873256c1fe6da6ee9ad9
7
- data.tar.gz: 462b56fa7bfee75204acfac66534d465ae4504e7d56ac17ced98a9a6944c5149ae82ec3bdf9ddff086d9731f100cffed598fff7501c0f1c4e6a3d64fd8df235c
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
- @faraday.run_request(method, url, request_body, REQUEST_HEADERS) do |req|
128
- # Temporary
129
- # req.options.timeout = 5
130
- # req.options.open_timeout = 5
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
 
@@ -1,5 +1,5 @@
1
1
  module Neo4j
2
2
  module Core
3
- VERSION = '7.0.1'
3
+ VERSION = '7.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: 7.0.1
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-23 00:00:00.000000000 Z
11
+ date: 2016-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday