master
Robert Gerus 2014-03-25 05:45:52 +01:00
parent 8759f3df64
commit 8a7dd58d5a
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ 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].join(' ')
else
"invalid bug url"
end