Zac made a goodie during Quack and Hack 2014.

master
zekiel 2014-12-06 20:02:54 +00:00
parent afe13a63ea
commit 6096c9eef4
3 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,25 @@
package DDG::Goodie::IsAwesome::zekiel;
# ABSTRACT: thejdeep's first Goodie !
use DDG::Goodie;
zci answer_type => "is_awesome_zekiel";
zci is_cached => 1;
name "IsAwesome zekiel";
description "My semi-first Goodie proving I too can build instant answers.";
primary_example_queries "duckduckhack zekiel";
category "special";
topics "special_interest", "geek";
code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/zekiel.pm";
attribution github => ["https://github.com/zekiel", "zekiel"],
twitter => "zacpappis";
triggers start => "duckduckhack zekiel";
handle remainder => sub {
return if $_;
return "zekiel is awesome and has successfully completed the DuckDuckHack Goodie tutorial!";
};
1;

19
t/IsAwesome/zekiel.t Normal file
View File

@ -0,0 +1,19 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => "is_awesome_zekiel";
zci is_cached => 1;
ddg_goodie_test(
[qw(
DDG::Goodie::IsAwesome::zekiel
)],
'duckduckhack zekiel' => test_zci('zekiel is awesome and has successfully completed the DuckDuckHack Goodie tutorial!'),
'duckduckhack zekiel is awesome' => undef,
);
done_testing;

22
t/Zekiel.t Normal file
View File

@ -0,0 +1,22 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => "zekiel";
zci is_cached => 1;
ddg_goodie_test(
[qw( DDG::Goodie::Zekiel )],
# 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;