From 6fe3e38468915d47e72160d4451a72bab09b8e4d Mon Sep 17 00:00:00 2001 From: scotbuff Date: Thu, 20 Nov 2014 17:50:30 +0000 Subject: [PATCH] Created my first Goodie --- lib/DDG/Goodie/IsAwesome/scotbuff.pm | 24 ++++++++++++++++++++++++ t/IsAwesome/scotbuff.t | 19 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 lib/DDG/Goodie/IsAwesome/scotbuff.pm create mode 100644 t/IsAwesome/scotbuff.t diff --git a/lib/DDG/Goodie/IsAwesome/scotbuff.pm b/lib/DDG/Goodie/IsAwesome/scotbuff.pm new file mode 100644 index 000000000..5cc2ee975 --- /dev/null +++ b/lib/DDG/Goodie/IsAwesome/scotbuff.pm @@ -0,0 +1,24 @@ +package DDG::Goodie::IsAwesome::scotbuff; +# ABSTRACT: scotbuff's first Goodie + +use DDG::Goodie; + +zci answer_type => "is_awesome_scotbuff"; +zci is_cached => 1; + +name "IsAwesome scotbuff"; +description "My first Goodie, it let's the world know that scotbuff is awesome"; +primary_example_queries "duckduckhack scotbuff"; +category "special"; +topics "special_interest", "geek"; +code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/scotbuff.pm"; +attribution github => ["https://github.com/scotbuff", "scotbuff"], + twitter => "scotbuff"; + +triggers start => "duckduckhack scotbuff"; +handle remainder => sub { + return if $_; + return "scotbuff is awesome and has successfully completed the DuckDuckHack Goodie tutorial!"; +}; + +1; diff --git a/t/IsAwesome/scotbuff.t b/t/IsAwesome/scotbuff.t new file mode 100644 index 000000000..d9710b62a --- /dev/null +++ b/t/IsAwesome/scotbuff.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_scotbuff"; +zci is_cached => 1; + +ddg_goodie_test( + [qw( + DDG::Goodie::IsAwesome::scotbuff + )], + 'duckduckhack scotbuff' => test_zci('scotbuff is awesome and has successfully completed the DuckDuckHack Goodie tutorial!'), + 'duckduckhack scotbuff is awesome' => undef, +); + +done_testing;