From ea002e03172beacf32889bef47e0052448910756 Mon Sep 17 00:00:00 2001 From: AJDev77 Date: Sat, 6 Dec 2014 18:50:47 +0000 Subject: [PATCH 1/2] Created my first Goodie --- lib/DDG/Goodie/IsAwesome/AJDev77.pm | 27 +++++++++++++++++++++++++++ t/IsAwesome/AJDev77.t | 19 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 lib/DDG/Goodie/IsAwesome/AJDev77.pm create mode 100644 t/IsAwesome/AJDev77.t diff --git a/lib/DDG/Goodie/IsAwesome/AJDev77.pm b/lib/DDG/Goodie/IsAwesome/AJDev77.pm new file mode 100644 index 000000000..8b8f5be46 --- /dev/null +++ b/lib/DDG/Goodie/IsAwesome/AJDev77.pm @@ -0,0 +1,27 @@ +package DDG::Goodie::IsAwesome::AJDev77; +# ABSTRACT: AJDev77's first Goodie + + +use DDG::Goodie; + +zci answer_type => "is_awesome_ajdev77"; +zci is_cached => 1; + +name "IsAwesome AJDev77"; +description "My first Goodie, it let's the world know that AJDev77 is awesome"; +primary_example_queries "duckduckhack AJDev77 +secondary_example_queries "optional -- demonstrate any additional triggers"; +category "special"; +topics "special_interest", "geek"; +code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/AJDev77.pm"; +attribution github => ["https://github.com/AJDev77", "AJ"], + twitter => "emposoft"; + +triggers start => "duckduckhack ajdev77"; + +handle remainder => sub { + return if $_; + return "AJDev77 is awesome and has successfully completed the DuckDuckHack Goodie tutorial!"; +}; + +1; diff --git a/t/IsAwesome/AJDev77.t b/t/IsAwesome/AJDev77.t new file mode 100644 index 000000000..e7a98898f --- /dev/null +++ b/t/IsAwesome/AJDev77.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_ajdev77"; +zci is_cached => 1; + +ddg_goodie_test( + [qw( + DDG::Goodie::IsAwesome::AJDev77 + )], + 'duckduckhack AJDev77' => test_zci('AJDev77 is awesome and has successfully completed the DuckDuckHack Goodie tutorial!'), + 'duckduckhack AJDev77 is awesome' => undef, +); + +done_testing; From 733023f9d3a0f29b7c05869da2fdc47daa7d51ae Mon Sep 17 00:00:00 2001 From: AJDev77 Date: Sat, 6 Dec 2014 19:00:30 +0000 Subject: [PATCH 2/2] Fixed my first Goodie --- lib/DDG/Goodie/IsAwesome/AJDev77.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/DDG/Goodie/IsAwesome/AJDev77.pm b/lib/DDG/Goodie/IsAwesome/AJDev77.pm index 8b8f5be46..91d717637 100644 --- a/lib/DDG/Goodie/IsAwesome/AJDev77.pm +++ b/lib/DDG/Goodie/IsAwesome/AJDev77.pm @@ -9,8 +9,7 @@ zci is_cached => 1; name "IsAwesome AJDev77"; description "My first Goodie, it let's the world know that AJDev77 is awesome"; -primary_example_queries "duckduckhack AJDev77 -secondary_example_queries "optional -- demonstrate any additional triggers"; +primary_example_queries "duckduckhack AJDev77"; category "special"; topics "special_interest", "geek"; code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/AJDev77.pm";