aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Freed <dwfreed@mtu.edu>2015-11-16 04:22:18 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2015-11-16 04:26:54 +0000
commit6340025d9ae6139c414c337bc92cfcc177a2a5b1 (patch)
treefe9d81b60e78ea0ae6fe088bf1a6321e64cd91e9
parentSupport 'bug X comment Y' and 'bug X#cY' as commands and detection in text. (diff)
downloadrbot-bugzilla-6340025d9ae6139c414c337bc92cfcc177a2a5b1.tar.gz
rbot-bugzilla-6340025d9ae6139c414c337bc92cfcc177a2a5b1.tar.bz2
rbot-bugzilla-6340025d9ae6139c414c337bc92cfcc177a2a5b1.zip
CSV: Update for newer Ruby.
CSV::Reader is no longer available after Ruby 1.9; we need to do it differently. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r--bugzilla.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/bugzilla.rb b/bugzilla.rb
index 13f19fe..97743cc 100644
--- a/bugzilla.rb
+++ b/bugzilla.rb
@@ -435,13 +435,13 @@ class BugzillaPlugin < Plugin
def search(urlparams, params = nil)
url = buglisturl + '&' + urlparams
- searchdata = CSV::Reader.create(@bot.httputil.get(url)).to_a
+ searchdata = CSV.parse(@bot.httputil.get(url))
return searchdata
end
def report(urlparams, params = nil)
url = "#{reporturl}&#{urlparams}"
- reportdata = CSV::Reader.create(@bot.httputil.get(url)).to_a
+ reportdata = CSV.parse(@bot.httputil.get(url))
if params and params[:total]
sum = 0
column = params[:total]