cryptocoin_fanboi 0.3.3 → 0.3.4

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: 5c9ff9e5223a14862febf6346ea24bccac53924f
4
- data.tar.gz: '09ba8bc18ab9e028b497dbbcf8d3c75f9d93d937'
3
+ metadata.gz: b4d0586059b2ab0c8b0fa2abda300d833adb226b
4
+ data.tar.gz: 4b7ac8129600bfe1f177adf0553b0371184efbd0
5
5
  SHA512:
6
- metadata.gz: c0496d4c10c1e4441c1163d0937872991615266055f8ac57421e2be023c6b26557f5d594991e5ce0fd90b49a24a9480d0d4d934ac1599803a4a710a0aecb3d9a
7
- data.tar.gz: 01d715448c3e1dfa8d34842f33b9a8ed2579e9f46777c6d9b634042a475c7baf1e4fbef2fee751974223d64dd81cb3c1fd22bf91b209266600e435f1908270e2
6
+ metadata.gz: 68790d09fe735761208287acec338c937a2aa2104f4de7e0630e96b6be2a241f1cc90876afd943c0c12fef7ee26e956ff4a3650c8f3a03e2ae10336224699f87
7
+ data.tar.gz: 20db6e780174264c57495341c5269a03a944293ef4d460c9f3d1c50f80d5644463c1b25ac11eab79cb7ca6352df29f2270a0a8c990132fdc82136d541f7731da
checksums.yaml.gz.sig CHANGED
Binary file
@@ -63,6 +63,7 @@ class CryptocoinFanboi
63
63
  # prices from the start of the year
64
64
 
65
65
  cache_filename = File.join(@filepath, 'cryptocoin_fanboi.yaml')
66
+ puts 'cache_filename: ' + cache_filename.inspect if @debug
66
67
  @historic_prices_file = File.join(@filepath, 'ccf_historic.yaml')
67
68
 
68
69
  @history_prices = if File.exists? @historic_prices_file then
@@ -75,8 +76,12 @@ class CryptocoinFanboi
75
76
 
76
77
  #load the file
77
78
  h = Psych.load File.read(cache_filename)
78
- puts 'h.key.first: ' + h.keys.first.inspect if @debug
79
- puts '@year: ' + @year.inspect if @debug
79
+
80
+ if @debug then
81
+ puts 'h.key.first: ' + h.keys.first.inspect
82
+ puts '@year: ' + @year.inspect
83
+ end
84
+
80
85
  @coin_prices = (h.keys.first == @year) ? h[@year] : \
81
86
  fetch_year_start_prices(@all_coins)
82
87
 
@@ -182,7 +187,7 @@ class CryptocoinFanboi
182
187
  def to_s(limit: 5, markdown: false)
183
188
 
184
189
  coins = fetch_coinlist(limit: limit).map do |coin|
185
-
190
+ puts 'coin: ' + coin.inspect if @debug
186
191
  @fields.map {|x| coin[x] }
187
192
 
188
193
  end
@@ -197,10 +202,21 @@ class CryptocoinFanboi
197
202
 
198
203
  def build_table(a, markdown: markdown, labels: @labels)
199
204
 
205
+ if @debug then
206
+ puts 'inside build_table'
207
+ puts 'a : ' + a.inspect
208
+ puts '@growth: ' + @growth.inspect
209
+ end
210
+
200
211
  coins = a.map do |x|
201
- @growth.has_key?(x[1]) ? x + [@growth[x[1]].to_s] : x
202
- end
203
-
212
+ @growth.has_key?(x[1]) ? x + [@growth[x[1]].to_s] : x + ['-']
213
+ end
214
+
215
+ if @debug then
216
+ puts 'coins+growth: ' + coins.inspect
217
+ puts 'before format_table'
218
+ end
219
+
204
220
  format_table(coins, markdown: markdown, labels: @labels)
205
221
  end
206
222
 
@@ -211,6 +227,12 @@ class CryptocoinFanboi
211
227
  end
212
228
 
213
229
  def format_table(source, markdown: markdown, labels: @labels)
230
+
231
+ if @debug then
232
+ puts 'source: ' + source.inspect
233
+ puts 'labels: ' + labels.inspect
234
+ end
235
+
214
236
  s = TableFormatter.new(source: source, labels: labels, markdown: markdown)\
215
237
  .display
216
238
 
@@ -280,8 +302,10 @@ class CryptocoinFanboi
280
302
  #
281
303
  def fetch_growth(coins, coin_prices)
282
304
 
283
- puts 'fetching growth ...' if @debug
284
- puts 'coin_prices: ' + coin_prices.inspect if @debug
305
+ if @debug then
306
+ puts 'fetching growth ...'
307
+ puts 'coin_prices: ' + coin_prices.inspect
308
+ end
285
309
 
286
310
  coins.inject({}) do |r, coin|
287
311
 
@@ -318,4 +342,4 @@ if __FILE__ == $0 then
318
342
  ccf = CryptocoinFanboi.new
319
343
  puts ccf.to_s
320
344
 
321
- end
345
+ end
data.tar.gz.sig CHANGED
Binary file
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.3.3
4
+ version: 0.3.4
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-01-16 00:00:00.000000000 Z
33
+ date: 2018-01-31 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: colored
metadata.gz.sig CHANGED
@@ -1 +1,2 @@
1
- ts6����>rK0�?tت�
1
+ 3����ul��A6�^�Sq����Hx�O���HsV�z�}P2�E�(O/�G����w�&itm�3���dO%��I��IYR+�9���� �{�A���7� �;c.�m��`�^��K�+�y���:m�*�X�?W�?7�{��C�_�U ��QdVq�r{��gI�Br� Y����KM��i�_Ȕ,�{
2
+ ��Ӽ�''�::Ou53�� ) 풘����E"e�v:�\����W�QU�L���No��y�d