lita-onewheel-duckduckgo 0.0.4 → 0.0.5

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
  SHA256:
3
- metadata.gz: 40b28be713ad1ab41bcc3dc12ed8cd890e9776c7be42d219142183c9fbf7e02d
4
- data.tar.gz: 7646e32e0269bf82254aae92ffab9708e1ecdd213ae02e9791c09cf89d520bed
3
+ metadata.gz: 3ad3fec901bbeccb17ef3fae7bcb4bed98f9c87f90f517c3d18e358856428d27
4
+ data.tar.gz: e0cccc70619ee9f1c3e9382bc59e6d5af6e7c0fd14e3ad82ee35fc69d05a6536
5
5
  SHA512:
6
- metadata.gz: b8cb8d2d80445508bc19af4ab11c6e94affe3672b70013dcbd9a6275956b6e35effce3e560ade5557ec9b30a7d4b1fa37c3a7fe3cfb2026b5254bb48ab5ddec9
7
- data.tar.gz: 496333a7a9756c67c4106ec959a0bd1f360752ae8c9c30874ce1a346aa16fba7a0c8fa9a20382753a2f11f8a474b98f69d54efc53b62e06e55476402063ff2e2
6
+ metadata.gz: be2bdb506f57aa944a295e277b0dc4ff754eeaec6388663d8749184cb378dadfd83d279d9cc0885ed94f9a9f78786dfc5e3cadeda56daf986d4968a697acf9bd
7
+ data.tar.gz: 0c73457ff364297541d52afd72ece6249e1dd50ee7cee8b9a1b52965da5cf5139704c986d6c6e4f42a56238690ffcc080e8be5b08f5c09b71e22158e902f5929
@@ -13,11 +13,10 @@ module Lita
13
13
  Lita.logger.debug "Querying for #{query}"
14
14
  result = get_result(query)
15
15
  Lita.logger.debug "Result: #{result}"
16
- reply = 'DuckDuckGo Result: '
17
16
  if result['Abstract'].empty?
18
- reply += result['AbstractURL']
17
+ reply = result['AbstractURL']
19
18
  else
20
- reply += result['Abstract'][0..250]
19
+ reply = result['Abstract'][0..250]
21
20
  end
22
21
  Lita.logger.debug "Reply: #{reply}"
23
22
  response.reply reply
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-onewheel-duckduckgo'
3
- spec.version = '0.0.4'
3
+ spec.version = '0.0.5'
4
4
  spec.authors = ['Andrew Kreps']
5
5
  spec.email = ['andrew.kreps@gmail.com']
6
6
  spec.description = 'Lita handler for Duck Duck Go\'s answers engine.'
@@ -18,18 +18,18 @@ describe Lita::Handlers::OnewheelDuckDuckGo, lita_handler: true do
18
18
  it 'does neat ducky things' do
19
19
  mock('mock_result')
20
20
  send_command 'duck yo'
21
- expect(replies.last).to include('DuckDuckGo Result: DuckDuckGo is an Internet search engine that emphasizes')
21
+ expect(replies.last).to include('DuckDuckGo is an Internet search engine that emphasizes')
22
22
  end
23
23
 
24
24
  it 'uses the url unless the abstract exists' do
25
25
  mock('mock_no_abstract')
26
26
  send_command 'duck yo'
27
- expect(replies.last).to include('DuckDuckGo Result: https://en.wikipedia.org/wiki/Duck_(disambiguation)')
27
+ expect(replies.last).to include('https://en.wikipedia.org/wiki/Duck_(disambiguation)')
28
28
  end
29
29
 
30
30
  it 'checks for go' do
31
31
  mock('mock_go')
32
32
  send_command 'duck go'
33
- expect(replies.last).to include('DuckDuckGo Result: https://en.wikipedia.org/wiki/Go')
33
+ expect(replies.last).to include('https://en.wikipedia.org/wiki/Go')
34
34
  end
35
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-onewheel-duckduckgo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kreps