exchange-rates 0.0.7 → 0.0.8

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
  SHA256:
3
- metadata.gz: 99c850a6c8fced79dade83feb9033a04fcf9142a830b756d58fce0bae951fb1d
4
- data.tar.gz: b5b0fc507ab4ab637cfa089f79a3265d9cb7ef6b2bc568a2413bf3f47ef9dde6
3
+ metadata.gz: f2f7997cf5b23a8e2efbabf40f4d89d98210b4640f197e3302c03ac5f2f72a3d
4
+ data.tar.gz: cb35b7a6ea58f2b3213b732bb7f7b6ee2d1141153e16fe10b89496aec60530c9
5
5
  SHA512:
6
- metadata.gz: 1bc45671924b024876a91e0192dab791a48a2206579bb8d97b994a058757ca6342c3383915c1e774b6d21b35a982d44255c07e3cc1f72e421a344f56b9d10d60
7
- data.tar.gz: daf8dd01d43a600619afbd19e6587092b42ad73a72e5b26b57257f35d7effc1b5f5cc5a4f8c826c21e34d7c22dd653124814558553e60e55baa9b90fcff925bb
6
+ metadata.gz: 7de2585b973295a58729984273a4c68c8b4d75884ab755d96806412afa01f1e1eb4c96f7ac2220d2e5541d4219ee81c6069959cf075224f64063b45dd70e5d7a
7
+ data.tar.gz: 12d3c62911061ae9c2eefb65bdc4b3f0997402c49f4edb09eda8e7242d8f66bb8a9d2233a727bca1906fda7ab7de38eaae842555e4b67029ad623134535f6b73
@@ -26,7 +26,7 @@ module ExchangeRates
26
26
 
27
27
  def self.get_rate(currency)
28
28
  return 1 if currency == BASE_CURRENCY
29
- cached = Rails.cache.fetch("#{currency.downcase}_to_#{BASE_CURRENCY.downcase}", expired_at: Date.today.midnight + ENV['RESET_CACHED_CURRENCY_AT'].to_i.hours) do
29
+ cached = Rails.cache.fetch("#{currency.downcase}_to_#{BASE_CURRENCY.downcase}", expired_at: Date.today.midnight + ENV['RESET_CACHED_CURRENCY_AT'].to_i.hours, race_condition_ttl: 5) do
30
30
  where(from_currency: currency).first.rate_to_base_currency
31
31
  end
32
32
  cached || where(from_currency: currency).first.rate_to_base_currency
@@ -1,3 +1,3 @@
1
1
  module ExchangeRates
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exchange-rates
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - aloha
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-02 00:00:00.000000000 Z
11
+ date: 2019-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: money
@@ -142,8 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
142
  - !ruby/object:Gem::Version
143
143
  version: '0'
144
144
  requirements: []
145
- rubyforge_project:
146
- rubygems_version: 2.7.7
145
+ rubygems_version: 3.0.4
147
146
  signing_key:
148
147
  specification_version: 4
149
148
  summary: Rails ExchangeRates Helper