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 +4 -4
- data/.travis.yml +1 -0
- data/README.rst +13 -13
- data/lib/lita/handlers/onewheel_wolfram_alpha.rb +5 -1
- data/lita-onewheel-wolfram-alpha.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d710c2e31337fe20000c5b4217478d237a91d3a5
|
4
|
+
data.tar.gz: 71c621a5354931955d31469641ba194a5c80f08e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cf27290e2bf0626a26e2e8e5e5284d3c34cdbea56b98b7aa063137d9a20d27dd98e7126afaeb43e62a6ba19d9508752e6506bbf180e8e5e272c9c468b9c54a8
|
7
|
+
data.tar.gz: c5898bb0e13fa55e180dc32f4ccc15959d774ad71f9cd9ef2db0bfcb66377fe11e3b0b4351dee91b6363e6c6759d6963d7acdb3aeaf60621b65ac0080e10400a
|
data/.travis.yml
CHANGED
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
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
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
|
-
|
28
|
+
-----
|
29
|
+
:alpha pi: returns "3.14......"
|
30
30
|
|
31
31
|
License
|
32
|
-
|
33
|
-
|
32
|
+
-------
|
33
|
+
MIT
|
@@ -34,7 +34,10 @@ module Lita
|
|
34
34
|
end
|
35
35
|
|
36
36
|
else
|
37
|
-
"
|
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
|
|
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.
|
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-
|
11
|
+
date: 2016-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|