currency-rate 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/adapters/fiat/coinmonitor_adapter.rb +14 -0
- data/lib/currency_rate/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 950e602e798e7f28304ac975f823d6fae3206948d5727265c7cf26691d8ed7b5
|
4
|
+
data.tar.gz: 3f5681d9fd1493f0db80ff439c66825d75db5b3039fb4ec78a591b8dbc324033
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a4c75d34c15879cc85d1ec7fce511f2d20513fc037c92f5c3636abf505006c5c60516819b623706bb194a86626e54eb77beafdec59c5f2070ee638aa87faec6
|
7
|
+
data.tar.gz: 8fa6692c0d139a956a1e5a18cd89f9140189a3db4976496c52017537a5a446e5474d3dd5d7aa0dfc4171b78ed67a9a9c448ca6d90f3469bda75d369b3e6149ea
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module CurrencyRate
|
2
|
+
class CoinmonitorAdapter < Adapter
|
3
|
+
# No need to use it for fetching, just additional information about supported currencies
|
4
|
+
SUPPORTED_CURRENCIES = %w(ARS)
|
5
|
+
ANCHOR_CURRENCY = "USD"
|
6
|
+
FETCH_URL = "https://ar.coinmonitor.info/api/dolar_ar/"
|
7
|
+
|
8
|
+
def normalize(data)
|
9
|
+
return nil unless super
|
10
|
+
|
11
|
+
{ "anchor" => ANCHOR_CURRENCY }.merge({ SUPPORTED_CURRENCIES.first => BigDecimal(data["DOL_blue"].to_s) })
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: currency-rate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roman Snitko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|
@@ -112,6 +112,7 @@ files:
|
|
112
112
|
- lib/adapters/crypto/localbitcoins_adapter.rb
|
113
113
|
- lib/adapters/crypto/okcoin_adapter.rb
|
114
114
|
- lib/adapters/fiat/bonbast_adapter.rb
|
115
|
+
- lib/adapters/fiat/coinmonitor_adapter.rb
|
115
116
|
- lib/adapters/fiat/currency_layer_adapter.rb
|
116
117
|
- lib/adapters/fiat/fixer_adapter.rb
|
117
118
|
- lib/adapters/fiat/forge_adapter.rb
|