From 92d86831475de804b6826bcea1c664a077056712 Mon Sep 17 00:00:00 2001 From: hanca013 Date: Mon, 12 Jan 2015 05:22:35 +0000 Subject: [PATCH] Created my first Goodie --- lib/DDG/Goodie/IsAwesome/alexishancock.pm | 25 +++++++++++++++++++++++ t/IsAwesome/alexishancock.t | 19 +++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 lib/DDG/Goodie/IsAwesome/alexishancock.pm create mode 100644 t/IsAwesome/alexishancock.t diff --git a/lib/DDG/Goodie/IsAwesome/alexishancock.pm b/lib/DDG/Goodie/IsAwesome/alexishancock.pm new file mode 100644 index 000000000..253e7669f --- /dev/null +++ b/lib/DDG/Goodie/IsAwesome/alexishancock.pm @@ -0,0 +1,25 @@ +package DDG::Goodie::IsAwesome::alexishancock; +# ABSTRACT: alexishancock's first goodie + +use DDG::Goodie; + +zci answer_type => "is_awesome_alexishancock"; +zci is_cached => 1; + +name "IsAwesome alexishancock"; +description "My first Goodie, it let's the world know that GitHubUsername is awesome"; +primary_example_queries "duckduckhack alexishancock"; +category "special"; +topics "special_interest", "geek" +code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/alexishancock.pm"; +attribution github => ["https://github.com/alexishancock", "Alexis Hancock"], + twitter => "nappy_techie"; + +triggers start => "duckduckhack alexishancock"; + +handle remainder => sub { + return if $_; + return "Alexis Hancock is awesome and has successfully completed the DuckDuckHack Goodie tutorial!"; +}; + +1; diff --git a/t/IsAwesome/alexishancock.t b/t/IsAwesome/alexishancock.t new file mode 100644 index 000000000..f4ca26232 --- /dev/null +++ b/t/IsAwesome/alexishancock.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_alexishancock"; +zci is_cached => 1; + +ddg_goodie_test( + [qw( + DDG::Goodie::IsAwesome::alexishancock + )], + 'duckduckhack alexishancock' => test_zci('Alexis Hancock is awesome and has successfully completed the DuckDuckHack Goodie tutorial!'), + 'duckduckhack alexishancock is awesome' => undef, +); + +done_testing;