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 +4 -4
- data/lib/cover_my_meds/railtie.rb +10 -4
- data/lib/cover_my_meds/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 450bd089ef6c9d4af88860b35f9f5c8558345071
|
4
|
+
data.tar.gz: 802bb98d61a410ffa92b5f6b49bf8fed073c539a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
-
|
28
|
-
|
29
|
-
|
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
|
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.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-
|
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:
|