neo4j-core 4.0.6 → 4.0.7
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/version.rb +1 -1
- data/lib/neo4j-server/cypher_session.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72260cb19c0dbb17236bda1cfb681a6923c0f554
|
4
|
+
data.tar.gz: 38f122d33a93040f6f438ebc973825f6defd7798
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca2066f8fb868ddd5f521f2930535f5164e26d37f6dadb9ede54cb413ef965e9dc5eab2dd1003f25a8052f74af72a0d77420e823f6573f80578ca4a5116f041a
|
7
|
+
data.tar.gz: ce86a44f21c7d5b3a1b971dfe4f472262f7ecee13c262cc86a3c607d6bac7f92beb175e165c6aacc27caec251cb3390f55c987058e4b06ef2db39bfe4d8014e5
|
data/lib/neo4j-core/version.rb
CHANGED
@@ -22,9 +22,9 @@ module Neo4j
|
|
22
22
|
# @param [Hash] params could be empty or contain basic authentication user and password
|
23
23
|
# @return [Faraday]
|
24
24
|
# @see https://github.com/lostisland/faraday
|
25
|
-
def self.create_connection(params)
|
25
|
+
def self.create_connection(params, url = nil)
|
26
26
|
init_params = params[:initialize] && params.delete(:initialize)
|
27
|
-
conn = Faraday.new(init_params) do |b|
|
27
|
+
conn = Faraday.new(url, init_params) do |b|
|
28
28
|
b.request :basic_auth, params[:basic_auth][:username], params[:basic_auth][:password] if params[:basic_auth]
|
29
29
|
b.request :json
|
30
30
|
# b.response :logger
|
@@ -44,8 +44,8 @@ module Neo4j
|
|
44
44
|
# @param [Hash] params faraday params, see #create_connection or an already created faraday connection
|
45
45
|
def self.open(endpoint_url = nil, params = {})
|
46
46
|
extract_basic_auth(endpoint_url, params)
|
47
|
-
connection = params[:connection] || create_connection(params)
|
48
47
|
url = endpoint_url || 'http://localhost:7474'
|
48
|
+
connection = params[:connection] || create_connection(params, url)
|
49
49
|
response = connection.get(url)
|
50
50
|
fail "Server not available on #{url} (response code #{response.status})" unless response.status == 200
|
51
51
|
establish_session(response.body, connection)
|