yet more improvements.
parent
725262c5c6
commit
8759f3df64
|
@ -4,7 +4,7 @@ require 'nokogiri'
|
||||||
Client.register_command("bug") { |args|
|
Client.register_command("bug") { |args|
|
||||||
if args[0] =~ /^[0-9]+$/ then
|
if args[0] =~ /^[0-9]+$/ then
|
||||||
doc = Nokogiri::HTML(Net::HTTP.get(URI(Config[:commands][:bug][:url] + args[0])))
|
doc = Nokogiri::HTML(Net::HTTP.get(URI(Config[:commands][:bug][:url] + args[0])))
|
||||||
Config[:commands][:bug][:url] + args[0] + " " + doc.title().delete!('\n')
|
[Config[:commands][:bug][:url], args[0], doc.title().delete!('\n'), doc.xpath('//span[@id="static_bug_status"]').inner_text.split].join(' ')
|
||||||
else
|
else
|
||||||
"invalid bug url"
|
"invalid bug url"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue