currency-rate 0.3.0 → 0.3.1

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: 9fc769bce5e666ddcf164e05d828132ef3171443
4
- data.tar.gz: a9babc3f61c027df908c99eb005d000f4b0ecd78
3
+ metadata.gz: c7fd1831459d2eebe5eac6d42727472c968bd620
4
+ data.tar.gz: 936bc13c63d2722bf5bb9605a4fd331e652425bd
5
5
  SHA512:
6
- metadata.gz: bc665c976ac71fa500f74fa05015b5bdca49237ab99306381b5de5493de84f7b6e818a58112c8957a4fb35b20626478fa01048acb181a1cb0b19615e9878ea7e
7
- data.tar.gz: a43fea979996b08657167837ca2bf37723e2eecaa2b4592c75220a77bd8667bde5a91451c8243aa5cbb8751e064fe3dacec4189ccf30524d7c851646a6f87b75
6
+ metadata.gz: ec7d019099961bbdd648821b0265a0fa761fc28fe4a52c310cfade9e91d3d58e38003e0d6651b433f3d9d81687467dbc84a697d16e0271b540704f3c7b377e06
7
+ data.tar.gz: 13da783dc3a7c34cbc271cf06dd0ee65d3ced8b95b7fbb5f2c6ba31b992cace6b77fe5681232d63894d9963f61e06c0b2a0db1319c17ced4e9be61407bda22ef
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: currency-rate 0.3.0 ruby lib
5
+ # stub: currency-rate 0.3.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "currency-rate"
9
- s.version = "0.3.0"
9
+ s.version = "0.3.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
@@ -1,7 +1,7 @@
1
1
  module CurrencyRate
2
2
  class AverageRateAdapter < BtcAdapter
3
3
 
4
- DEFAULT_CURRENCIES = { from: "BTC", to: "USD" }
4
+ DEFAULT_CURRENCIES = ["USD", "BTC"]
5
5
 
6
6
  # Takes exchange rate adapters instances or classes as arguments
7
7
  def self.instance(*adapters)
@@ -5,7 +5,7 @@ module CurrencyRate
5
5
  'btc_usd' => 'https://api.bitfinex.com/v1/pubticker/btcusd',
6
6
  'ltc_usd' => 'https://api.bitfinex.com/v1/pubticker/ltcusd'
7
7
  }
8
- DEFAULT_CURRENCIES = { from: "BTC", to: "USD" }
8
+ DEFAULT_CURRENCIES = ["USD", "BTC"]
9
9
 
10
10
  def rate_for(from,to)
11
11
  super
@@ -2,7 +2,7 @@ module CurrencyRate
2
2
  class BitpayAdapter < BtcAdapter
3
3
 
4
4
  FETCH_URL = 'https://bitpay.com/api/rates'
5
- DEFAULT_CURRENCIES = { from: "BTC", to: "USD" }
5
+ DEFAULT_CURRENCIES = ["USD", "BTC"]
6
6
 
7
7
  def rate_for(from,to)
8
8
  super
@@ -6,7 +6,7 @@ module CurrencyRate
6
6
  'btc_eur' => 'https://www.bitstamp.net/api/v2/ticker/btceur/',
7
7
  'eur_usd' => 'https://www.bitstamp.net/api/v2/ticker/eurusd/'
8
8
  }
9
- DEFAULT_CURRENCIES = { from: "BTC", to: "USD" }
9
+ DEFAULT_CURRENCIES = ["USD", "BTC"]
10
10
 
11
11
  def rate_for(from,to)
12
12
  super
@@ -2,7 +2,7 @@ module CurrencyRate
2
2
  class BTCChinaAdapter < BtcAdapter
3
3
 
4
4
  FETCH_URL = 'https://data.btcchina.com/data/ticker'
5
- DEFAULT_CURRENCIES = { from: "BTC", to: "CNY" }
5
+ DEFAULT_CURRENCIES = ["CNY", "BTC"]
6
6
 
7
7
  def rate_for(from,to)
8
8
  super
@@ -8,7 +8,7 @@ module CurrencyRate
8
8
  'usd_rub' => 'https://btc-e.com/api/2/usd_rur/ticker',
9
9
  'eur_rub' => 'https://btc-e.com/api/2/eur_rur/ticker'
10
10
  }
11
- DEFAULT_CURRENCIES = { from: "BTC", to: "USD" }
11
+ DEFAULT_CURRENCIES = ["USD", "BTC"]
12
12
 
13
13
 
14
14
  def rate_for(from,to)
@@ -2,7 +2,7 @@ module CurrencyRate
2
2
  class CoinbaseAdapter < BtcAdapter
3
3
 
4
4
  FETCH_URL = 'https://coinbase.com/api/v1/currencies/exchange_rates'
5
- DEFAULT_CURRENCIES = { from: "BTC", to: "USD" }
5
+ DEFAULT_CURRENCIES = ["USD", "BTC"]
6
6
 
7
7
  def rate_for(from,to)
8
8
  super
@@ -5,7 +5,7 @@ module CurrencyRate
5
5
  'btc_cny' => 'http://api.huobi.com/staticmarket/ticker_btc_json.js',
6
6
  'ltc_cny' => 'http://api.huobi.com/staticmarket/ticker_ltc_json.js'
7
7
  }
8
- DEFAULT_CURRENCIES = { from: "BTC", to: "CNY" }
8
+ DEFAULT_CURRENCIES = ["CNY", "BTC"]
9
9
 
10
10
  def rate_for(from,to)
11
11
  super
@@ -5,7 +5,7 @@ module CurrencyRate
5
5
  "usd_btc" => 'https://api.kraken.com/0/public/Ticker?pair=xbtusd',
6
6
  "eur_btc" => 'https://api.kraken.com/0/public/Ticker?pair=xbteur'
7
7
  }
8
- DEFAULT_CURRENCIES = { from: "BTC", to: "USD" }
8
+ DEFAULT_CURRENCIES = ["USD", "BTC"]
9
9
 
10
10
  def rate_for(to,from)
11
11
  super
@@ -2,7 +2,7 @@ module CurrencyRate
2
2
  class LocalbitcoinsAdapter < BtcAdapter
3
3
 
4
4
  FETCH_URL = 'https://localbitcoins.com/bitcoinaverage/ticker-all-currencies/'
5
- DEFAULT_CURRENCIES = { from: "BTC", to: "USD" }
5
+ DEFAULT_CURRENCIES = ["USD", "BTC"]
6
6
 
7
7
  def rate_for(from,to)
8
8
  super
@@ -7,7 +7,7 @@ module CurrencyRate
7
7
  'ltc_cny' => 'https://www.okcoin.cn/api/ticker.do?symbol=ltc_cny',
8
8
  'btc_cny' => 'https://www.okcoin.cn/api/ticker.do?symbol=btc_cny'
9
9
  }
10
- DEFAULT_CURRENCIES = { from: "BTC", to: "CNY" }
10
+ DEFAULT_CURRENCIES = ["CNY", "BTC"]
11
11
 
12
12
  def rate_for(from,to)
13
13
  super
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: currency-rate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Snitko