cover_my_meds 2.0.0 → 2.0.1

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: 74b174567e3038f9f11a264351396f34ccd731e0
4
- data.tar.gz: 4243e82a9d97d287375a4af320b1eaae2a7fb314
3
+ metadata.gz: 450bd089ef6c9d4af88860b35f9f5c8558345071
4
+ data.tar.gz: 802bb98d61a410ffa92b5f6b49bf8fed073c539a
5
5
  SHA512:
6
- metadata.gz: ca41f25ef9ade5add5f04184640488f52d1dcdd4c9f6cb8a4f277e8f29f7c3de5ff1d87cd1adb8297ca50154e44b88ac9f824061a82abd6b7ca6c60398bb316f
7
- data.tar.gz: 7827e086c1df9a8a6adabafab10af9ed3dd73944ff7e313755e0bbf7bd043120fc52d60cdabe3b4afc4b0545fdb96838b84ec988180674f7586129ca2c4374cf
6
+ metadata.gz: 282affef66e98d1cc9361d98d9ddb6fd5447dbd6585f3a8e0c287e873c70451a5235cbb7ebc52b78f20cbb4b7d3782a3218a06ae35e843dbc328c9b70e603efa
7
+ data.tar.gz: 102f0312a2c440f13b4d549fcaa48df0296f12f15bd978158ad63486a2025a7a45e0ed90bc9e34ea71e5bb6cdb54423adac6d458205416679ddd9d3a9ae538ed
@@ -6,7 +6,7 @@ module CoverMyMeds
6
6
 
7
7
  # Create (and cache) a configured API client instance using the id/secret
8
8
  # stored in `Rails.application.secrets` and the configuration specified
9
- # here and in `Rails.application.config.covermymeds`
9
+ # here and in `Rails.application.config.cover_my_meds`
10
10
  def default_client
11
11
  @client ||= configured_client *credentials
12
12
  end
@@ -24,9 +24,15 @@ module CoverMyMeds
24
24
 
25
25
  private
26
26
  def credentials
27
- api_id = Rails.application.secrets.cmm_api_id || ENV['CMM_API_ID']
28
- secret = Rails.application.secrets.cmm_api_secret || ENV['CMM_API_SECRET']
29
- [ api_id, secret ]
27
+ [ try_api_id, try_secret ]
28
+ end
29
+
30
+ def try_api_id
31
+ Rails.application.try(:secrets).try(:cmm_api_id) || ENV['CMM_API_ID']
32
+ end
33
+
34
+ def try_secret
35
+ Rails.application.try(:secrets).try(:cmm_api_secret) || ENV['CMM_API_SECRET']
30
36
  end
31
37
  end
32
38
  end
@@ -1,3 +1,3 @@
1
1
  module CoverMyMeds
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
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.0
4
+ version: 2.0.1
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-08 00:00:00.000000000 Z
24
+ date: 2015-07-16 00:00:00.000000000 Z
25
25
  dependencies:
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: bundler
@@ -285,3 +285,4 @@ signing_key:
285
285
  specification_version: 4
286
286
  summary: CoverMyMeds Public API
287
287
  test_files: []
288
+ has_rdoc: