lita-onewheel-google 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lita/handlers/onewheel_google.rb +2 -4
- data/lita-onewheel-google.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: 7a7e016069cfe47fd484cacd503020aaf50d2162
|
4
|
+
data.tar.gz: 1286db3a93c2290531e1b23b81304b31d979f9a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15e30de5bf9ae1246a09912652c8496425c86a0b41fdcfc724bf31c9dd3aba66472e4acec3e457cb9502bd8e20736f0bef4e3d1f6a959cebb8ec9f9ee23fad68
|
7
|
+
data.tar.gz: 546ab5ec056240a8ff3489590eb9d475d7efde67a77e00000e7fb0541d53e46ac0402dfbddd655e0572d886a42b2d4d74222430803bb6a095671d16a10c84575
|
@@ -1,6 +1,3 @@
|
|
1
|
-
require 'rest-client'
|
2
|
-
require 'json'
|
3
|
-
require 'addressable/uri'
|
4
1
|
require 'onewheel-google'
|
5
2
|
|
6
3
|
module Lita
|
@@ -15,7 +12,8 @@ module Lita
|
|
15
12
|
def search(response)
|
16
13
|
query = response.matches[0][0]
|
17
14
|
result = ::OnewheelGoogle::search(query, config.custom_search_engine_id, config.google_api_key, config.safe_search)
|
18
|
-
|
15
|
+
reply = "#{result['items'][0]['link']} #{result['items'][0]['title']}: #{result['items'][0]['snippet']}"[0..500]
|
16
|
+
response.reply reply
|
19
17
|
end
|
20
18
|
|
21
19
|
Lita.register_handler(self)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'lita-onewheel-google'
|
3
|
-
spec.version = '0.0.
|
3
|
+
spec.version = '0.0.6'
|
4
4
|
spec.authors = ['Andrew Kreps']
|
5
5
|
spec.email = ['andrew.kreps@gmail.com']
|
6
6
|
spec.description = 'An implementation of Google Custom Search Engine for searching in chat.'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-onewheel-google
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.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-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|