From a6e9460e16068f9c64a9c52f074c07cc914b8f81 Mon Sep 17 00:00:00 2001 From: v0tti Date: Mon, 11 May 2015 12:11:16 +0000 Subject: [PATCH] Created my first Goodie --- lib/DDG/Goodie/IsAwesome/v0tti.pm | 27 +++++++++++++++++++++++++++ t/IsAwesome/v0tti.t | 19 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 lib/DDG/Goodie/IsAwesome/v0tti.pm create mode 100644 t/IsAwesome/v0tti.t diff --git a/lib/DDG/Goodie/IsAwesome/v0tti.pm b/lib/DDG/Goodie/IsAwesome/v0tti.pm new file mode 100644 index 000000000..58be61c7c --- /dev/null +++ b/lib/DDG/Goodie/IsAwesome/v0tti.pm @@ -0,0 +1,27 @@ +package DDG::Goodie::IsAwesome::v0tti; +# ABSTRACT: My first Goodie + +use DDG::Goodie; + +zci answer_type => "is_awesome_v0tti"; +zci is_cached => 1; + +name "IsAwesome v0tti"; +description "Succinct explanation of what this instant answer does"; +name "IsAwesome v0tti"; +description "My first Goodie, it lets the world know that v0tti is awesome"; +primary_example_queries "duckduckhack v0tti"; +category "special"; +topics "special_interest", "geek"; +code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/GitHubUsername.pm"; +attribution github => ["https://github.com/v0tti", "v0tti"], + twitter => "v0tti"; + +triggers start => "duckduckhack v0tti"; + +handle remainder => sub { + return if $_; + return "v0tti is awesome and has successfully completed the DuckDuckHack Goodie tutorial!"; +}; + +1; diff --git a/t/IsAwesome/v0tti.t b/t/IsAwesome/v0tti.t new file mode 100644 index 000000000..4a1af6df7 --- /dev/null +++ b/t/IsAwesome/v0tti.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_v0tti"; +zci is_cached => 1; + +ddg_goodie_test( + [qw( + DDG::Goodie::IsAwesome::v0tti + )], + 'duckduckhack v0tti' => test_zci('v0tti is awesome and has successfully completed the DuckDuckHack Goodie tutorial!'), + 'duckduckhack v0tti is awesome' => undef, +); + +done_testing;