cover_my_meds 3.2.6 → 3.2.7

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
  SHA256:
3
- metadata.gz: eccd349d46d969e4d0b7ec8453ecfd741018a73866ab342ebbf54c32b1ea6d7b
4
- data.tar.gz: 88f51ca7dbd7962f8aae19ec80e8dd5441f11aa904bbd03a57dfbe646c10cc3a
3
+ metadata.gz: 90d48e240df3b84572410a5d5e7b31c6ba2cd2d1c19a7d3e6b67aa5ebe3df258
4
+ data.tar.gz: 270acc5b6c5848c40f90017d44f2d6bf43a7b09967e8553ef38edb485873530f
5
5
  SHA512:
6
- metadata.gz: e3116757d063e5e4afa0a4c98bd7e102083fb1a5397a6275fe1456999d833bdeff85e333def438b9a19ffc5937b419e79133e026a210fa9e179b65e61e3843c1
7
- data.tar.gz: 9df156753d4a113371644026a8201fd9506d63e3c814c8146cc5f26092dca3450a338ccf596b3adedb121c19846d7e508d03dfeb05f9004d8ccf5f491f2b77d0
6
+ metadata.gz: a1fa46150f6b114918c0b36d94665060bfca384c2cf39394e43ec0b19f527f0e2bd28d0085da45f4671f26e74a00e2e666bafcd425408dc14c603660761276ba
7
+ data.tar.gz: 6826f771ae6e8447fc0ee78c24176491d9f0027043b759b4359285ec687f5cfb215e183c5bbe5444230270c0594af7e9efa72879a960bb4200d7b9393558bb88
@@ -34,5 +34,5 @@ Gem::Specification.new do |spec|
34
34
  spec.add_runtime_dependency "typhoeus"
35
35
  spec.add_runtime_dependency "mime-types"
36
36
  spec.add_runtime_dependency "hashie", ">= 3.4.0"
37
- spec.add_runtime_dependency "activesupport"
37
+ spec.add_runtime_dependency "activesupport", '>= 4.2.2'
38
38
  end
@@ -38,7 +38,7 @@ module CoverMyMeds
38
38
  request.headers.merge! headers
39
39
  request.body = block_given? ? yield : {}
40
40
  end
41
- raise Error::HTTPError.new(response.status, response.body, http_method, conn) unless response.success?
41
+ raise Error::HTTPError.new(response.status, response.body, http_method, url(host, path, params)) unless response.success?
42
42
 
43
43
  parse_response response
44
44
  end
@@ -49,5 +49,11 @@ module CoverMyMeds
49
49
  rescue JSON::ParserError
50
50
  response.body
51
51
  end
52
+
53
+ def url(host, path, params)
54
+ "#{host}#{path}".tap do |url|
55
+ url << "?#{params.to_query}" if params.present?
56
+ end
57
+ end
52
58
  end
53
59
  end
@@ -2,22 +2,22 @@ module CoverMyMeds
2
2
  module Error
3
3
  class HTTPError < StandardError
4
4
 
5
- def initialize status, message, http_method, rest_resource
5
+ def initialize status, message, http_method, url
6
6
  @status = status
7
7
  @error_json = message
8
8
  @http_method = http_method
9
- @rest_resource = rest_resource
9
+ @url = url
10
10
  end
11
11
 
12
12
  def message
13
13
  <<-EOS.gsub(/^ {10}/, "")
14
14
  #{@status}: #{@error_json}
15
15
  in response to:
16
- #{@http_method.upcase} #{@rest_resource}
16
+ #{@http_method.upcase} #{@url}
17
17
  EOS
18
18
  end
19
19
 
20
- attr_reader :status, :error_json, :http_method, :rest_resource
20
+ attr_reader :status, :error_json, :http_method, :url
21
21
 
22
22
  end
23
23
 
@@ -1,3 +1,3 @@
1
1
  module CoverMyMeds
2
- VERSION = "3.2.6"
2
+ VERSION = "3.2.7"
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: 3.2.6
4
+ version: 3.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Rolston
@@ -23,7 +23,7 @@ authors:
23
23
  autorequire:
24
24
  bindir: exe
25
25
  cert_chain: []
26
- date: 2018-11-01 00:00:00.000000000 Z
26
+ date: 2019-04-23 00:00:00.000000000 Z
27
27
  dependencies:
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: bundler
@@ -241,14 +241,14 @@ dependencies:
241
241
  requirements:
242
242
  - - ">="
243
243
  - !ruby/object:Gem::Version
244
- version: '0'
244
+ version: 4.2.2
245
245
  type: :runtime
246
246
  prerelease: false
247
247
  version_requirements: !ruby/object:Gem::Requirement
248
248
  requirements:
249
249
  - - ">="
250
250
  - !ruby/object:Gem::Version
251
- version: '0'
251
+ version: 4.2.2
252
252
  description: The public version of CoverMyMeds API
253
253
  email:
254
254
  - jrolston@covermymeds.com
@@ -313,8 +313,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
313
313
  - !ruby/object:Gem::Version
314
314
  version: '0'
315
315
  requirements: []
316
- rubyforge_project:
317
- rubygems_version: 2.7.7
316
+ rubygems_version: 3.0.3
318
317
  signing_key:
319
318
  specification_version: 4
320
319
  summary: CoverMyMeds Public API