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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ff27a33f850198245146659d71d2e1ecc3bfd65
4
- data.tar.gz: 93a873fd1541660843d499211c3c26cc756ba850
3
+ metadata.gz: 5c455a4493c64718a6b8f88e661a4d8c43cf0411
4
+ data.tar.gz: 908659ebcb5d0afcfe4d2764329a531e0b07c9c8
5
5
  SHA512:
6
- metadata.gz: 000fd0b8fb2ed9c1cfe85f83287e17848871ad488589090c64a4a6739828baee7bce4103e28ffb8e18b4966994c40b887c3463510f454014df78d2c7ccc11880
7
- data.tar.gz: 97e718d5bdad28b63812b7dd093cf498dbe4414d23b1b2e5cd79e599993adb6957e8e6ff22fa277fc4353c1a2a5778457fdd18b38c2d8dd284ecf5bf281777a6
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
- return JSON.parse(response.body)
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
@@ -1,3 +1,3 @@
1
1
  module CoverMyMeds
2
- VERSION = "2.0.3"
2
+ VERSION = "2.0.4"
3
3
  end
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.3
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-20 00:00:00.000000000 Z
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.2.2
283
+ rubygems_version: 2.4.6
284
284
  signing_key:
285
285
  specification_version: 4
286
286
  summary: CoverMyMeds Public API