lita-onewheel-wolfram-alpha 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4656a007ca97cd0059c881747d01cc83596c4c5b
4
- data.tar.gz: 4c96374eb4d63fcf59044d4e0446305bf574ea24
3
+ metadata.gz: a5d688876e161a072f799d99f5ba09899dfcc26f
4
+ data.tar.gz: 9a57ed46329c2ed8b6f39d9f92078b3c8eaa0ad5
5
5
  SHA512:
6
- metadata.gz: 86e02b30b98082e440b822722c8387e422f13721de4142581b0d557aa88db140f9e52ab8e5350569f4e167e7a2cc25c4dd99457945b8aaa68c6245304115ef7c
7
- data.tar.gz: 7844585a8046a4add10ba9a0446f24d1a1b30c2cbbd0d9b863484ef01f13b08774155424b09e56bf60076e58052bdc51637402e9f0f227c10c448bb286238240
6
+ metadata.gz: 0417397dc6623098bf37e7eb518d33aa369f8a3ff1841f756bacf2059ccdba00b6c77fde8b329b5f0ce8cfd768925d7d85a08b1258017210ae2f709186d1a1cd
7
+ data.tar.gz: 6ca95a0a67c67ef316abc49ea52904bf11da155902068733fb501871e8d6f8950ca0693f1e3c397d30285deaac48cc1a0a7cec4ba15e498b690c09c34288865e
@@ -11,12 +11,13 @@ module Lita
11
11
 
12
12
  def handle_wolfram_query(response)
13
13
  unless config.app_id and config.api_uri
14
- Lita.logger.error 'Configuration error!'
14
+ Lita.logger.error 'lita-onewheel-wolfram-alpha: Configuration error!'
15
15
  return
16
16
  end
17
17
  query = response.matches[0][0]
18
18
  api_response = make_api_call query
19
19
  reply = parse_response api_response, query
20
+ Lita.logger.debug "lita-onewheel-wolfram-alpha: Replying with #{reply}"
20
21
  response.reply reply
21
22
  end
22
23
 
@@ -33,7 +34,7 @@ module Lita
33
34
  end
34
35
 
35
36
  else
36
- "Wolfram couldn't parse #{query}."
37
+ "lita-onewheel-wolfram-alpha: Wolfram couldn't parse #{query}."
37
38
  end
38
39
  end
39
40
 
@@ -42,7 +43,7 @@ module Lita
42
43
  end
43
44
 
44
45
  def make_api_call(query)
45
- Lita.logger.debug "Making api call for #{query}"
46
+ Lita.logger.debug "lita-onewheel-wolfram-alpha: Making api call for #{query}"
46
47
  uri = build_uri query
47
48
  response = RestClient.get(uri)
48
49
  Nokogiri::XML response.to_s
@@ -50,7 +51,7 @@ module Lita
50
51
 
51
52
  def build_uri(query)
52
53
  uri = config.api_uri.sub '[query]', CGI::escape(query)
53
- uri = uri.sub '[appid]', config.app_id
54
+ uri.sub '[appid]', config.app_id
54
55
  end
55
56
  end
56
57
  Lita.register_handler(OnewheelWolframAlpha)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-wolfram-alpha'
3
- spec.version = '0.1.2'
3
+ spec.version = '0.1.3'
4
4
  spec.authors = ['Andrew Kreps']
5
5
  spec.email = ['andrew.kreps@gmail.com']
6
6
  spec.description = %q{Lita interface to Wolfram Alpha.}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-onewheel-wolfram-alpha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kreps