tangocard 7.0.2 → 7.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tangocard/raas.rb +3 -1
- data/lib/tangocard/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: fe68bea91e8149fff8cded0b815326d6eb8fc339
|
4
|
+
data.tar.gz: 7d8b0126a60066f9887ae74ecf9460836937ab04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 455d5024358cf9aa46d6ac0e09f94b40c56e34aa8c39b44d1cfc7fb6f03398f0b0c8404c28cdf49cae408d4eac336f3e7d0c73bd5eeabb8567cdfd7c91fd9a5f
|
7
|
+
data.tar.gz: 689e8698c3e5e3e176dfc1cfc260462f7c8d61b1747b88c38f2653aecd8824d6308071d418978244d4cbe961d2635b9bb79aa7b3a721734972a8853a96a75015
|
data/lib/tangocard/raas.rb
CHANGED
@@ -71,7 +71,9 @@ class Tangocard::Raas
|
|
71
71
|
# none
|
72
72
|
def self.rewards_index(use_cache: true)
|
73
73
|
if Tangocard.configuration.use_cache && use_cache
|
74
|
-
Tangocard.configuration.cache.read("#{Tangocard::CACHE_PREFIX}rewards_index")
|
74
|
+
cached_response = Tangocard.configuration.cache.read("#{Tangocard::CACHE_PREFIX}rewards_index")
|
75
|
+
raise Tangocard::RaasException.new('Tangocard cache is not primed. Either configure the gem to run without caching or warm the cache before calling cached endpoints') if cached_response.nil?
|
76
|
+
cached_response
|
75
77
|
else
|
76
78
|
Tangocard::Response.new(get_request('/rewards'))
|
77
79
|
end
|
data/lib/tangocard/version.rb
CHANGED