lita-onewheel-google 0.0.6 → 0.0.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93a6bc307a36b0c36b47c8f72bb5de18eafe0fad
|
4
|
+
data.tar.gz: 7176f7afe9de8ae49956b9dea81f68ba0aaa6548
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab3f6e2963dab96a102202dfd5e232ff7c529cea6945c1cd75825404125d447433f4a5c9c9fae15fdd509dba50f5204b320d2989b74934a42748f03c3ee07c37
|
7
|
+
data.tar.gz: 5e0a698d134249984a1e1c236075cf9b4a0a70d83f9f5c3fdf2e3fc15867148089d495593223e8faad9c35c230410df71dad8259001928a30a0f0c2ef8b1bf0a
|
@@ -12,7 +12,7 @@ module Lita
|
|
12
12
|
def search(response)
|
13
13
|
query = response.matches[0][0]
|
14
14
|
result = ::OnewheelGoogle::search(query, config.custom_search_engine_id, config.google_api_key, config.safe_search)
|
15
|
-
reply = "#{result['items'][0]['link']} #{result['items'][0]['title']}: #{result['items'][0]['snippet']}"[0..500]
|
15
|
+
reply = "#{result['items'][0]['link']} #{result['items'][0]['title']}: #{result['items'][0]['snippet']}".sub(/\n/, ' ')[0..500]
|
16
16
|
response.reply reply
|
17
17
|
end
|
18
18
|
|
@@ -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.7'
|
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.'
|
@@ -17,6 +17,6 @@ describe Lita::Handlers::OnewheelGoogle, lita_handler: true do
|
|
17
17
|
|
18
18
|
it 'does neat googly things' do
|
19
19
|
send_command 'google yo'
|
20
|
-
expect(replies.last).to eq("https://www.google.com/ Google: Search the world's information, including webpages, images, videos and more.
|
20
|
+
expect(replies.last).to eq("https://www.google.com/ Google: Search the world's information, including webpages, images, videos and more. Google has many special features to help you find exactly what you're looking ...")
|
21
21
|
end
|
22
22
|
end
|