eu_central_bank 1.6.0 → 1.6.1

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: f8305b19d4e97311f612dff41676d21546bde2ee5bdf34ca0a11b329681f8cc1
4
- data.tar.gz: 272e8a8bc25af1aca904743b5336865bb40725874a60161fe700c49ebff5e6e3
3
+ metadata.gz: 5a531cbda27d58075c18fb0ed04177d5d16872e178046854495fe87c2094678e
4
+ data.tar.gz: b87062758ed6a9ef559fbd42a8d3bdf4f59366abd3c201951a01af62bbfb46df
5
5
  SHA512:
6
- metadata.gz: 43df545b3f015459fd1a10065e4989afe35ab57f0dcc34c989dcf008de739e82887223d1c4fe5d995203b612f33f2ec30c3e252f6d8585f7299484c59bd0117a
7
- data.tar.gz: 511ed0225001148ee8cc84a3a0e9c7d7a6f31663399a762ee98ed5a254589e791320959ef44fde7950949c8cf1274a0310d31b6963f8256cda7352f53cbd08e4
6
+ metadata.gz: fffe386b9fadfa03a24e36e77bb52d66df0c21e9d042e96a74e945b314798ee942938a3e2f9aec29c69aabedd2b3934bca780574112c842764f7708816ddeee9
7
+ data.tar.gz: 6f495beaafc197894bbeecb9333f31d4d5b530879f64d162442fc8389793a23f87096100ee5ebc9a978143f350445dbd6e0c6651448dddc870b35e7efac8da04
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # eu_central_bank changelog
2
2
 
3
+ ## 1.6.1 (Mar 3 2021)
4
+
5
+ * Allow a fallback when loading cached rate files to inhibit network fetch.
6
+
3
7
  ## 1.5.0 (Dec 7 2019)
4
8
 
5
9
  * Fix issue with money gem incompatibility
data/LICENSE CHANGED
@@ -1,20 +1,22 @@
1
+ MIT License
2
+
1
3
  Copyright (c) 2009 Wong Liang Zan
4
+ Copyright (c) 2021 Shane Emmons
2
5
 
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
10
12
 
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
13
15
 
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
data/README.md CHANGED
@@ -25,7 +25,7 @@ gem 'nokogiri', '1.6.8'
25
25
 
26
26
  ## Usage
27
27
 
28
- With the gem, you do not need to manually add exchange rates. Calling update_rates will download the rates from the European Central Bank. The API is the same as the money gem. Feel free to use Money objects with the bank.
28
+ With the gem, you do not need to manually add exchange rates. Calling `update_rates` will download the rates from the European Central Bank. The API is the same as the money gem. Feel free to use Money objects with the bank.
29
29
 
30
30
  ``` ruby
31
31
  require 'eu_central_bank'
@@ -25,8 +25,8 @@ class EuCentralBank < Money::Bank::VariableExchange
25
25
  @currency_string = nil
26
26
  end
27
27
 
28
- def update_rates(cache=nil)
29
- update_parsed_rates(doc(cache))
28
+ def update_rates(cache=nil, url=ECB_RATES_URL)
29
+ update_parsed_rates(doc(cache, url))
30
30
  end
31
31
 
32
32
  def update_historical_rates(cache=nil)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eu_central_bank
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Emmons
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-17 00:00:00.000000000 Z
11
+ date: 2021-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  requirements: []
93
- rubygems_version: 3.0.3
93
+ rubygems_version: 3.2.3
94
94
  signing_key:
95
95
  specification_version: 4
96
96
  summary: Calculates exchange rates based on rates from european central bank. Money