ravelin 0.1.3 → 0.1.4

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: 020ada105c6edf6d2265ea0f7b15d107669fa073
4
- data.tar.gz: ddb667cfb451bcd593dbf698954d09f7ed417426
3
+ metadata.gz: 84d78f3e570df16a45decdfe15c5823a1304099d
4
+ data.tar.gz: 3036b14fcb3c1828de614d17f317ffabb1e9b642
5
5
  SHA512:
6
- metadata.gz: d4d6c275a47387ace45c8704d310fd1687fcf3d90b5626a253eec5a035cd208be08a79e8e94b97c4d48673dec8ab251cbca505b5222dac2e74c18fe15613cf44
7
- data.tar.gz: f54036d815a9746bf3bf7ce0cd33c864ebe5145da56c63639fee8ca21994d0acb0c5ce3234cf876de50a7869580641021b7b819ecaed29a5f965c553effdcc1b
6
+ metadata.gz: 788174c69b70d4c6abe8d6b20787946863dcb7e33d4db82ae77defa2d6ae0ce22b468c919e0102148eed86713054f0e2b7d8b970a889ac1d8b8da75fc64330b6
7
+ data.tar.gz: e1eb651425d82c3e70312ae03e81bddaae75413acfc3588e5ef1abae8b0a5b2d1a7d04213c8aeca099b4e3c8bacdcf391ff60f76011e09969ecc53696a9d7ee4
@@ -1,3 +1,12 @@
1
+ require 'faraday_middleware/response_middleware'
2
+
3
+ # This is a hack to compensate for Ravelin sending `null` in the response for 200's.
4
+ class FaradayMiddleware::ParseJson
5
+ define_parser do |body|
6
+ ::JSON.parse(body) unless body.strip.empty? || body.strip == 'null'
7
+ end
8
+ end
9
+
1
10
  module Ravelin
2
11
  class Client
3
12
  API_BASE = 'https://api.ravelin.com'
@@ -36,7 +45,7 @@ module Ravelin
36
45
  response = @connection.post(url, payload.to_json)
37
46
 
38
47
  if response.success?
39
- return Response.new(response)
48
+ Response.new(response)
40
49
  else
41
50
  handle_error_response(response)
42
51
  end
@@ -1,3 +1,3 @@
1
1
  module Ravelin
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ravelin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Levy
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2016-09-06 00:00:00.000000000 Z
14
+ date: 2016-11-16 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: faraday