crypto_price 0.1.2 → 0.1.3

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
  SHA256:
3
- metadata.gz: 694c84dcc2254a8ab66e2056b02cfae33145a024c0dbdfda61df0a05e81bd95b
4
- data.tar.gz: bff9f89c536036a1a399e6b216ea135469a7338ba25a9e45628127ad74740d24
3
+ metadata.gz: 20967a59245c837d4982d2f7d575383010c1c4cb880d07983d87d9db1f4f05f3
4
+ data.tar.gz: 2053104f84e6166c4c14688b5674c3181c01f2749d0e72c600c12e24cd113bc5
5
5
  SHA512:
6
- metadata.gz: f6c0b4f02a5a3d4a34d001b1e1c78e8cdbf3c4f444be78fc5efd345f825bfe053ae72f4db20094361c0161e8e0bf4238e266b0347856c0cc6f3d5192e6abcf7e
7
- data.tar.gz: 24090cbbec783781d30f729e72e7c58ffa6b35074db3974d61fa85961a2af1e3dc14ab78997f438d712d9e37c4e5e0151e8a60b836bf80bf665a2bed53510870
6
+ metadata.gz: bba2facb817de188f26d32487ac5298d144efdabe895c7d12a1c3d7b18aa753477b5e45f42cd56df21ee3b125aadb2a65e0b6b50ce8170ade27dd975ac647a94
7
+ data.tar.gz: cc6d43b12e7ec4b1234c9d09c36622eb347571ac68131ee12f6296edb758812b15d38580ad66d1a8dcc5f034667b04be5a0e56f49e798c6ae63c6881d445e68d
data/README.md CHANGED
@@ -26,7 +26,7 @@ Be my guest and let me know how it is useful to you.
26
26
 
27
27
  ## Development
28
28
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `./bin/crypto_price` (executable permission) for an interactive prompt that will allow you to experiment.
30
30
 
31
31
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
32
 
@@ -40,4 +40,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
40
40
 
41
41
  ## Code of Conduct
42
42
 
43
- Everyone interacting in the CryptoPrice project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/'FigueroaR'/crypto_price/blob/master/CODE_OF_CONDUCT.md).
43
+ Everyone interacting in the CryptoPrice project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/FigueroaR/crypto_price/blob/master/CODE_OF_CONDUCT.md).
Binary file
data/crypto_price.gemspec CHANGED
@@ -6,8 +6,8 @@ require "crypto_price/version"
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "crypto_price"
8
8
  spec.version = CryptoPrice::VERSION
9
- spec.authors = ["'Raul Figueroa'"]
10
- spec.email = ["'raul.a.figueroa@hotmail.com'"]
9
+ spec.authors = ["Raul Figueroa"]
10
+ spec.email = ["raul.a.figueroa@hotmail.com"]
11
11
 
12
12
  spec.summary = %q{View Current Crypto Price.}
13
13
  spec.description = %q{Scrapped Information on Crypto Price.}
@@ -13,25 +13,9 @@ class CryptoPrice::CLI
13
13
  puts "| |"
14
14
  puts "|========================================================================|"
15
15
  puts "| Today's top Crypto! |"
16
- puts "|========================================================================|"
17
- puts "| |"
18
- puts "| |"
19
- puts "| Choose an option Number: |"
20
- puts "| ___________________ |"
21
- puts "| |"
22
- puts "| |"
23
- puts "| |"
24
- puts "| - 1. Top 10 coins - 2. Top 50 Coins | "
25
- puts "| |"
26
- puts "| - 3. exit |"
27
- puts "| |"
28
- puts "|________________________________________________________________________|"
29
- 5.times do
30
- puts " "
31
- end
32
16
 
33
17
  input = nil
34
- while input != "3"
18
+ while input != "exit"
35
19
  puts "|========================================================================|"
36
20
  puts "| |"
37
21
  puts "| |"
@@ -59,7 +43,7 @@ class CryptoPrice::CLI
59
43
  input = gets.strip
60
44
  d = CryptoPrice::Coin.all[input.to_i]
61
45
  show_info(input, d)
62
- when "3"
46
+ when "exit"
63
47
  5.times do
64
48
  puts " "
65
49
  end
@@ -71,7 +55,7 @@ class CryptoPrice::CLI
71
55
  5.times do
72
56
  puts " "
73
57
  end
74
- puts "Try a valid number"
58
+ puts "Type 'Exit' when you are done!"
75
59
  end
76
60
  end
77
61
  end
@@ -1,7 +1,10 @@
1
1
  class CryptoPrice::Scraper
2
2
  def self.scrape_coinmarketcap
3
- doc = Nokogiri::HTML(open("https://coinmarketcap.com"))
4
- doc.css("a.price").text.split("$").select{ |k| k.length > 0 }
3
+ #binding.pry
4
+ #doc = Nokogiri::HTML(open("https://coinmarketcap.com"))
5
+ #doc.css("tbody.span").text.split("$").select{ |k| k.length > 0 }
6
+ doc = Nokogiri::HTML(open("https://coinstats.app/?pagesize=50&page=1"))
7
+ doc.css("td.data-cell.mobile-last").text.split("$").select{ |k| k.length > 0 }
5
8
  end
6
9
 
7
10
  def self.scrape_coinlib
@@ -1,3 +1,3 @@
1
1
  module CryptoPrice
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -0,0 +1,205 @@
1
+ => ["4,89020,696",
2
+ "195,515,033,716",
3
+ "55,012,563,63366.6%",
4
+ "195,515,033,716",
5
+ "55,012,563,63366.6%4,89020,696Next 100 →View AllWatchlistBitcoin",
6
+ "7,206.97",
7
+ "15,441,789,029Ethereum",
8
+ "145.76",
9
+ "6,351,640,297XRP",
10
+ "0.214762",
11
+ "1,092,294,607Tether",
12
+ "1.01",
13
+ "17,760,854,963Bitcoin Cash",
14
+ "208.53",
15
+ "1,174,326,184Litecoin",
16
+ "44.69",
17
+ "2,641,560,348EOS",
18
+ "2.62",
19
+ "1,508,246,908Binance Coin",
20
+ "15.17",
21
+ "223,957,898Bitcoin SV",
22
+ "95.42",
23
+ "418,406,899Stellar",
24
+ "0.055039",
25
+ "150,879,933TRON",
26
+ "0.014682",
27
+ "847,336,382Cardano",
28
+ "0.036971",
29
+ "36,240,310UNUS SED LEO",
30
+ "0.918329",
31
+ "6,238,396Monero",
32
+ "52.37",
33
+ "157,753,890Tezos",
34
+ "1.28",
35
+ "46,240,844Chainlink",
36
+ "2.07",
37
+ "116,089,937Huobi Token",
38
+ "2.86",
39
+ "134,573,384Cosmos",
40
+ "3.57",
41
+ "151,074,420NEO",
42
+ "8.73",
43
+ "299,076,783IOTA",
44
+ "0.199448",
45
+ "7,633,078Maker",
46
+ "538.16",
47
+ "4,796,181USD Coin",
48
+ "1.00",
49
+ "219,582,507Dash",
50
+ "50.70",
51
+ "228,042,517Ethereum Classic",
52
+ "3.77",
53
+ "450,389,380VeChain",
54
+ "0.006864",
55
+ "137,816,477Ontology",
56
+ "0.595832",
57
+ "64,188,439NEM",
58
+ "0.035183",
59
+ "29,271,796Crypto.com Coin",
60
+ "0.025417",
61
+ "4,486,483Dogecoin",
62
+ "0.002185",
63
+ "64,141,094MINDOL",
64
+ "1.86",
65
+ "3,975,455Basic Attention Token",
66
+ "0.189011",
67
+ "54,509,179Paxos Standard",
68
+ "1.01",
69
+ "140,009,307HedgeTrade",
70
+ "0.749992",
71
+ "340,270Zcash",
72
+ "26.85",
73
+ "89,877,022Decred",
74
+ "18.51",
75
+ "7,073,718Synthetix Network Token",
76
+ "1.32",
77
+ "288,175Qtum",
78
+ "1.70",
79
+ "240,851,605TrueUSD",
80
+ "1.00",
81
+ "174,281,181Centrality",
82
+ "0.135719",
83
+ "436,6660x",
84
+ "0.239344",
85
+ "13,206,564Ravencoin",
86
+ "0.027358",
87
+ "53,992,831Algorand",
88
+ "0.280549",
89
+ "124,609,969Holo",
90
+ "0.000762",
91
+ "5,944,495Seele",
92
+ "0.167107",
93
+ "44,281,432Augur",
94
+ "10.19",
95
+ "7,062,228Nano",
96
+ "0.816547",
97
+ "2,298,296Bitcoin Gold",
98
+ "5.90",
99
+ "12,289,900OmiseGO",
100
+ "0.724054",
101
+ "41,916,628V Systems",
102
+ "0.051504",
103
+ "2,292,127ABBC Coin",
104
+ "0.163714",
105
+ "44,452,273ZB",
106
+ "0.190906",
107
+ "209,407,414DigiByte",
108
+ "0.006552",
109
+ "1,110,204EDUCare",
110
+ "0.081191",
111
+ "4,361,495FTX Token",
112
+ "1.55",
113
+ "6,783,416Lisk",
114
+ "0.659267",
115
+ "760,856Komodo",
116
+ "0.668139",
117
+ "6,083,055KuCoin Shares",
118
+ "0.950081",
119
+ "5,101,921Bytom",
120
+ "0.076421",
121
+ "10,803,568LUNA",
122
+ "0.254155",
123
+ "606,405Matic Network",
124
+ "0.028216",
125
+ "64,139,781Swipe",
126
+ "1.14",
127
+ "13,234,527Bitcoin Diamond",
128
+ "0.365136",
129
+ "3,809,868IOST",
130
+ "0.005618",
131
+ "36,832,398Molecular Future",
132
+ "1.50",
133
+ "33,616,998ICON",
134
+ "0.129158",
135
+ "3,669,185Siacoin",
136
+ "0.001564",
137
+ "1,819,772THETA",
138
+ "0.074167",
139
+ "1,141,840BitTorrent",
140
+ "0.000302",
141
+ "51,965,636Quant",
142
+ "5.21",
143
+ "3,142,173Verge",
144
+ "0.003857",
145
+ "2,002,339Bytecoin",
146
+ "0.000334",
147
+ "7,140MCO",
148
+ "3.88",
149
+ "11,260,032Single Collateral DAI ",
150
+ "1.01",
151
+ "2,141,853MonaCoin",
152
+ "0.891306",
153
+ "520,067Waves",
154
+ "0.573810",
155
+ "9,882,544BitShares",
156
+ "0.019978",
157
+ "1,737,698MaidSafeCoin",
158
+ "0.117609",
159
+ "272,741Zilliqa",
160
+ "0.005459",
161
+ "11,998,841HyperCash",
162
+ "1.18",
163
+ "1,995,335Nexo",
164
+ "0.090813",
165
+ "8,363,547Ardor",
166
+ "0.048754",
167
+ "2,063,010DxChain Token",
168
+ "0.000951",
169
+ "1,389,250Enjin Coin",
170
+ "0.059336",
171
+ "44,238,445Aeternity",
172
+ "0.154796",
173
+ "28,736,792iExec RLC",
174
+ "0.522981",
175
+ "1,434,115Steem",
176
+ "0.118285",
177
+ "533,992Chiliz",
178
+ "0.010834",
179
+ "3,193,866Horizen",
180
+ "5.02",
181
+ "582,090SOLVE",
182
+ "0.118562",
183
+ "578,671Fetch.ai",
184
+ "0.057858",
185
+ "22,038,690Status",
186
+ "0.010885",
187
+ "180,840,302Pundi X",
188
+ "0.000157",
189
+ "1,181,730Electroneum",
190
+ "0.003725",
191
+ "120,473Digitex Futures",
192
+ "0.046347",
193
+ "1,340,320Golem",
194
+ "0.036710",
195
+ "2,096,791Silverway",
196
+ "0.352451",
197
+ "2,197,267DigixDAO",
198
+ "17.54",
199
+ "1,136,967STASIS EURO",
200
+ "1.09",
201
+ "750,921Crypterium",
202
+ "0.410582",
203
+ "264,220ILCoin",
204
+ "0.100635",
205
+ "675,626Next 100 →View AllAdvertiseBlockchain ExplorerCrypto APICrypto IndicesDisclaimerPrivacyTermsFAQMethodologyRequest FormCareersBlogNewsletterShopFacebookTwitterTelegramInteractive Chat3CMCRgEm8HVz3DrWaCCid3vAANE42jcEv9LTdsVS8VDw6syvfQADdhf2PHAm3rMGJvPX0x0074709077B8AE5a245E4ED161C971Dc4c3C8E2B1LVXG4Z4oF6TrJfmUfSuLX8nqb8c5eCwha"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crypto_price
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
- - "'Raul Figueroa'"
7
+ - Raul Figueroa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-01 00:00:00.000000000 Z
11
+ date: 2019-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -82,7 +82,7 @@ dependencies:
82
82
  version: '0'
83
83
  description: Scrapped Information on Crypto Price.
84
84
  email:
85
- - "'raul.a.figueroa@hotmail.com'"
85
+ - raul.a.figueroa@hotmail.com
86
86
  executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
@@ -100,12 +100,14 @@ files:
100
100
  - bin/setup
101
101
  - crypto_price-0.1.0.gem
102
102
  - crypto_price-0.1.1.gem
103
+ - crypto_price-0.1.2.gem
103
104
  - crypto_price.gemspec
104
105
  - lib/crypto_price.rb
105
106
  - lib/crypto_price/cli.rb
106
107
  - lib/crypto_price/coin.rb
107
108
  - lib/crypto_price/scraper.rb
108
109
  - lib/crypto_price/version.rb
110
+ - s("a.cmc-link").text.split("$").select{ |k| k.length > 0 }
109
111
  homepage: https://github.com/FigueroaR/crypto_price
110
112
  licenses:
111
113
  - MIT