cryptocoin_fanboi 0.5.4 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 27cae82a02da0d5ebc25cfcb1c4dccc11b2c7ab7
4
- data.tar.gz: 8b10cee37c9d501214baaaabae8e78e3db8b7c0b
3
+ metadata.gz: c8c01db0ba86abf6939aa6d3fb419f89fb41543d
4
+ data.tar.gz: 2586baac25d7ad61c6633c317fa62e26b02c353c
5
5
  SHA512:
6
- metadata.gz: ad884e74f813dc4d71fb08029e3a43ed895f3e2f189e267eaa9586dfd9004fb50d14bc9b0eeeaf706154eb3aa60299c4a39b523d464845b43ed3c7ae316f20b0
7
- data.tar.gz: f650d06018bad4e16eb7a0b165fdb0d2ecfe205d75ecc496b16903dd137464822180f4013f3aafa1325835771f5512a2d1f5fb66604011369ab9d676751bda7e
6
+ metadata.gz: d61ad6f22245e99e426645d89d4c628da567ab011ec4a2b7950f77520c21786f6d6ac1c53834dbf48b435b8ddd6df5a45ecee3afc4e9e89f9e22b23dc6beb329
7
+ data.tar.gz: cb7967d37939570d7333f5d61f7539e61822a7b356eaf6a5d0f2eaec689cab27cfe42a5ebb09a7336833892077ae20ca9a89192b573609cf2b6c1ff2e1bb0b11
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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
- colored: true, debug: false, filepath: '.')
66
+ def initialize(watch: [], ignore: [], colored: true,
67
+ debug: false, filepath: '.', exchangerate_key: nil)
68
68
 
69
- @colored, @debug, @filepath = colored, debug, filepath
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 ? @coins.inspect[0..50] + '...' : @coins.inspect
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
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-05-02 00:00:00.000000000 Z
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.2'
161
+ version: '0.3'
162
162
  - - ">="
163
163
  - !ruby/object:Gem::Version
164
- version: 0.2.1
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.2'
171
+ version: '0.3'
172
172
  - - ">="
173
173
  - !ruby/object:Gem::Version
174
- version: 0.2.1
174
+ version: 0.3.2
175
175
  description:
176
176
  email: james@jamesrobertson.eu
177
177
  executables: []
metadata.gz.sig CHANGED
Binary file