Skip to content

Commit

Permalink
Added aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
onewheelskyward committed Sep 13, 2018
1 parent cc7a87c commit 5e3e3c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/lita/handlers/onewheel_duckduckgo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ module Lita
module Handlers
class OnewheelDuckDuckGo < Handler
route /^duck\s+(.*)$/, :search, command: true
route /^quack\s+(.*)$/, :search, command: true
route /^ddg\s+(.*)$/, :search, command: true
route /^fuck\s+(.*)$/, :search, command: true

def search(response)
query = response.matches[0][0]
Expand Down
2 changes: 1 addition & 1 deletion lita-onewheel-duckduckgo.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |spec|
spec.name = 'lita-onewheel-duckduckgo'
spec.version = '0.0.3'
spec.version = '0.0.4'
spec.authors = ['Andrew Kreps']
spec.email = ['andrew.kreps@gmail.com']
spec.description = 'Lita handler for Duck Duck Go\'s answers engine.'
Expand Down
2 changes: 2 additions & 0 deletions spec/lita/handlers/onewheel_duckduckgo_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ def mock(file)
end

it { is_expected.to route_command('duck something') }
it { is_expected.to route_command('quack something') }
it { is_expected.to route_command('ddg something') }

it 'does neat ducky things' do
mock('mock_result')
Expand Down

0 comments on commit 5e3e3c4

Please sign in to comment.