cover_my_meds 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cover_my_meds/railtie.rb +9 -2
- data/lib/cover_my_meds/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 832c0604cf67f424de7dbcff4c725ef5945cf9fe
|
|
4
|
+
data.tar.gz: 6a5e1d59277c1ed0df6f5f14cb202358011b2c94
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0e0318497cb28d3a7dbf866cf6adca0bd781f1aaef6710a7a65cab4223f144e2643180c8e86520003cf25e0ccbea358b13640966f852230ad9eddcf23cdbb565
|
|
7
|
+
data.tar.gz: 643f0994b9ef4af04efd6657e89c7de769eb1a4cd9ad254b23f94849dc3b1885c3fb4d6bfbf6af3d31ccb1acb26c70d62639dc109cd014313a11626bf0ccd86e
|
|
@@ -28,11 +28,18 @@ module CoverMyMeds
|
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
def try_api_id
|
|
31
|
-
|
|
31
|
+
# Normally this would be a good place to use Object#try, but the Rails 3
|
|
32
|
+
# implementation doesn't rescue from NoMethodError like the Rails 4 one
|
|
33
|
+
# does, and that's EXACTLY the use case we are supporting here.
|
|
34
|
+
Rails.application.secrets.cmm_api_id || ENV['CMM_API_ID']
|
|
35
|
+
rescue NoMethodError
|
|
36
|
+
ENV['CMM_API_ID']
|
|
32
37
|
end
|
|
33
38
|
|
|
34
39
|
def try_secret
|
|
35
|
-
Rails.application.
|
|
40
|
+
Rails.application.secrets.cmm_api_secret || ENV['CMM_API_SECRET']
|
|
41
|
+
rescue NoMethodError
|
|
42
|
+
ENV['CMM_API_SECRET']
|
|
36
43
|
end
|
|
37
44
|
end
|
|
38
45
|
end
|