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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b53f5914cc8574d238cdbd31d4d5c12bb1757ec8
4
- data.tar.gz: bdcb269a87fa6f09a5b669441dd9c069d1bc0858
3
+ metadata.gz: 25b4772a28e42b547ec415efc8a6190eb69a2e5b
4
+ data.tar.gz: 63f1ffe7fcbe74355f5d3464110d1ed9c23eb886
5
5
  SHA512:
6
- metadata.gz: 75704cf163bce87fa66e7773987616a4a1d1ace92b7d07c1116247f5550272f56296003fe3a68f37e9cedc9e19a0c3040546fabdc16183c04483c2b49ce7eb50
7
- data.tar.gz: b48b0158b62789d4c88ecc1d7161f369835db2c084fc82be21e3d89cb39095e0d4a3a9f4786fdfdf3cf8dc6aed47d029e11bfc90928874c71d019b48515d8a9d
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.gsub(" | past | web ", "")
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
@@ -13,5 +13,5 @@
13
13
  ##
14
14
 
15
15
  class Descartes
16
- VERSION ||= '0.9.0'
16
+ VERSION ||= '0.9.1'
17
17
  end
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.0
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-08-25 00:00:00.000000000 Z
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.6.1
216
+ rubygems_version: 2.5.1
217
217
  signing_key:
218
218
  specification_version: 4
219
219
  summary: Codo ergo bot.