From d28897379c6150e9b67ed3d27f22490e76554506 Mon Sep 17 00:00:00 2001 From: abrahimladha Date: Wed, 27 May 2015 07:43:18 +0000 Subject: [PATCH] Created my first Goodie --- lib/DDG/Goodie/IsAwesome/abrahimladha.pm | 26 ++++++++++++++++++++++++ t/IsAwesome/abrahimladha.t | 18 ++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 lib/DDG/Goodie/IsAwesome/abrahimladha.pm create mode 100644 t/IsAwesome/abrahimladha.t diff --git a/lib/DDG/Goodie/IsAwesome/abrahimladha.pm b/lib/DDG/Goodie/IsAwesome/abrahimladha.pm new file mode 100644 index 000000000..0ccfe243a --- /dev/null +++ b/lib/DDG/Goodie/IsAwesome/abrahimladha.pm @@ -0,0 +1,26 @@ +package DDG::Goodie::IsAwesome::abrahimladha; +# ABSTRACT: abrahimladha's first Goodie + + +use DDG::Goodie; +use strict; + +zci answer_type => "is_awesome_abrahimladha"; +zci is_cached => 1; + +name "IsAwesome abrahimladha"; +description "My first Goodie, it lets the world know that abrahimladha is awesome"; +primary_example_queries "duckduckhack abrahimladha"; +category "special"; +topics "special_interest", "geek"; +code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/abrahimladha.pm"; +attribution github => ["https://github.com/abrahimladha", "abrahimladha"]; + +triggers start => "duckduckhack abrahimladha"; + +handle remainder => sub { + return if $_; + return "abrahimladha is awesome and has successfully completed the DuckDuckHack Goodie tutorial!"; +}; + +1; diff --git a/t/IsAwesome/abrahimladha.t b/t/IsAwesome/abrahimladha.t new file mode 100644 index 000000000..248f7affb --- /dev/null +++ b/t/IsAwesome/abrahimladha.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_abrahimladha"; +zci is_cached => 1; + +ddg_goodie_test( + [qw( + DDG::Goodie::IsAwesome::abrahimladha + )], + 'duckduckhack abrahimladha' => test_zci('abrahimladha is awesome and has successfully completed the DuckDuckHack Goodie tutorial!'), + 'duckduckhack abrahimladha is awesome' => undef, +); +done_testing;