From 9b71eaa1e3c81c60e70cbabe3c348e883724686a Mon Sep 17 00:00:00 2001 From: isleofmax Date: Wed, 24 Dec 2014 19:33:23 +0000 Subject: [PATCH] Created my first Goodie --- lib/DDG/Goodie/IsAwesome/isleofmax.pm | 27 +++++++++++++++++++++++++++ t/IsAwesome/isleofmax.t | 19 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 lib/DDG/Goodie/IsAwesome/isleofmax.pm create mode 100644 t/IsAwesome/isleofmax.t diff --git a/lib/DDG/Goodie/IsAwesome/isleofmax.pm b/lib/DDG/Goodie/IsAwesome/isleofmax.pm new file mode 100644 index 000000000..1d4b1de1b --- /dev/null +++ b/lib/DDG/Goodie/IsAwesome/isleofmax.pm @@ -0,0 +1,27 @@ +package DDG::Goodie::IsAwesome::isleofmax; +# ABSTRACT: isleofmax's first Goodie + +use DDG::Goodie; + +zci answer_type => "is_awesome_isleofmax"; +zci is_cached => 1; + +name "IsAwesome isleofmax"; +description "My first Goodie, it let's the world know that isleofmax is awesome"; +primary_example_queries "duckduckhack isleofmax"; +category "special"; +topics "special_interest", "geek"; +code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/isleofmax.pm"; +attribution github => ["https://github.com/isleofmax", "isleofmax"]; +code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/isleofmax.pm"; +attribution github => ["GitHubAccount", "Friendly Name"], + twitter => "twitterhandle"; + +triggers start => "duckduckhack isleofmax"; + +handle remainder => sub { + return if $_; + return "isleofmax is awesome and has successfully completed the DuckDuckHack Goodie tutorial!"; +}; + +1; diff --git a/t/IsAwesome/isleofmax.t b/t/IsAwesome/isleofmax.t new file mode 100644 index 000000000..197f92c0b --- /dev/null +++ b/t/IsAwesome/isleofmax.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_isleofmax"; +zci is_cached => 1; + +ddg_goodie_test( + [qw( + DDG::Goodie::IsAwesome::isleofmax + )], + "duckduckhack isleofmax" => test_zci('isleofmax is awesome and has successfully completed the DuckDuckHack Goodie tutorial!'), + 'duckduckhack isleofmax is awesome' => undef, +); + +done_testing;