crypto_price 0.1.3 → 0.1.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 +4 -4
- data/README.md +1 -1
- data/crypto_price-0.1.3.gem +0 -0
- data/lib/crypto_price/scraper.rb +4 -4
- data/lib/crypto_price/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3a36b6a2c013e374345042eed9be9d11c615e5373b3a0af01fc0de7f244457e
|
4
|
+
data.tar.gz: 1aae2f4f784bb1ff2439d358c621e41abb852439ba893862ff659f9d8bc25015
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b8c0fe8bddbd8b417489be25a57e554b0d6d67843b414a166d71407f7c41e4d3c2c52581575119ef3b470134a177a7c0c195bec9fdc4f48accdd32ba0c328ca
|
7
|
+
data.tar.gz: d81ec664849b6534f83ebb4934c456bdc4a64c9c7af6d1b4699cb9ac527ad45bc11565bd2c7d79282413e8fbcb48d0ecbe31a53992a3993bd835026d7ce6fe61
|
data/README.md
CHANGED
@@ -32,7 +32,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
32
|
|
33
33
|
## Contributing
|
34
34
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/FigueroaR/crypto_price. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
36
|
|
37
37
|
## License
|
38
38
|
|
Binary file
|
data/lib/crypto_price/scraper.rb
CHANGED
@@ -10,10 +10,10 @@ class CryptoPrice::Scraper
|
|
10
10
|
def self.scrape_coinlib
|
11
11
|
doc = Nokogiri::HTML(open("https://coinlib.io/coins"))
|
12
12
|
prices = self.scrape_coinmarketcap
|
13
|
-
names = doc.css("div.tbl-currency").text.split("\n").select{ |k| !k.include?("[") && k.length > 0
|
14
|
-
symbols = doc.css("span.tbl-coin-abbrev").text.gsub("]", "").split("[").select{
|
15
|
-
changes = doc.css("span.tbl-price.pr-change").text.split("%").select{
|
16
|
-
marketcaps = doc.css("span.mob-info-value").text.split("$").select{
|
13
|
+
names = doc.css("div.tbl-currency").text.split("\n").select{ |k| !k.include?("[") && k.length > 0}
|
14
|
+
symbols = doc.css("span.tbl-coin-abbrev").text.gsub("]", "").split("[").select{|k| k.length > 0}
|
15
|
+
changes = doc.css("span.tbl-price.pr-change").text.split("%").select{|k| k.length > 0}
|
16
|
+
marketcaps = doc.css("span.mob-info-value").text.split("$").select{|k| k.length > 0}
|
17
17
|
#binding.pry
|
18
18
|
index = 0
|
19
19
|
while index < names.length && index < symbols.length
|
data/lib/crypto_price/version.rb
CHANGED
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.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raul Figueroa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -101,6 +101,7 @@ files:
|
|
101
101
|
- crypto_price-0.1.0.gem
|
102
102
|
- crypto_price-0.1.1.gem
|
103
103
|
- crypto_price-0.1.2.gem
|
104
|
+
- crypto_price-0.1.3.gem
|
104
105
|
- crypto_price.gemspec
|
105
106
|
- lib/crypto_price.rb
|
106
107
|
- lib/crypto_price/cli.rb
|