From 49b4c03a6d79de3b85aa9977dffb81b0e535d493 Mon Sep 17 00:00:00 2001 From: davehtaylor Date: Mon, 1 Dec 2014 23:16:49 +0000 Subject: [PATCH] Created my first Goodie --- lib/DDG/Goodie/IsAwesome/davehtaylor.pm | 25 +++++++++++++++++++++++++ t/IsAwesome/davehtaylor.t | 19 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 lib/DDG/Goodie/IsAwesome/davehtaylor.pm create mode 100644 t/IsAwesome/davehtaylor.t diff --git a/lib/DDG/Goodie/IsAwesome/davehtaylor.pm b/lib/DDG/Goodie/IsAwesome/davehtaylor.pm new file mode 100644 index 000000000..9a9f6bfed --- /dev/null +++ b/lib/DDG/Goodie/IsAwesome/davehtaylor.pm @@ -0,0 +1,25 @@ +package DDG::Goodie::IsAwesome::davehtaylor; +# ABSTRACT: davehtaylor's first Goodie + +use DDG::Goodie; + +zci answer_type => "is_awesome_davehtaylor"; +zci is_cached => 1; + +name "IsAwesome davehtaylor"; +description "My first Goodie, it let's the world know that davehtaylor is awesome"; +primary_example_queries "duckduckhack davehtaylor"; +category "special"; +topics "special_interest", "geek"; +code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/davehtaylor.pm"; +attribution github => ["https://github.com/davehtaylor", "davehtaylor"], + twitter => "thedavehtaylor"; + +triggers start => "duckduckhack davehtaylor"; + +handle remainder => sub { + return if $_; + return "davehtaylor is awesome and has successfully completed the DuckDuckHack Goodie tutorial!"; +}; + +1; diff --git a/t/IsAwesome/davehtaylor.t b/t/IsAwesome/davehtaylor.t new file mode 100644 index 000000000..2792136e9 --- /dev/null +++ b/t/IsAwesome/davehtaylor.t @@ -0,0 +1,19 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use Test::More; +use DDG::Test::Goodie; + +zci answer_type => "is_awesome_davehtaylor"; +zci is_cached => 1; + +ddg_goodie_test( + [qw( + DDG::Goodie::IsAwesome::davehtaylor + )], + 'duckduckhack davehtaylor' => test_zci('davehtaylor is awesome and has successfully completed the DuckDuckHack Goodie tutorial!'), + 'duckduckhack davehtaylor is awesome' => undef, +); + +done_testing;