From f21dc6e4122fecaed140b266e145e839248d1326 Mon Sep 17 00:00:00 2001 From: echosa Date: Thu, 11 Dec 2014 05:25:09 +0000 Subject: [PATCH] Created my first Goodie --- lib/DDG/Goodie/IsAwesome/Echosa.pm | 24 ++++++++++++++++++++++++ t/IsAwesome/Echosa.t | 19 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 lib/DDG/Goodie/IsAwesome/Echosa.pm create mode 100644 t/IsAwesome/Echosa.t diff --git a/lib/DDG/Goodie/IsAwesome/Echosa.pm b/lib/DDG/Goodie/IsAwesome/Echosa.pm new file mode 100644 index 000000000..7cf310699 --- /dev/null +++ b/lib/DDG/Goodie/IsAwesome/Echosa.pm @@ -0,0 +1,24 @@ +package DDG::Goodie::IsAwesome::Echosa; + +use DDG::Goodie; + +zci answer_type => "is_awesome_echosa"; +zci is_cached => 1; + +name "IsAwesome Echosa"; +description "My first Goodie. It lets the world know that Echosa is awesome."; +primary_example_queries "duckduckhack echosa"; +category "special"; +topics "special_interest", "geek"; +code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/Echosa.pm"; +attribution github => ["https://github.com/echosa", "Echosa"], + twitter => "echosa"; + +triggers start => "duckduckhack echosa"; + +handle remainder => sub { + return if $_; + return "Echosa is awesome and has successfully completed the DuckDuckHack Goodie tutorial!" +}; + +1; diff --git a/t/IsAwesome/Echosa.t b/t/IsAwesome/Echosa.t new file mode 100644 index 000000000..e3838b073 --- /dev/null +++ b/t/IsAwesome/Echosa.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_echosa"; +zci is_cached => 1; + +ddg_goodie_test( + [qw( + DDG::Goodie::IsAwesome::Echosa + )], + 'duckduckhack echosa' => test_zci('Echosa is awesome and has successfully completed the DuckDuckHack Goodie tutorial!'), + 'duckduckhack echosa is awesome' => undef, +); + +done_testing;