EGP_Rates 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/egp_rates/nbe.rb +9 -1
- data/spec/egp_rates/nbe_spec.rb +4 -4
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a453b37ff85ef80f794e51403efe9535d5f52c31
|
4
|
+
data.tar.gz: 6b31a83cb1a9fc94ac82ee502bbb776de1f36367
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4345e77da70e9e1d6833558c86fa2b2493888d1f951423f2efafdf5feaf165627a502403fda3f7f6a6362ebe5de4e4572fd6bed9ecfecff08993b42e2491ba6f
|
7
|
+
data.tar.gz: 273b38df3470b7f4701cf632e3cfbb2e3c17f08ca46994200727de4fb3b79b2f5f8945ad867028270f7401bc1deb352439b22423b960a4869800334ad71f4946
|
data/lib/egp_rates/nbe.rb
CHANGED
@@ -60,7 +60,15 @@ module EGPRates
|
|
60
60
|
raw_data.each_with_object(sell: {}, buy: {}) do |row, result|
|
61
61
|
sell_rate = row[4].strip.to_f
|
62
62
|
buy_rate = row[3].strip.to_f
|
63
|
-
currency
|
63
|
+
currency = row[2].strip.to_sym
|
64
|
+
# Bahraini Dinar is BHD not BAD
|
65
|
+
# Also Qatar Rial is QAR not QTR
|
66
|
+
# Changing them for consistency
|
67
|
+
if currency == :BAD
|
68
|
+
currency = :BHD
|
69
|
+
elsif currency == :QTR
|
70
|
+
currency = :QAR
|
71
|
+
end
|
64
72
|
|
65
73
|
result[:sell][currency] = sell_rate
|
66
74
|
result[:buy][currency] = buy_rate
|
data/spec/egp_rates/nbe_spec.rb
CHANGED
@@ -50,7 +50,7 @@ describe EGPRates::NBE do
|
|
50
50
|
expect(bank.send(:parse, raw_data)[:sell]).to match(
|
51
51
|
AED: 4.8327,
|
52
52
|
AUD: 13.2557,
|
53
|
-
|
53
|
+
BHD: 47.086,
|
54
54
|
CAD: 13.3902,
|
55
55
|
CHF: 17.6144,
|
56
56
|
DKK: 2.5503,
|
@@ -61,7 +61,7 @@ describe EGPRates::NBE do
|
|
61
61
|
KWD: 58.2254,
|
62
62
|
NOK: 2.1132,
|
63
63
|
OMR: 46.1506,
|
64
|
-
|
64
|
+
QAR: 4.8748,
|
65
65
|
SAR: 4.7327,
|
66
66
|
SEK: 1.9331,
|
67
67
|
USD: 17.75
|
@@ -72,7 +72,7 @@ describe EGPRates::NBE do
|
|
72
72
|
expect(bank.send(:parse, raw_data)[:buy]).to match(
|
73
73
|
AED: 4.7645,
|
74
74
|
AUD: 12.9535,
|
75
|
-
|
75
|
+
BHD: 46.4166,
|
76
76
|
CAD: 13.1381,
|
77
77
|
CHF: 17.2891,
|
78
78
|
DKK: 2.4995,
|
@@ -83,7 +83,7 @@ describe EGPRates::NBE do
|
|
83
83
|
KWD: 57.377,
|
84
84
|
NOK: 2.0682,
|
85
85
|
OMR: 45.4133,
|
86
|
-
|
86
|
+
QAR: 4.8053,
|
87
87
|
SAR: 4.6654,
|
88
88
|
SEK: 1.8968,
|
89
89
|
USD: 17.5
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: EGP_Rates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ahmed Abdel-Razzak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -254,7 +254,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
254
254
|
version: '0'
|
255
255
|
requirements: []
|
256
256
|
rubyforge_project:
|
257
|
-
rubygems_version: 2.6.
|
257
|
+
rubygems_version: 2.6.8
|
258
258
|
signing_key:
|
259
259
|
specification_version: 4
|
260
260
|
summary: Scrape EGP exchange rate from different EG Banks
|