neography 1.3.1 → 1.3.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: bea6a486eea4764972a7cc858acf46dfc65a7dfb
4
- data.tar.gz: 81af1a37e6eddc6b454a1828aac084ff44e5060a
3
+ metadata.gz: 56ed8e25702a6a45aea8c53536342e35a6e8fa8f
4
+ data.tar.gz: 8f9f78b3a79689e141b1ca5ab6f4746f386fb9c3
5
5
  SHA512:
6
- metadata.gz: cd4029c994e048e260d520aafff6c66c80c92238ea64594d11e45fd1f8c9968ab333009464aa74073177287441e02a8bebbdff9c847fafc353c2c746633f13e9
7
- data.tar.gz: 46fd0ab7860c0f15b6db0600c0cf728fd82c4e69736a397c61c9c13aecae673f600a3c5e4255067c00e1e6d68565fcd48223f3da72b5b39eb625d2c4ec80e8ea
6
+ metadata.gz: 88c5026a3bf0b1d4eb72f635e1489580f655bd560523facc2a5ad2ce68fa299e384a5c8c3d3fc67a42f0b14e45d44fd7173e051086363bdc016bd803dd804325
7
+ data.tar.gz: ab6ea527071b0d20ee3f9c89d5393584748c037931e932efc7931f86574b6eb3c5fa4fee46d0a4740f0cbc8c616338471de8f4a69b41280293a3e88dd5247be8
@@ -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 "#{code} error: #{body}" if @log_enabled
175
+ @logger.error "#{response} error: #{body}" if @log_enabled
176
176
  raise_errors(code, parsed_body["exception"], message, stacktrace)
177
177
  end
178
178
 
@@ -1,3 +1,3 @@
1
1
  module Neography
2
- VERSION = "1.3.1"
2
+ VERSION = "1.3.2"
3
3
  end
@@ -109,7 +109,7 @@ module Neography
109
109
  end
110
110
 
111
111
  it "does requests with authentication" do
112
- connection.client.should_receive(:set_auth).with(
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.1
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-13 00:00:00.000000000 Z
11
+ date: 2013-12-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec