lita-onewheel-wolfram-alpha 0.1.5 → 0.1.6

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: b657daf55293d895a361385026aea9c44f284950
4
- data.tar.gz: 562c7f5e963512d5bdaad7cbe13e9b15487560f1
3
+ metadata.gz: d710c2e31337fe20000c5b4217478d237a91d3a5
4
+ data.tar.gz: 71c621a5354931955d31469641ba194a5c80f08e
5
5
  SHA512:
6
- metadata.gz: 224bc7f084825a9f058f2a49547159505d360c9267a885e61e979e15d436d882cd0ca72fe783cb4c3999685d9d5101e8aef684d5e96d1ae33e0823e24f497fb6
7
- data.tar.gz: f24fd22081ad0959df99d21f215832d4685e3acf53286a82ab28172feb1c9d3eca9ffdcb6d0292bc771e0952afd893cd135c62b928920aa39cd055600516e5e8
6
+ metadata.gz: 2cf27290e2bf0626a26e2e8e5e5284d3c34cdbea56b98b7aa063137d9a20d27dd98e7126afaeb43e62a6ba19d9508752e6506bbf180e8e5e272c9c468b9c54a8
7
+ data.tar.gz: c5898bb0e13fa55e180dc32f4ccc15959d774ad71f9cd9ef2db0bfcb66377fe11e3b0b4351dee91b6363e6c6759d6963d7acdb3aeaf60621b65ac0080e10400a
data/.travis.yml CHANGED
@@ -1,6 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.2.4
4
+ - 2.3.0
4
5
  script: bundle exec rake
5
6
  before_install:
6
7
  - gem update --system
data/README.rst CHANGED
@@ -1,5 +1,5 @@
1
1
  lita-onewheel-wolfram-alpha
2
- ----
2
+ ===========================
3
3
 
4
4
  .. image:: https://coveralls.io/repos/github/onewheelskyward/lita-onewheel-wolfram-alpha/badge.svg?branch=master
5
5
  :target: https://coveralls.io/github/onewheelskyward/lita-onewheel-wolfram-alpha?branch=master
@@ -9,25 +9,25 @@ lita-onewheel-wolfram-alpha
9
9
  Queries Wolfram Alpha for the text specified.
10
10
 
11
11
  Installation
12
- ----
12
+ ------------
13
13
  Add lita-onewheel-wolfram-alpha to your Lita instance's Gemfile:
14
14
 
15
15
  ``gem 'lita-onewheel-wolfram-alpha'``
16
16
 
17
17
 
18
18
  Configuration
19
- ----
20
- ```
21
- Lita.configure do |config|
22
- config.handlers.wolfram_alpha.app_id = 'yourwolframappid'
23
- config.handlers.wolfram_alpha.api_uri = 'http://api.wolframalpha.com/v2/query?input=[query]&appid=[appid]'
24
- end
25
- ```
19
+ -------------
20
+ Get yourself a Wolfram Alpha app id here: https://developer.wolframalpha.com/portal/apisignup.html, then place the ID in the config.
21
+ ::
22
+ Lita.configure do |config|
23
+ config.handlers.onewheel_wolfram_alpha.app_id = 'yourwolframappid'
24
+ config.handlers.onewheel_wolfram_alpha.api_uri = 'http://api.wolframalpha.com/v2/query?input=[query]&appid=[appid]'
25
+ end
26
26
 
27
27
  Usage
28
- ----
29
- bot: alpha pi
28
+ -----
29
+ :alpha pi: returns "3.14......"
30
30
 
31
31
  License
32
- ----
33
- [MIT](http://opensource.org/licenses/MIT)
32
+ -------
33
+ MIT
@@ -34,7 +34,10 @@ module Lita
34
34
  end
35
35
 
36
36
  else
37
- "lita-onewheel-wolfram-alpha: Wolfram couldn't parse #{query}."
37
+ ["Nope, no #{query} to see here.",
38
+ "#{query}?",
39
+ 'What\'s that, now?'
40
+ ].sample
38
41
  end
39
42
  end
40
43
 
@@ -46,6 +49,7 @@ module Lita
46
49
  Lita.logger.debug "lita-onewheel-wolfram-alpha: Making api call for #{query}"
47
50
  uri = build_uri query
48
51
  response = RestClient.get(uri)
52
+ Lita.logger.debug 'lita-onewheel-wolfram-alpha: ' + response.to_s
49
53
  Nokogiri::XML response.to_s
50
54
  end
51
55
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-wolfram-alpha'
3
- spec.version = '0.1.5'
3
+ spec.version = '0.1.6'
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,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-onewheel-wolfram-alpha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kreps
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-27 00:00:00.000000000 Z
11
+ date: 2016-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita