cryptocoin_fanboi 0.3.4 → 0.4.0
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/cryptocoin_fanboi.rb +22 -2
- data.tar.gz.sig +0 -0
- metadata +44 -4
- metadata.gz.sig +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6647efad3d6df21445369ae23f75f0adae01e0d3
|
|
4
|
+
data.tar.gz: 720d9e7412149fb090369c87907947cbc335e768
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7228b523021fa1c781870f1b270318c8db457044b27944fe6ebf014ebb4978ab39b396f5054b90faa8b87ec5578c8faacabb9d7448d64c664b30789c7242df3a
|
|
7
|
+
data.tar.gz: a426444e35bfe40e71a1245eb80254ae70674f2dda3288ab436be6ee6dabf371090df1126cf005b26d48a3f782a5a7fe0867e42c29bfac3fc45a17bee486f61a
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/cryptocoin_fanboi.rb
CHANGED
|
@@ -8,6 +8,8 @@ require 'colored'
|
|
|
8
8
|
require 'coinmarketcap'
|
|
9
9
|
require 'table-formatter'
|
|
10
10
|
require 'rxfhelper'
|
|
11
|
+
require 'rexle'
|
|
12
|
+
require 'kramdown'
|
|
11
13
|
|
|
12
14
|
|
|
13
15
|
=begin
|
|
@@ -116,7 +118,11 @@ class CryptocoinFanboi
|
|
|
116
118
|
end
|
|
117
119
|
|
|
118
120
|
def find(name)
|
|
119
|
-
|
|
121
|
+
|
|
122
|
+
if @debug then
|
|
123
|
+
puts 'inside find: name: ' + name.inspect
|
|
124
|
+
puts 'coins: ' + @coins.inspect
|
|
125
|
+
end
|
|
120
126
|
coins.find {|coin| coin.name =~ /#{name}/i }
|
|
121
127
|
|
|
122
128
|
end
|
|
@@ -183,6 +189,20 @@ class CryptocoinFanboi
|
|
|
183
189
|
|
|
184
190
|
alias last_day today
|
|
185
191
|
alias day today
|
|
192
|
+
|
|
193
|
+
def to_html()
|
|
194
|
+
|
|
195
|
+
xpath = (5..8).map {|x| 'tbody/tr/td[' + x.to_s + ']' }.join(' | ')
|
|
196
|
+
doc = Rexle.new(Kramdown::Document.new(self.to_s(markdown:true)).to_html)
|
|
197
|
+
doc.root.xpath(xpath).each do |x|
|
|
198
|
+
|
|
199
|
+
x.attributes['class'] = (x.text[0] == '-' ? 'negative' : 'positive')
|
|
200
|
+
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
doc.root.xml
|
|
204
|
+
|
|
205
|
+
end
|
|
186
206
|
|
|
187
207
|
def to_s(limit: 5, markdown: false)
|
|
188
208
|
|
|
@@ -236,7 +256,7 @@ class CryptocoinFanboi
|
|
|
236
256
|
s = TableFormatter.new(source: source, labels: labels, markdown: markdown)\
|
|
237
257
|
.display
|
|
238
258
|
|
|
239
|
-
return s if @colored == false
|
|
259
|
+
return s if @colored == false or markdown
|
|
240
260
|
|
|
241
261
|
a = s.lines
|
|
242
262
|
|
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.
|
|
4
|
+
version: 0.4.0
|
|
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-03-05 00:00:00.000000000 Z
|
|
34
34
|
dependencies:
|
|
35
35
|
- !ruby/object:Gem::Dependency
|
|
36
36
|
name: colored
|
|
@@ -101,7 +101,7 @@ dependencies:
|
|
|
101
101
|
version: '0.4'
|
|
102
102
|
- - ">="
|
|
103
103
|
- !ruby/object:Gem::Version
|
|
104
|
-
version: 0.4.
|
|
104
|
+
version: 0.4.5
|
|
105
105
|
type: :runtime
|
|
106
106
|
prerelease: false
|
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -111,7 +111,47 @@ dependencies:
|
|
|
111
111
|
version: '0.4'
|
|
112
112
|
- - ">="
|
|
113
113
|
- !ruby/object:Gem::Version
|
|
114
|
-
version: 0.4.
|
|
114
|
+
version: 0.4.5
|
|
115
|
+
- !ruby/object:Gem::Dependency
|
|
116
|
+
name: rexle
|
|
117
|
+
requirement: !ruby/object:Gem::Requirement
|
|
118
|
+
requirements:
|
|
119
|
+
- - "~>"
|
|
120
|
+
- !ruby/object:Gem::Version
|
|
121
|
+
version: '1.4'
|
|
122
|
+
- - ">="
|
|
123
|
+
- !ruby/object:Gem::Version
|
|
124
|
+
version: 1.4.12
|
|
125
|
+
type: :runtime
|
|
126
|
+
prerelease: false
|
|
127
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
128
|
+
requirements:
|
|
129
|
+
- - "~>"
|
|
130
|
+
- !ruby/object:Gem::Version
|
|
131
|
+
version: '1.4'
|
|
132
|
+
- - ">="
|
|
133
|
+
- !ruby/object:Gem::Version
|
|
134
|
+
version: 1.4.12
|
|
135
|
+
- !ruby/object:Gem::Dependency
|
|
136
|
+
name: kramdown
|
|
137
|
+
requirement: !ruby/object:Gem::Requirement
|
|
138
|
+
requirements:
|
|
139
|
+
- - "~>"
|
|
140
|
+
- !ruby/object:Gem::Version
|
|
141
|
+
version: '1.16'
|
|
142
|
+
- - ">="
|
|
143
|
+
- !ruby/object:Gem::Version
|
|
144
|
+
version: 1.16.2
|
|
145
|
+
type: :runtime
|
|
146
|
+
prerelease: false
|
|
147
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
148
|
+
requirements:
|
|
149
|
+
- - "~>"
|
|
150
|
+
- !ruby/object:Gem::Version
|
|
151
|
+
version: '1.16'
|
|
152
|
+
- - ">="
|
|
153
|
+
- !ruby/object:Gem::Version
|
|
154
|
+
version: 1.16.2
|
|
115
155
|
description:
|
|
116
156
|
email: james@jamesrobertson.eu
|
|
117
157
|
executables: []
|
metadata.gz.sig
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
e����ԧأ7xzt��xS�&��V%�g.]�\�R)�&55u��8�Bv�n���
|
|
2
|
+
�A���y[�c<Bf#��`)�=G8�G�����d���j]�J��ڜ��i|Z鞻Ɋί�ξ�#[����CrA��l�vG�؍;�QCC7����1��T(F{Qs�����l��)��m�z0�؏�C^��5���δ�����Z�هXн�_�M�Α��$w] Hx�Z�< �Omx)��G�$��/|��ޑ�$��p9�
|