summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Gerus <arachnist@i.am-a.cat>2014-03-25 05:50:36 +0100
committerRobert Gerus <arachnist@i.am-a.cat>2014-03-25 05:50:36 +0100
commit0c4d366c08a88b51b95e92e9ab0b3c105ea441f2 (patch)
tree801c811515210b9e31e5e1a2316350f1d37683f0
parent8a7dd58d5a0f8cf2280bfa61472b5257d565b87a (diff)
downloadrepost-0c4d366c08a88b51b95e92e9ab0b3c105ea441f2.tar.gz
repost-0c4d366c08a88b51b95e92e9ab0b3c105ea441f2.tar.bz2
repost-0c4d366c08a88b51b95e92e9ab0b3c105ea441f2.tar.xz
repost-0c4d366c08a88b51b95e92e9ab0b3c105ea441f2.zip
extract product
-rw-r--r--plugins/commands/gentoo-bugs.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/commands/gentoo-bugs.rb b/plugins/commands/gentoo-bugs.rb
index b8d623e..a1cc622 100644
--- a/plugins/commands/gentoo-bugs.rb
+++ b/plugins/commands/gentoo-bugs.rb
@@ -4,7 +4,10 @@ require 'nokogiri'
Client.register_command("bug") { |args|
if args[0] =~ /^[0-9]+$/ then
doc = Nokogiri::HTML(Net::HTTP.get(URI(Config[:commands][:bug][:url] + args[0])))
- [Config[:commands][:bug][:url] + args[0], doc.title().delete!('\n'), doc.xpath('//span[@id="static_bug_status"]').inner_text.split].join(' ')
+ [Config[:commands][:bug][:url] + args[0], doc.title().delete!('\n'),
+ doc.xpath('//span[@id="static_bug_status"]').inner_text.split,
+ doc.xpath('//td[@id="field_container_product"]').inner_text,
+ ].join(' ')
else
"invalid bug url"
end