cryptocoin_fanboi 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/cryptocoin_fanboi.rb +8 -5
- metadata +6 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8c01db0ba86abf6939aa6d3fb419f89fb41543d
|
4
|
+
data.tar.gz: 2586baac25d7ad61c6633c317fa62e26b02c353c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d61ad6f22245e99e426645d89d4c628da567ab011ec4a2b7950f77520c21786f6d6ac1c53834dbf48b435b8ddd6df5a45ecee3afc4e9e89f9e22b23dc6beb329
|
7
|
+
data.tar.gz: cb7967d37939570d7333f5d61f7539e61822a7b356eaf6a5d0f2eaec689cab27cfe42a5ebb09a7336833892077ae20ca9a89192b573609cf2b6c1ff2e1bb0b11
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/cryptocoin_fanboi.rb
CHANGED
@@ -63,10 +63,11 @@ class CryptocoinFanboi
|
|
63
63
|
attr_reader :coins, :all_coins
|
64
64
|
attr_accessor :colored
|
65
65
|
|
66
|
-
def initialize(watch: [], ignore: [],
|
67
|
-
|
66
|
+
def initialize(watch: [], ignore: [], colored: true,
|
67
|
+
debug: false, filepath: '.', exchangerate_key: nil)
|
68
68
|
|
69
|
-
@colored, @debug, @filepath = colored, debug,
|
69
|
+
@colored, @debug, @filepath, @exchangerate_key = colored, debug, \
|
70
|
+
filepath, exchangerate_key
|
70
71
|
|
71
72
|
@watch= watch.map(&:upcase)
|
72
73
|
@ignore = ignore.map(&:upcase)
|
@@ -190,7 +191,8 @@ class CryptocoinFanboi
|
|
190
191
|
|
191
192
|
def inspect()
|
192
193
|
|
193
|
-
c = @coins.inspect.length > 50 ?
|
194
|
+
c = @coins.inspect.length > 50 ? \
|
195
|
+
@coins.inspect[0..50] + '...' : @coins.inspect
|
194
196
|
"#<%s:%s @coins=\"%s\ @all_coins=\"...\">" % [self.class,
|
195
197
|
self.object_id, c]
|
196
198
|
end
|
@@ -282,7 +284,8 @@ class CryptocoinFanboi
|
|
282
284
|
#
|
283
285
|
def rates(coin='Bitcoin', currencies: %w(EUR GBP))
|
284
286
|
|
285
|
-
jeg = JustExchangeRates.new(base: 'USD'
|
287
|
+
jeg = JustExchangeRates.new(base: 'USD', app_id: @exchangerate_key,
|
288
|
+
debug: @debug)
|
286
289
|
usd = self.price(coin).round(2)
|
287
290
|
([:USD] + currencies.map(&:to_sym)).zip(
|
288
291
|
[usd, *currencies.map {|currency| (usd * jeg.rate(currency)).round(2) }]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cryptocoin_fanboi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
NgmsFfw10oaD3PWQ7UPxWJP14au2LUL+NGHkLrGHOMPphsZhYeXKugGO8NfcKukq
|
31
31
|
fps=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2018-
|
33
|
+
date: 2018-06-08 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: colored
|
@@ -158,20 +158,20 @@ dependencies:
|
|
158
158
|
requirements:
|
159
159
|
- - "~>"
|
160
160
|
- !ruby/object:Gem::Version
|
161
|
-
version: '0.
|
161
|
+
version: '0.3'
|
162
162
|
- - ">="
|
163
163
|
- !ruby/object:Gem::Version
|
164
|
-
version: 0.2
|
164
|
+
version: 0.3.2
|
165
165
|
type: :runtime
|
166
166
|
prerelease: false
|
167
167
|
version_requirements: !ruby/object:Gem::Requirement
|
168
168
|
requirements:
|
169
169
|
- - "~>"
|
170
170
|
- !ruby/object:Gem::Version
|
171
|
-
version: '0.
|
171
|
+
version: '0.3'
|
172
172
|
- - ">="
|
173
173
|
- !ruby/object:Gem::Version
|
174
|
-
version: 0.2
|
174
|
+
version: 0.3.2
|
175
175
|
description:
|
176
176
|
email: james@jamesrobertson.eu
|
177
177
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|