created my first goodie
parent
b5fd759c1a
commit
1a4a36d5f7
|
@ -0,0 +1,20 @@
|
|||
package DDG::Goodie::IsAwesome::hackwa;
|
||||
# ABSTRACT: hackwa's first Goodie
|
||||
use DDG::Goodie;
|
||||
zci answer_type => "is_awesome_hackwa";
|
||||
zci is_cached => 1;
|
||||
name "IsAwesome hackwa";
|
||||
description "My first Goodie, it lets the world know that hackwa is awesome";
|
||||
primary_example_queries "duckduckhack hackwa";
|
||||
secondary_example_queries "optional -- demonstrate any additional triggers";
|
||||
category "special";
|
||||
topics "special_interest","geek";
|
||||
code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/hackwa.pm";
|
||||
attribution github => ["https://github.com/hackwa", "hackwa"];
|
||||
triggers start => "duckduckhack hackwa";
|
||||
handle remainder => sub {
|
||||
return if $_;
|
||||
return "hackwa is awesome and has successfully completed the DuckDuckHack Goodie tutorial!";
|
||||
};
|
||||
|
||||
1;
|
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More;
|
||||
use DDG::Test::Goodie;
|
||||
|
||||
zci answer_type => "is_awesome_hackwa";
|
||||
zci is_cached => 1;
|
||||
|
||||
ddg_goodie_test(
|
||||
[qw(
|
||||
DDG::Goodie::IsAwesome::hackwa
|
||||
)],
|
||||
'duckduckhack hackwa' => test_zci('hackwa is awesome and has successfully completed the DuckDuckHack Goodie tutorial!'),
|
||||
'duckduckhack hackwa is awesome' => undef,
|
||||
# At a minimum, be sure to include tests for all:
|
||||
# - primary_example_queries
|
||||
# - secondary_example_queries
|
||||
#'example query' => test_zci('query'),
|
||||
# Try to include some examples of queries on which it might
|
||||
# appear that your answer will trigger, but does not.
|
||||
#'bad example query' => undef,
|
||||
);
|
||||
|
||||
done_testing;
|
Loading…
Reference in New Issue