money-currencylayer-bank 0.5.9 → 0.6.0
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/money/bank/currencylayer_bank.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cd0e712f363b756776096cd7cb5ff5b3fbb473147f5659a524f6cd3a4d675d9
|
4
|
+
data.tar.gz: 415066f35b6dd18c2f86d9259003c26559a73a042c52c4192ab97247c0b23856
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cac0709ae73bbc1efac414dde9b770793905a3e9a5c50abc4fa1ddab7040c0626b776c5c46be46b6ca234bfed8a220c11089f62a705009f1f08dbc214bda08e5
|
7
|
+
data.tar.gz: 34e550142270e65d075183ebe528306d749f8ceaa115bd5ad3e09d1193bcc415183443f81f1ed2d2354392c4dda8616dc205fc9f5d16b4b8b30b1507793980a6
|
@@ -31,7 +31,7 @@ class Money
|
|
31
31
|
# CurrencylayerBank base class
|
32
32
|
class CurrencylayerBank < Money::Bank::VariableExchange
|
33
33
|
# CurrencylayerBank url
|
34
|
-
CL_URL = '
|
34
|
+
CL_URL = 'http://api.currencylayer.com/live'.freeze
|
35
35
|
# CurrencylayerBank secure url
|
36
36
|
CL_SECURE_URL = CL_URL.sub('http:', 'https:')
|
37
37
|
# Default base currency
|
@@ -155,6 +155,8 @@ class Money
|
|
155
155
|
# Check if rates are expired
|
156
156
|
# @return [Boolean] true if rates are expired
|
157
157
|
def expired?
|
158
|
+
return false if ttl_in_seconds.zero?
|
159
|
+
|
158
160
|
Time.now > rates_expiration
|
159
161
|
end
|
160
162
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: money-currencylayer-bank
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Egon Zemmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: money
|