top-ico 0.2.1 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1323375d2a0169856d318f2244f8e817aa38f67a
4
- data.tar.gz: 585592c61a4018d38e6d3da7ad18786a4de1d7f0
3
+ metadata.gz: 07adf89704782a554662d02a2628d7b437d33614
4
+ data.tar.gz: 2a373f230d106cc2b7e61f185742cd24c87c31c0
5
5
  SHA512:
6
- metadata.gz: 93dbd2c6e6902e55b1b03746c56fa07bf5e36fb8830d9f43c0bf3737576c810d0cac2a777200896df1fa220a69b3310a725c6fa2084383a70a6636ed30b57d1f
7
- data.tar.gz: ad22d9b1bdd42d5b225cf2a4d4e19d184e17452a8d2dd020467f8650a81c8639d1f5e47ccd8a93b849c12f8ec48b1f7b353c4cc05b91dfe18594b8fbe18486bd
6
+ metadata.gz: a27e82257b95e3c93c6069f60c1e167da2e519d89cce56e90a9191b627910b4669fb89a8246d1bdeabd648512eeef12a81bc1a33069969da8a2e6e31b20a82e8
7
+ data.tar.gz: 0bd41a9d05f7719cefc0f820da1944c359c05d0a9fcde249da05ee7c116f685d0c4854d590b605af8349d1a0539be51bf964d91533e960a6b51746b1857130b8
@@ -7,25 +7,19 @@ module Top
7
7
  URL = "https://topicolist.com/".freeze
8
8
 
9
9
  def self.active
10
- doc = Nokogiri::HTML(open(URL))
11
- res = []
12
- doc.search("div.section div.container-8 div.w-dyn-items div.w-dyn-item").each do |item|
13
- coin = {}
14
- coin[:name] = item.search("h3.job-title").first.content
15
- coin[:description] = item.search("p.paragraph-3").first.content
16
- coin[:nation] = item.search("div.div-block div.text-block-4").first.content
17
- coin[:code] = item.search("div.div-block div.text-block-4")[2].content
18
- coin[:rank] = item.search("div.jobs-client div.job-time").first.content
19
- coin[:url] = "https://topicolist.com/".concat(item.search("a.jobs-wrapper").first.values.first)
20
- res << coin
21
- end
22
- res
10
+ active_coins = "div.section div.container-8 div.w-dyn-items div.w-dyn-item"
11
+ get_info(active_coins)
23
12
  end
24
13
 
25
14
  def self.upcoming
15
+ upcoming_coins = "div.section div.container-9 div.w-dyn-items div.w-dyn-item"
16
+ get_info(upcoming_coins)
17
+ end
18
+
19
+ def self.get_info(coins)
26
20
  doc = Nokogiri::HTML(open(URL))
27
21
  res = []
28
- doc.search("div.section div.container-9 div.w-dyn-items div.w-dyn-item").each do |item|
22
+ doc.search(coins).each do |item|
29
23
  coin = {}
30
24
  coin[:name] = item.search("h3.job-title").first.content
31
25
  coin[:description] = item.search("p.paragraph-3").first.content
@@ -1,5 +1,5 @@
1
1
  module Top
2
2
  module Ico
3
- VERSION = "0.2.1"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["bluephoenix.hp@gmail.com", "duytd.hanu@gmail.com", "summondk@gmail.com"]
11
11
 
12
12
  spec.summary = %q{Finding up-to-date list of trending and promising ICOs to invest from topicolist.com}
13
- spec.description = %q{Start using our cryptocurrency ico list and discover the best initial coin offerings}
13
+ spec.description = %q{Finding up-to-date list of trending and promising ICOs to invest from topicolist.com}
14
14
  spec.homepage = "https://github.com/TungFelix/top-ico"
15
15
  spec.license = "MIT"
16
16
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: top-ico
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - TungFelix
@@ -68,8 +68,8 @@ dependencies:
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
- description: Start using our cryptocurrency ico list and discover the best initial
72
- coin offerings
71
+ description: Finding up-to-date list of trending and promising ICOs to invest from
72
+ topicolist.com
73
73
  email:
74
74
  - bluephoenix.hp@gmail.com
75
75
  - duytd.hanu@gmail.com
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  version: '0'
112
112
  requirements: []
113
113
  rubyforge_project:
114
- rubygems_version: 2.5.1
114
+ rubygems_version: 2.6.11
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: Finding up-to-date list of trending and promising ICOs to invest from topicolist.com