athena_health 0.8.5 → 0.8.6

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: eedc1de9fb1f77c34f43390fa49635ca045d6694
4
- data.tar.gz: ef4d070532584d44bf0ce41a60f401ef43f5a44f
3
+ metadata.gz: 1cde36923a5840997a97f3491c57dcc71a0ba70e
4
+ data.tar.gz: 1e8490c0742bd044a076fb9c9cabdb4415d2fd29
5
5
  SHA512:
6
- metadata.gz: 1e25253efe4c25be44c260ef752b16b9e03aa42fa962fd8a3ec8e18241b31077ae323bd64f8f08aeb8b0b30b77f6649febf7d54dd884eeb823f9d3dff762d04e
7
- data.tar.gz: bb922bfdee05ccb0a6fce5d6338fb171cc36e32bf2873705c05e2b92eb2d2c7a20df73b94f089806b8adfb3b102e14530fe3686d3f920e731314e6a2db2394bd
6
+ metadata.gz: a46cb5acf1dea4055ba1acbbb91a664bca5903a9922fd64be05556929ae9ea7ed20c66d439fd6c532567d5a1000f55be04f6d68da4e0f2bf7023d5bd26aef970
7
+ data.tar.gz: 0ebfcdf63fddff9a3b82e421769de18b72fd747f49df0b6d126a084f1d70d567fafa4d76984583cba7a50d369343ad4127e8cb18f333e1470d7d870471d39259
@@ -37,17 +37,23 @@ module AthenaHealth
37
37
  call(endpoint: endpoint, method: method, second_call: true)
38
38
  end
39
39
 
40
- body = JSON.parse(response.response_body)
40
+ body = response.response_body
41
41
 
42
42
  if [400, 409].include? response.response_code
43
- fail AthenaHealth::ValidationError.new(body)
43
+ fail AthenaHealth::ValidationError.new(json_response(body))
44
44
  end
45
45
 
46
46
  if response.response_code != 200
47
47
  AthenaHealth::Error.new(code: response.response_code).render
48
48
  end
49
49
 
50
- body
50
+ json_response(body)
51
+ end
52
+
53
+ private
54
+
55
+ def json_response(body)
56
+ JSON.parse(body)
51
57
  end
52
58
  end
53
59
  end
@@ -1,3 +1,3 @@
1
1
  module AthenaHealth
2
- VERSION = '0.8.5'.freeze
2
+ VERSION = '0.8.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: athena_health
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.5
4
+ version: 0.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mateusz Urbański
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-11 00:00:00.000000000 Z
11
+ date: 2016-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus