From 06d1d7ee0c36783d0d185152c96ea68127cf5650 Mon Sep 17 00:00:00 2001 From: Andrew Kreps Date: Wed, 13 Sep 2017 00:24:50 -0700 Subject: [PATCH] Yo --- lib/lita/handlers/onewheel_alert.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/lita/handlers/onewheel_alert.rb b/lib/lita/handlers/onewheel_alert.rb index fce6325..7ea7819 100644 --- a/lib/lita/handlers/onewheel_alert.rb +++ b/lib/lita/handlers/onewheel_alert.rb @@ -1,5 +1,6 @@ require 'rest-client' require 'twilio-ruby' +require 'cgi' module Lita module Handlers @@ -11,7 +12,7 @@ class OnewheelAlert < Handler config :alert, required: true route /.*/i, :alert - http.get "/sms", :respond_sms + http.get '/sms', :respond_sms def alert(response) # Lita.logger.debug "Checking for match of #{config.alert} in #{response.matches[0]}" @@ -28,7 +29,8 @@ def alert(response) end def respond_sms(request, response) - Lita.logger.info request.inspect + qs = CGI.parse request['QUERY_STRING'].body + Lita.logger.info qs.inspect response.body << "Hello, #{request.body}!" end