From 278ed48f46741a528bc73ac4054b1c4a5aa90071 Mon Sep 17 00:00:00 2001 From: bfmags Date: Sun, 25 Jan 2015 21:28:39 +0000 Subject: [PATCH] Created my first Goodie --- lib/DDG/Goodie/IsAwesome/bfmags.pm | 26 ++++++++++++++++++++++++++ t/IsAwesome/bfmags.t | 19 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 lib/DDG/Goodie/IsAwesome/bfmags.pm create mode 100644 t/IsAwesome/bfmags.t diff --git a/lib/DDG/Goodie/IsAwesome/bfmags.pm b/lib/DDG/Goodie/IsAwesome/bfmags.pm new file mode 100644 index 000000000..cd4457729 --- /dev/null +++ b/lib/DDG/Goodie/IsAwesome/bfmags.pm @@ -0,0 +1,26 @@ +package DDG::Goodie::IsAwesome::bfmags; +# ABSTRACT: bfmags's first Goodie + +use DDG::Goodie; + +zci answer_type => "is_awesome_bfmags"; +zci is_cached => 1; + +name "IsAwesome bfmags"; +description "My first Goodie, it let's the world know that bfmags is awesome"; +primary_example_queries "duckduckhack bfmags"; +category "special"; +topics "special_interest", "geek"; +code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/bfmags.pm"; +attribution github => ["https://github.com/bfmags", "bfmags"], + twitter => "bfmags"; + +# Triggers +triggers start => "duckduckhack bfmags"; + +handle remainder => sub { + return if $_; + return "bfmags is awesome and has successfully completed the DuckDuckHack Goodie tutorial!"; +}; + +1; diff --git a/t/IsAwesome/bfmags.t b/t/IsAwesome/bfmags.t new file mode 100644 index 000000000..58f6bf2e0 --- /dev/null +++ b/t/IsAwesome/bfmags.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_bfmags"; +zci is_cached => 1; + +ddg_goodie_test( + [qw( + DDG::Goodie::IsAwesome::bfmags + )], + 'duckduckhack bfmags' => test_zci('bfmags is awesome and has successfully completed the DuckDuckHack Goodie tutorial!'), + 'duckduckhack bfmags is awesome' => undef, +); + +done_testing;