created my first goodie.
parent
73b67f2a74
commit
fb2b4e9572
|
@ -0,0 +1,29 @@
|
|||
package DDG::Goodie::IsAwesome::amneher;
|
||||
# ABSTRACT: amneher's first goodie
|
||||
|
||||
|
||||
use DDG::Goodie;
|
||||
|
||||
zci answer_type => "is_awesome_amneher";
|
||||
zci is_cached => 1;
|
||||
|
||||
|
||||
name "IsAwesome amneher";
|
||||
description "Tells everyone that I'm awesome";
|
||||
primary_example_queries "duckduckhack amneher";
|
||||
category "special";
|
||||
topics "special_interest", "geek";
|
||||
code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/amneher.pm";
|
||||
attribution github => ["amneher"],
|
||||
twitter => "amneher";
|
||||
|
||||
|
||||
triggers start => "duckduckhack amneher";
|
||||
|
||||
|
||||
handle remainder => sub {
|
||||
return if $_;
|
||||
return "amneher is awesome and has just completed the duckduckhack goodie tutorial!";
|
||||
};
|
||||
|
||||
1;
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Test::More;
|
||||
use DDG::Test::Goodie;
|
||||
|
||||
zci answer_type => "is_awesome_amneher";
|
||||
zci is_cached => 1;
|
||||
|
||||
ddg_goodie_test(
|
||||
[qw( DDG::Goodie::IsAwesome::amneher )],
|
||||
# At a minimum, be sure to include tests for all:
|
||||
# - primary_example_queries
|
||||
# - secondary_example_queries
|
||||
'duckduckhack amneher' => test_zci('amneher is awesome and has just completed the duckduckhack goodie tutorial!'),
|
||||
# Try to include some examples of queries on which it might
|
||||
# appear that your answer will trigger, but does not.
|
||||
'duckduckhack amneher is awesome' => undef,
|
||||
);
|
||||
|
||||
done_testing;
|
Loading…
Reference in New Issue