descartes 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/descartes/modules/hackernews.rb +4 -2
- data/lib/descartes/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25b4772a28e42b547ec415efc8a6190eb69a2e5b
|
4
|
+
data.tar.gz: 63f1ffe7fcbe74355f5d3464110d1ed9c23eb886
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57843ac9afc29808fc12d49637104c118e3c1c989546d64e62c0e9cb67b9349dc47671d9440abf30b331da466cba9e680310be7bb258c79de9050f3690d2d26b
|
7
|
+
data.tar.gz: ff4e149293503d2e54f97f1b7133fb40fef11362f2fdac91c26f72e49468e2a5a95a24aa108bb90cd77f988748fae22ab4a1981a3c22d312212810b396b09a74
|
@@ -25,9 +25,11 @@ class Descartes
|
|
25
25
|
page = Nokogiri::HTML open(url).read, nil, 'utf-8'
|
26
26
|
|
27
27
|
title = page.at_xpath('//td[@class="title"]/a').text.to_s
|
28
|
-
info = page.at_xpath('//td[@class="subtext"]').text.to_s.strip
|
28
|
+
info = page.at_xpath('//td[@class="subtext"]').text.to_s.strip
|
29
|
+
comments = info.match(/[0-9]+.comments/).to_s
|
30
|
+
info = info.gsub(/\|.*/, "").rstrip
|
29
31
|
|
30
|
-
m.reply "[HN] #{title} | #{info}"
|
32
|
+
m.reply "[HN] #{title} | #{info} | #{comments}"
|
31
33
|
rescue; end
|
32
34
|
end
|
33
35
|
end
|
data/lib/descartes/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: descartes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Giovanni Capuano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cinch
|
@@ -213,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
213
|
version: '0'
|
214
214
|
requirements: []
|
215
215
|
rubyforge_project:
|
216
|
-
rubygems_version: 2.
|
216
|
+
rubygems_version: 2.5.1
|
217
217
|
signing_key:
|
218
218
|
specification_version: 4
|
219
219
|
summary: Codo ergo bot.
|