abokifx_indexer 0.1.2 → 0.1.3
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b01cbab8906f87f6d174cba23effa7d01b687b19
|
4
|
+
data.tar.gz: 02c246bcb4ce2c48fb7be486ec18b015d0ef9c58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8540212780369f756d0a769900bb1ac49d93bf8bd61ed52b165232436045346dc2d1bc3c551e4f7ac9ca4a7e4524c20b03872bc7f1aebc7fdc7e8dee49e747ff
|
7
|
+
data.tar.gz: 5a9481dd864548296a6a8432222451aab30f414b4697515813c5185630217cd18de38bc959225693f7792f5246fae8156c046a029ff4e85bb482b0404a0b0309
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6
6
|
|
7
|
+
## [0.1.3] - 2017-05-03
|
8
|
+
### Changed
|
9
|
+
- Fix returned rates based on counter_currency values
|
10
|
+
|
7
11
|
## [0.1.2] - 2017-05-03
|
8
12
|
### Changed
|
9
13
|
- Update `nokogiri` dependency
|
@@ -3,8 +3,8 @@ module AbokiFXIndexer
|
|
3
3
|
|
4
4
|
attribute :base_currency, String
|
5
5
|
attribute :counter_currency, String
|
6
|
-
attribute :buy_rate,
|
7
|
-
attribute :sell_rate,
|
6
|
+
attribute :buy_rate, BigDecimal
|
7
|
+
attribute :sell_rate, BigDecimal
|
8
8
|
attribute :post_date, Date
|
9
9
|
attribute :fetched_at, DateTime, default: DateTime.now
|
10
10
|
|
@@ -13,8 +13,8 @@ module AbokiFXIndexer
|
|
13
13
|
CurrencyPair.new(
|
14
14
|
base_currency: "NGN",
|
15
15
|
counter_currency: currency,
|
16
|
-
buy_rate: buy_sell_rate[:buy_rate],
|
17
|
-
sell_rate: buy_sell_rate[:sell_rate],
|
16
|
+
buy_rate: 1.0 / buy_sell_rate[:buy_rate],
|
17
|
+
sell_rate: 1.0 / buy_sell_rate[:sell_rate],
|
18
18
|
post_date: Date.strptime(post_date, "%d/%m/%Y"),
|
19
19
|
)
|
20
20
|
end
|
@@ -31,7 +31,10 @@ module AbokiFXIndexer
|
|
31
31
|
when "EUR"
|
32
32
|
latest_row.search("td")[3].text
|
33
33
|
end
|
34
|
-
{
|
34
|
+
{
|
35
|
+
buy_rate: BigDecimal.new(rates.split("/")[0]),
|
36
|
+
sell_rate: BigDecimal.new(rates.split("/")[1]),
|
37
|
+
}
|
35
38
|
end
|
36
39
|
|
37
40
|
def base_target_css_classes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abokifx_indexer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ace Subido
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|