cover_my_meds 2.0.1 → 2.0.2

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: 450bd089ef6c9d4af88860b35f9f5c8558345071
4
- data.tar.gz: 802bb98d61a410ffa92b5f6b49bf8fed073c539a
3
+ metadata.gz: 832c0604cf67f424de7dbcff4c725ef5945cf9fe
4
+ data.tar.gz: 6a5e1d59277c1ed0df6f5f14cb202358011b2c94
5
5
  SHA512:
6
- metadata.gz: 282affef66e98d1cc9361d98d9ddb6fd5447dbd6585f3a8e0c287e873c70451a5235cbb7ebc52b78f20cbb4b7d3782a3218a06ae35e843dbc328c9b70e603efa
7
- data.tar.gz: 102f0312a2c440f13b4d549fcaa48df0296f12f15bd978158ad63486a2025a7a45e0ed90bc9e34ea71e5bb6cdb54423adac6d458205416679ddd9d3a9ae538ed
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
- Rails.application.try(:secrets).try(:cmm_api_id) || ENV['CMM_API_ID']
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.try(:secrets).try(:cmm_api_secret) || ENV['CMM_API_SECRET']
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
@@ -1,3 +1,3 @@
1
1
  module CoverMyMeds
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
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.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Rolston