cleanconscience-currency 0.7.0.11 → 0.7.0.13
Sign up to get free protection for your applications and to get access to all the features.
- data/currency.gemspec +1 -1
- data/lib/currency/exchange/rate/source/xe.rb +7 -1
- metadata +2 -2
data/currency.gemspec
CHANGED
@@ -70,7 +70,8 @@ class Currency::Exchange::Rate::Source::Xe < ::Currency::Exchange::Rate::Source:
|
|
70
70
|
raise ParserError, "Currencies header not found" if currency.empty?
|
71
71
|
|
72
72
|
# Parse out the actual rates, dealing with the explanation gunk about which currency is worth more
|
73
|
-
|
73
|
+
|
74
|
+
parsed_rates = doc.search(".currency tr:nth-child(2) td.c2.cA, .currency tr:nth-child(2) td.cLast").map do |e|
|
74
75
|
if (inner = e.search('div.aboveLayer')).size > 0
|
75
76
|
inner.inner_text.strip
|
76
77
|
else
|
@@ -90,8 +91,13 @@ class Currency::Exchange::Rate::Source::Xe < ::Currency::Exchange::Rate::Source:
|
|
90
91
|
$stderr.puts "#{cur.inspect} => #{usd_to_cur}" if @verbose
|
91
92
|
end
|
92
93
|
|
94
|
+
|
95
|
+
|
96
|
+
|
93
97
|
raise ::Currency::Exception::UnavailableRates, "No rates found in #{get_uri.inspect}" if rate.keys.empty?
|
94
98
|
|
99
|
+
|
100
|
+
|
95
101
|
raise ParserError,
|
96
102
|
[
|
97
103
|
"Not all currencies found",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cleanconscience-currency
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.0.
|
4
|
+
version: 0.7.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Asa Wilson
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-03-
|
13
|
+
date: 2009-03-23 15:07:28.103443 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|