neography 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/neography/connection.rb +5 -5
- data/lib/neography/version.rb +1 -1
- data/spec/unit/connection_spec.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: 56ed8e25702a6a45aea8c53536342e35a6e8fa8f
|
4
|
+
data.tar.gz: 8f9f78b3a79689e141b1ca5ab6f4746f386fb9c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88c5026a3bf0b1d4eb72f635e1489580f655bd560523facc2a5ad2ce68fa299e384a5c8c3d3fc67a42f0b14e45d44fd7173e051086363bdc016bd803dd804325
|
7
|
+
data.tar.gz: ab6ea527071b0d20ee3f9c89d5393584748c037931e932efc7931f86574b6eb3c5fa4fee46d0a4740f0cbc8c616338471de8f4a69b41280293a3e88dd5247be8
|
data/lib/neography/connection.rb
CHANGED
@@ -118,7 +118,7 @@ module Neography
|
|
118
118
|
body = response.body.force_encoding("UTF-8")
|
119
119
|
parsed = false
|
120
120
|
end
|
121
|
-
return_result(code, body, parsed)
|
121
|
+
return_result(response, code, body, parsed)
|
122
122
|
end
|
123
123
|
|
124
124
|
def handle_batch(response)
|
@@ -133,7 +133,7 @@ module Neography
|
|
133
133
|
return code, body, true
|
134
134
|
end
|
135
135
|
|
136
|
-
def return_result(code, body, parsed)
|
136
|
+
def return_result(response, code, body, parsed)
|
137
137
|
case code
|
138
138
|
when 200
|
139
139
|
@logger.debug "OK, created #{body}" if @log_enabled
|
@@ -147,12 +147,12 @@ module Neography
|
|
147
147
|
@logger.debug "OK, no content returned" if @log_enabled
|
148
148
|
nil
|
149
149
|
when 400..500
|
150
|
-
handle_4xx_500_response(code, body)
|
150
|
+
handle_4xx_500_response(response, code, body)
|
151
151
|
nil
|
152
152
|
end
|
153
153
|
end
|
154
154
|
|
155
|
-
def handle_4xx_500_response(code, body)
|
155
|
+
def handle_4xx_500_response(response, code, body)
|
156
156
|
if body.nil? or body == ""
|
157
157
|
parsed_body = {"message" => "No error message returned from server.",
|
158
158
|
"stacktrace" => "No stacktrace returned from server." }
|
@@ -172,7 +172,7 @@ module Neography
|
|
172
172
|
message = parsed_body["message"]
|
173
173
|
stacktrace = parsed_body["stacktrace"]
|
174
174
|
|
175
|
-
@logger.error "#{
|
175
|
+
@logger.error "#{response} error: #{body}" if @log_enabled
|
176
176
|
raise_errors(code, parsed_body["exception"], message, stacktrace)
|
177
177
|
end
|
178
178
|
|
data/lib/neography/version.rb
CHANGED
@@ -109,7 +109,7 @@ module Neography
|
|
109
109
|
end
|
110
110
|
|
111
111
|
it "does requests with authentication" do
|
112
|
-
connection.client.
|
112
|
+
connection.client.should_not_receive(:set_auth).with(
|
113
113
|
"http://localhost:7474/db/data/foo/bar",
|
114
114
|
"foo",
|
115
115
|
"bar") { double.as_null_object }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neography
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max De Marzi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|