lita-onewheel-google 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d3d208a78023bc3a907dbde312361046e4df308
4
- data.tar.gz: 5944c6626441b810aeb5435f752cdfb3402fa4b4
3
+ metadata.gz: 811ba4a8a5471b06a191a1bb71080f7dd5c4433f
4
+ data.tar.gz: 6e2f50902775ceef57a0ba09673afedc774849fa
5
5
  SHA512:
6
- metadata.gz: 5c7df0b76b314c1f9e5d36a4cd21103a433f61afb7048f85bf4e14d69679a2fcdb6af006fa91bc20265fba028af5b55a0bac0aeaf391e79c3b053978e1301034
7
- data.tar.gz: eef2fe8c96b82dd720bb74d9bb79b76e782e0bf52213fcb8c242466129d72a38066e2a7847fad67b5ae23a8bcc6c6632e1367141d3a3b9208e19091f5fc03f36
6
+ metadata.gz: 23687fb049ceca2fa6cccbd200158abe475bb4081ca262b5de33fe541b4c7d7a3293d5b1b4903f93b40e87c529a4c1f0e68223896501499732e47e1a75a1acac
7
+ data.tar.gz: 3244b7e18f1174481cf65f2424292977a5bdbe67966091dba9b706e1b0195d1fc6557366eec24c65be573fc466c2353e94c3a6566008d24561c181c6c674d141
@@ -14,8 +14,7 @@ module Lita
14
14
 
15
15
  def search(response)
16
16
  query = response.matches[0][0]
17
- search_result = ::OnewheelGoogle::search(query, config.custom_search_engine_id, config.google_api_key, config.safe_search)
18
- result = JSON.parse(search_result)
17
+ result = ::OnewheelGoogle::search(query, config.custom_search_engine_id, config.google_api_key, config.safe_search)
19
18
  response.reply "#{result['items'][0]['link']} #{result['items'][0]['title']}: #{result['items'][0]['snippet']}"
20
19
  end
21
20
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-google'
3
- spec.version = '0.0.3'
3
+ spec.version = '0.0.4'
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.'
@@ -5,7 +5,7 @@ describe Lita::Handlers::OnewheelGoogle, lita_handler: true do
5
5
 
6
6
  before(:each) do
7
7
  mock_result_json = File.open('spec/fixtures/mock_result.json').read
8
- allow(OnewheelGoogle).to receive(:search).and_return(mock_result_json)
8
+ allow(OnewheelGoogle).to receive(:search).and_return(JSON.parse mock_result_json)
9
9
 
10
10
  registry.configure do |config|
11
11
  config.handlers.onewheel_google.custom_search_engine_id = ''
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-onewheel-google
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kreps