Small updates to template files

master
Zaahir Moolla 2013-10-28 16:18:28 -04:00
parent 499df49e98
commit df8feb651d
3 changed files with 28 additions and 26 deletions

View File

@ -1,19 +0,0 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
# Example test
# Populate it with more useful tests
ddg_goodie_test(
[qw(
DDG::Goodie::<: $ia_name :>
)],
'example this' => test_zci('this')
);
done_testing;

View File

@ -1,28 +1,34 @@
package DDG::Goodie::<: $ia_name :>;
# ABSTRACT: Write and abstract here
# Start at https://dukgo.com/duckduckhack/goodie_overview if you are new
# to plugin development
# to instant answer development
use DDG::Goodie;
#Attribution
primary_example_queries "Provide an primary example query";
secondary_example_queries "Provide an second example query";
description "Write an absolutely dazzling explaination of what this plugin does";
primary_example_queries "first example query", "second example query";
secondary_example_queries "optional -- demonstrate any additional triggers";
description "Succinct explanation of what this instant answer does";
name "<: $ia_name :>";
icon_url "";
source "";
code_url "https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Goodie/<: $ia_name :>.pm";
code_url "https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/<: $ia_name :>.pm";
category "";
topics "";
attribution github => ["https://github.com/", ""],
twitter => ["https://twitter.com/", ""];
# Triggers
# Example Word Trigger
triggers any => 'example';
triggers any => "triggerWord", "trigger phrase";
# Handle statement
handle remainder => sub {
# optional - regex guard
# return unless qr/^\w+/;
return $_ if $_;
return;
};
1;

15
template/t/Example.t Normal file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
ddg_goodie_test(
[qw(
DDG::Goodie::<: $ia_name :>
)],
'example query' => test_zci('query')
);
done_testing;