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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: be7098b7db28886f149599044f49726c1c08eca9
4
- data.tar.gz: 90c65c1e594f705958c3b3b69292f963073bc04d
3
+ metadata.gz: 7a7e016069cfe47fd484cacd503020aaf50d2162
4
+ data.tar.gz: 1286db3a93c2290531e1b23b81304b31d979f9a0
5
5
  SHA512:
6
- metadata.gz: cc027125ab3d6cdbf2943e717edeb2fe49d0bc736ca45623059c2bb614e74ff158aba7c5058003820b9cc19cc664a6168cb49b09e407e009a4a3621c941566e8
7
- data.tar.gz: 87cc48a8d23f9b4282fd4240d4702503ffb4688fa60c9f7542f71614c703d439383b01ee06da26404d96cf6fc88391f0517025712b78c9be228315d16cd77ba0
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
- response.reply "#{result['items'][0]['link']} #{result['items'][0]['title']}: #{result['items'][0]['snippet']}"
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.5'
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.5
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-06-09 00:00:00.000000000 Z
11
+ date: 2016-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lita