From 8844685fd199f10179e39957ceb8753b76e4999e Mon Sep 17 00:00:00 2001 From: Lynbarry Date: Sun, 1 Mar 2015 16:53:30 +0000 Subject: [PATCH] Created my first Goodie --- lib/DDG/Goodie/IsAwesome/Lynbarry.pm | 25 +++++++++++++++++++++++++ t/IsAwesome/Lynbarry.t | 19 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 lib/DDG/Goodie/IsAwesome/Lynbarry.pm create mode 100644 t/IsAwesome/Lynbarry.t diff --git a/lib/DDG/Goodie/IsAwesome/Lynbarry.pm b/lib/DDG/Goodie/IsAwesome/Lynbarry.pm new file mode 100644 index 000000000..9feb2ab14 --- /dev/null +++ b/lib/DDG/Goodie/IsAwesome/Lynbarry.pm @@ -0,0 +1,25 @@ +package DDG::Goodie::IsAwesome::Lynbarry; +# ABSTRACT: Lynbarry's first Goodie + +use DDG::Goodie; + +zci answer_type => "is_awesome_lynbarry"; +zci is_cached => 1; + +name "IsAwesome Lynbarry"; +description "My first Goodie, it lets the world know that Lynbarry is awesome."; +primary_example_queries "duckduckhack Lynbarry"; +category "special"; +topics "special_interest", "geek"; +code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/Lynbarry.pm"; +attribution github => ["https://github.com/Lynbarry", "Lynbarry"], + twitter => "quetzco"; + +triggers start => "duckduckhack lynbarry"; + +handle remainder => sub { + return if $_; + return "Lynbarry is awesome and has successfully completed the DuckDuckHack Goodie tutorial!"; +}; + +1; diff --git a/t/IsAwesome/Lynbarry.t b/t/IsAwesome/Lynbarry.t new file mode 100644 index 000000000..48171840c --- /dev/null +++ b/t/IsAwesome/Lynbarry.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_lynbarry"; +zci is_cached => 1; + +ddg_goodie_test( + [qw( + DDG::Goodie::IsAwesome::Lynbarry + )], + 'duckduckhack lynbarry' => test_zci('Lynbarry is awesome and has successfully completed the DuckDuckHack Goodie tutorial!'), + 'duckduckhack lynbarry is awesome' => undef, +); + +done_testing;