From 7c97afc5f6ea50fc64913ab35c0c4796270e01a1 Mon Sep 17 00:00:00 2001 From: gjskha Date: Fri, 27 Feb 2015 20:58:18 +0000 Subject: [PATCH] Created my first Goodie --- lib/DDG/Goodie/IsAwesome/gjskha.pm | 24 ++++++++++++++++++++++++ t/IsAwesome/gjskha.t | 18 ++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 lib/DDG/Goodie/IsAwesome/gjskha.pm create mode 100644 t/IsAwesome/gjskha.t diff --git a/lib/DDG/Goodie/IsAwesome/gjskha.pm b/lib/DDG/Goodie/IsAwesome/gjskha.pm new file mode 100644 index 000000000..1eea6bab0 --- /dev/null +++ b/lib/DDG/Goodie/IsAwesome/gjskha.pm @@ -0,0 +1,24 @@ +package DDG::Goodie::IsAwesome::gjskha; +# ABSTRACT: gjskha's first Goodie + +use DDG::Goodie; + +zci answer_type => "is_awesome_gjskha"; +zci is_cached => 1; + +name "IsAwesome gjskha"; +description "My first Goodie, it lets the world know that gjskha is awesome"; +primary_example_queries "duckduckhack gjskha"; +category "special"; +topics "special_interest", "geek"; +code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/gjskha.pm"; +attribution github => ["https://github.com/gjskha", "gjskha"]; + +triggers start => "duckduckhack gjskha"; + +handle remainder => sub { + return if $_; + return "gjskha is awesome and has successfully completed the DuckDuckHack Goodie tutorial!"; +}; + +1; diff --git a/t/IsAwesome/gjskha.t b/t/IsAwesome/gjskha.t new file mode 100644 index 000000000..5febaab36 --- /dev/null +++ b/t/IsAwesome/gjskha.t @@ -0,0 +1,18 @@ +#!/usr/bin/env perl + +use strict; +use warnings; +use Test::More; +use DDG::Test::Goodie; + +zci answer_type => "is_awesome_gjskha"; +zci is_cached => 1; + +ddg_goodie_test( + [qw( + DDG::Goodie::IsAwesome::gjskha + )], + 'duckduckhack gjskha' => test_zci('gjskha is awesome and has successfully completed the DuckDuckHack Goodie tutorial!'), + 'duckduckhack gjskha is awesome' => undef, +); +done_testing;