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 +4 -4
- data/lib/athena_health/connection.rb +9 -3
- data/lib/athena_health/version.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: 1cde36923a5840997a97f3491c57dcc71a0ba70e
|
4
|
+
data.tar.gz: 1e8490c0742bd044a076fb9c9cabdb4415d2fd29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 =
|
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
|
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.
|
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
|
+
date: 2016-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|