cover_my_meds 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cover_my_meds/api_request.rb +7 -1
- data/lib/cover_my_meds/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c455a4493c64718a6b8f88e661a4d8c43cf0411
|
4
|
+
data.tar.gz: 908659ebcb5d0afcfe4d2764329a531e0b07c9c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05f6a0be96e1e58bc3417c186cd35d21638c7ed946cdfab7fb76eab89a7a3fd8a6d91ee24de7748f0a5bba8400e11f5c8d29d189e1f6f564c0958ed21e496f5e
|
7
|
+
data.tar.gz: 3ae494b13510f9fdaecf48eb19b3d3a8e52c87d829c24bf7159e068db975a8dc41e8eac7373f3db9786dd8b635e99acddd2459f4e967dc2591e4daec4ea6935a
|
@@ -25,8 +25,14 @@ module CoverMyMeds
|
|
25
25
|
rest_resource = RestClient::Resource.new(uri.to_s, tail)
|
26
26
|
|
27
27
|
response = call_api http_method, rest_resource, &block
|
28
|
+
parse_response response
|
29
|
+
end
|
30
|
+
|
31
|
+
def parse_response response
|
28
32
|
return nil if response.body.empty?
|
29
|
-
|
33
|
+
JSON.parse(response.body)
|
34
|
+
rescue JSON::ParserError
|
35
|
+
response.body
|
30
36
|
end
|
31
37
|
|
32
38
|
def call_api http_method, rest_resource
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cover_my_meds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Rolston
|
@@ -21,7 +21,7 @@ authors:
|
|
21
21
|
autorequire:
|
22
22
|
bindir: exe
|
23
23
|
cert_chain: []
|
24
|
-
date: 2015-07-
|
24
|
+
date: 2015-07-21 00:00:00.000000000 Z
|
25
25
|
dependencies:
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: bundler
|
@@ -280,7 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
280
280
|
version: '0'
|
281
281
|
requirements: []
|
282
282
|
rubyforge_project:
|
283
|
-
rubygems_version: 2.
|
283
|
+
rubygems_version: 2.4.6
|
284
284
|
signing_key:
|
285
285
|
specification_version: 4
|
286
286
|
summary: CoverMyMeds Public API
|