Skip to content

Commit

Permalink
Fixing megamatcher for maths
Browse files Browse the repository at this point in the history
  • Loading branch information
onewheelskyward committed Dec 31, 2019
1 parent 3de65b9 commit c619133
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/lita/handlers/onewheel_wolfram_alpha.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lita-onewheel-wolfram-alpha.gemspec
Original file line number Diff line number Diff line change
@@ -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.}
Expand Down

0 comments on commit c619133

Please sign in to comment.