eu_central_bank 0.1.3 → 0.1.4
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.
- data/CHANGELOG.rdoc +4 -0
- data/lib/eu_central_bank.rb +2 -3
- metadata +4 -4
data/CHANGELOG.rdoc
CHANGED
data/lib/eu_central_bank.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'rubygems'
|
|
2
2
|
require 'open-uri'
|
|
3
3
|
require 'nokogiri'
|
|
4
|
-
gem 'money', '=3.
|
|
4
|
+
gem 'money', '=3.5.4'
|
|
5
5
|
require 'money'
|
|
6
6
|
|
|
7
7
|
class InvalidCache < StandardError ; end
|
|
@@ -9,7 +9,7 @@ class InvalidCache < StandardError ; end
|
|
|
9
9
|
class EuCentralBank < Money::Bank::VariableExchange
|
|
10
10
|
|
|
11
11
|
ECB_RATES_URL = 'http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml'
|
|
12
|
-
CURRENCIES = %w(USD JPY BGN CZK DKK
|
|
12
|
+
CURRENCIES = %w(USD JPY BGN CZK DKK GBP HUF LTL LVL PLN RON SEK CHF NOK HRK RUB TRY AUD BRL CAD CNY HKD IDR INR KRW MXN MYR NZD PHP SGD THB ZAR)
|
|
13
13
|
|
|
14
14
|
def update_rates(cache=nil)
|
|
15
15
|
exchange_rates(cache).each do |exchange_rate|
|
|
@@ -29,7 +29,6 @@ class EuCentralBank < Money::Bank::VariableExchange
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def exchange(cents, from_currency, to_currency)
|
|
32
|
-
warn '[DEPRECIATION] `exchange` will be removed in money v3.2.0 and eu_central_bank v0.2.0, use #exchange_with instead'
|
|
33
32
|
exchange_with(Money.new(cents, from_currency), to_currency)
|
|
34
33
|
end
|
|
35
34
|
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: eu_central_bank
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 19
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 0.1.
|
|
9
|
+
- 4
|
|
10
|
+
version: 0.1.4
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Wong Liang Zan
|
|
@@ -16,7 +16,7 @@ autorequire:
|
|
|
16
16
|
bindir: bin
|
|
17
17
|
cert_chain: []
|
|
18
18
|
|
|
19
|
-
date:
|
|
19
|
+
date: 2011-01-18 00:00:00 +08:00
|
|
20
20
|
default_executable:
|
|
21
21
|
dependencies:
|
|
22
22
|
- !ruby/object:Gem::Dependency
|