diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2008-06-05 19:44:44 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2008-06-05 19:44:44 +0000 |
commit | 6191670bc01dd6f407fe6e15262fe22b900cb661 (patch) | |
tree | d5bade66175934cc4a2b73aee8af9bed0e718434 | |
parent | Convert glsa to using httputil. (diff) | |
download | rbot-gentoo-6191670bc01dd6f407fe6e15262fe22b900cb661.tar.gz rbot-gentoo-6191670bc01dd6f407fe6e15262fe22b900cb661.tar.bz2 rbot-gentoo-6191670bc01dd6f407fe6e15262fe22b900cb661.zip |
Convert herd to httputil.
-rw-r--r-- | gentoo-data.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gentoo-data.rb b/gentoo-data.rb index 244dc14..7bb53b5 100644 --- a/gentoo-data.rb +++ b/gentoo-data.rb @@ -62,10 +62,8 @@ class GentooPlugin < Plugin def herd(m, params) # TODO: Add in caching # TODO: Add in not-a-herd.txt - res = Net::HTTP.start('www.gentoo.org', 80) { |http| - http.get('/proj/en/metastructure/herds/herds.xml?passthru=1') - } - herds = REXML::Document.new(res.body) + res = @bot.httputil.get("http://www.gentoo.org/proj/en/metastructure/herds/herds.xml?passthru=1") + herds = REXML::Document.new(res) herd = herds.get_elements("/herds/herd[name='#{params[:herd]}']") if herd.empty? m.reply "#{response_prefix(m)}Unable to find herd '#{params[:herd]}'" |