historic_bank_rates 0.2.1 → 0.2.2
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb69f3df288e11540ed20ab70234a9611f4c9a66
|
4
|
+
data.tar.gz: 2b23307ca7fe34e25bf30673b5dd3e0cac0e68c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b94aeb180adee312e34a98b0f8c0887189648f39ca7b52bf0ac21117ad683cedf6e723526d2dbda8fe0e3111f2569fc0825e8fdc8b3fe8a572772a23380e9377
|
7
|
+
data.tar.gz: ebe13eb2c7b4e8630481d0671698a3a87b3301985b71547263a842bec2401d1554669eb59577603f7b9f67bcd846dd804334351b592cef30132e66ca8948e0b8
|
@@ -48,8 +48,8 @@ module HistoricBankRates
|
|
48
48
|
|
49
49
|
Hash[rows.map do |row|
|
50
50
|
currency = TRANSLATE[row.css(':nth-child(1) font').text.split.join(' ')]
|
51
|
-
buy = Float(row.css(':nth-child(3) font').text.delete(','
|
52
|
-
sell = Float(row.css(':nth-child(4) font').text.delete(','
|
51
|
+
buy = Float(row.css(':nth-child(3) font').text.delete(',')) rescue nil
|
52
|
+
sell = Float(row.css(':nth-child(4) font').text.delete(',')) rescue nil
|
53
53
|
next if currency.nil? || buy.nil? || sell.nil?
|
54
54
|
|
55
55
|
# average of by and sell, divide by 100 b/c conversion is given in 100 units
|
data/lib/historic_bank_rates.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: historic_bank_rates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Donkin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|