Created my first Goodie

master
Mark Gardner 2014-12-06 19:32:35 +00:00
parent 2e7fe92ccb
commit 0c5e98df34
2 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,25 @@
package DDG::Goodie::IsAwesome::mjgardner;
# ABSTRACT: mjgardner's first Goodie
use DDG::Goodie;
zci answer_type => "is_awesome_mjgardner";
zci is_cached => 1;
name "IsAwesome mjgardner";
description "My first Goodie, it let's the world know that mjgardner is awesome";
primary_example_queries "duckduckhack mjgardner";
category "special";
topics "special_interest", "geek";
code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/mjgardner.pm";
attribution github => ["https://github.com/mjgardner", "mjgardner"],
twitter => "markjgardner";
triggers start => "duckduckhack mjgardner";
handle remainder => sub {
return if $_;
return "mjgardner is awesome and has successfully completed the DuckDuckHack Goodie tutorial!";
};
1;

19
t/IsAwesome/mjgardner.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_mjgardner";
zci is_cached => 1;
ddg_goodie_test(
[qw(
DDG::Goodie::IsAwesome::mjgardner
)],
'duckduckhack mjgardner' => test_zci('mjgardner is awesome and has successfully completed the DuckDuckHack Goodie tutorial!'),
'duckduckhack mjgardner is awesome' => undef,
);
done_testing;