From c61913395be8d94e6d6a86709e8c62ac030260ce Mon Sep 17 00:00:00 2001 From: Andrew Kreps Date: Tue, 31 Dec 2019 12:38:44 -0800 Subject: [PATCH] Fixing megamatcher for maths --- lib/lita/handlers/onewheel_wolfram_alpha.rb | 5 +++-- lita-onewheel-wolfram-alpha.gemspec | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/lita/handlers/onewheel_wolfram_alpha.rb b/lib/lita/handlers/onewheel_wolfram_alpha.rb index de8470d..bcc17b7 100644 --- a/lib/lita/handlers/onewheel_wolfram_alpha.rb +++ b/lib/lita/handlers/onewheel_wolfram_alpha.rb @@ -25,7 +25,8 @@ def handle_wolfram_query(response) post_script = '' if matches = query.match(/\<(.*)\>/) - query.gsub! /\<#{matches[1]}\>/, '' + Lita.logger.debug "Megamatch: #{matches[1]}" + query.gsub! /\<.*\>/, '' post_script = " #{matches[1]}" end @@ -75,7 +76,7 @@ def make_api_call(query) uri = build_uri query Lita.logger.debug "lita-onewheel-wolfram-alpha: #{uri}" response = RestClient.get(uri) - Lita.logger.debug 'lita-onewheel-wolfram-alpha: ' + response.to_s + #Lita.logger.debug 'lita-onewheel-wolfram-alpha: ' + response.to_s Nokogiri::XML response.to_s end diff --git a/lita-onewheel-wolfram-alpha.gemspec b/lita-onewheel-wolfram-alpha.gemspec index afe72c3..f1c659b 100644 --- a/lita-onewheel-wolfram-alpha.gemspec +++ b/lita-onewheel-wolfram-alpha.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |spec| spec.name = 'lita-onewheel-wolfram-alpha' - spec.version = '0.4.0' + spec.version = '0.4.1' spec.authors = ['Andrew Kreps'] spec.email = ['andrew.kreps@gmail.com'] spec.description = %q{Lita interface to Wolfram Alpha.}