gotransverse-tract-api 0.6.2 → 0.6.3

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: 9689ba8b949975e0feba1a256d63c50225fd1bf4
4
- data.tar.gz: 85609793ec21666f77e09bee1031425e38ebe2d6
3
+ metadata.gz: a79da998c2c2967165b2b2a4f31d631cfed9f2bb
4
+ data.tar.gz: 56ef730ddd4d26de68f33820feb582ccd953073e
5
5
  SHA512:
6
- metadata.gz: cca8b98b5ebbc86c61df8cf7bdbe04af2585db421ae16b6940de0fbae6e18201b13b35021ceae4f0bd603c185e919a0df8bec6b68bbdb9e67a5c0d930917e796
7
- data.tar.gz: 30417ee3c093d8446906727506b8eaf447b41d0da712d356f3e9ef1a31698a62319fed6e9c407dbf9d7d9643b6723f21513422c44e6cac09bbda61c0a94c0148
6
+ metadata.gz: 9bed8937848eaf0428d117fe6dd5264d6bd14cb2f8f0ce0248f3d87295b768b37fb13ba7be0b40e432a1f98126fe9b8f1d643df7306d7e5dd378a166a98b4a68
7
+ data.tar.gz: e6bbf9b76e436be361fce8b2c7f6d10715e80c4b96190b9786470021196f3ab7a2869a3fc53ebd5e2c4b7804e1b48e784d4a428830d6d95342fd8552b0ae2d56
@@ -252,6 +252,13 @@ module GoTransverseTractApi
252
252
  http_client = HTTPClient.new
253
253
  http_client.set_auth(nil, GoTransverseTractApi.configuration.username, GoTransverseTractApi.configuration.password)
254
254
 
255
+ if GoTransverseTractApi.configuration.debug_mode
256
+ pp "[GoTransverseTractApi] api_url: #{api_url.to_s}"
257
+ pp "[GoTransverseTractApi] api_params: #{api_params.to_s}"
258
+ pp "[GoTransverseTractApi] method: #{method.to_s}"
259
+ pp "[GoTransverseTractApi] request_body: #{request_body.to_s}"
260
+ end
261
+
255
262
  case method
256
263
  when :get
257
264
  response = http_client.get(api_url, api_params)
@@ -273,9 +280,15 @@ module GoTransverseTractApi
273
280
  end
274
281
 
275
282
  return hsh
276
- rescue Timeout::Error, Errno::ECONNRESET, EOFError,
277
- Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError => e
283
+
284
+ rescue Timeout::Error, Errno::ECONNRESET, EOFError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError => e
285
+ pp e if GoTransverseTractApi.configuration.debug_mode
278
286
  {message: e}
287
+
288
+ rescue => e
289
+ pp e if GoTransverseTractApi.configuration.debug_mode
290
+ {message: e}
291
+
279
292
  end
280
293
 
281
294
  #
@@ -6,6 +6,7 @@ module GoTransverseTractApi
6
6
  attr_accessor :password
7
7
 
8
8
  attr_accessor :cache_enabled
9
+ attr_accessor :debug_mode
9
10
 
10
11
  attr_accessor :tract_api_host
11
12
 
@@ -1,6 +1,6 @@
1
1
  module GoTransverseTractApi
2
2
 
3
- VERSION = "0.6.2"
3
+ VERSION = "0.6.3"
4
4
  TARGET_API_VERSION = "1.29"
5
5
 
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gotransverse-tract-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien DeFrance
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-02-11 00:00:00.000000000 Z
12
+ date: 2016-02-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler