currency-rate 0.3.1 → 0.3.2

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: c7fd1831459d2eebe5eac6d42727472c968bd620
4
- data.tar.gz: 936bc13c63d2722bf5bb9605a4fd331e652425bd
3
+ metadata.gz: 68e3d9c56f84600c59e3b3889e7d0430e1b75477
4
+ data.tar.gz: bc808a2667e29c9a5f965c70f2d195bd2d6974e2
5
5
  SHA512:
6
- metadata.gz: ec7d019099961bbdd648821b0265a0fa761fc28fe4a52c310cfade9e91d3d58e38003e0d6651b433f3d9d81687467dbc84a697d16e0271b540704f3c7b377e06
7
- data.tar.gz: 13da783dc3a7c34cbc271cf06dd0ee65d3ced8b95b7fbb5f2c6ba31b992cace6b77fe5681232d63894d9963f61e06c0b2a0db1319c17ced4e9be61407bda22ef
6
+ metadata.gz: 6d88b0c73e9632132bec4cdf7ed9c4475e58b74d4548323b0c8ad2db0b7a0540661422fcbeaf9eeaec8077c294fbd57be47528cbdd2beffa6a7fad0883ac4700
7
+ data.tar.gz: 23709972d298ee09925fee4840fc09c5ad3ed94ddbb193c3f7bd157a8c008866474d1459e58ea16096073b4a16343045c0bb0e8a1aa4d9457788c11f7c70e4ea
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -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.1 ruby lib
5
+ # stub: currency-rate 0.3.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "currency-rate"
9
- s.version = "0.3.1"
9
+ s.version = "0.3.2"
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"]
@@ -40,6 +40,10 @@ module CurrencyRate
40
40
  to == 'BTC' ? result.round(9) : result.round(2)
41
41
  end
42
42
 
43
+ def self.default_currencies_for(adapter_name)
44
+ adapter_class(adapter_name).class::DEFAULT_CURRENCIES
45
+ end
46
+
43
47
  private
44
48
 
45
49
  def self.adapter_class(s)
@@ -28,5 +28,9 @@ describe CurrencyRate do
28
28
  expect(CurrencyRate.convert('Bitstamp', amount: 60181.81, from: 'RUB', to: 'USD')).to eq(1000)
29
29
  end
30
30
 
31
+ it "gets default currencies for an adapter" do
32
+ expect(CurrencyRate.default_currencies_for("Bitstamp")).to eq(["USD", "BTC"])
33
+ end
34
+
31
35
 
32
36
  end
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.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Snitko