i did the tutorial yaya

master
er0k 2015-07-11 17:41:55 +00:00
parent 4b77caf26a
commit c31cee144d
2 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,34 @@
package DDG::Goodie::IsAwesome::er0k;
# ABSTRACT: Write an abstract here
# Start at https://duck.co/duckduckhack/goodie_overview if you are new
# to instant answer development
use DDG::Goodie;
use strict;
zci answer_type => "is_awesome_er0k";
zci is_cached => 1;
# Metadata. See https://duck.co/duckduckhack/metadata for help in filling out this section.
name "IsAwesome er0k";
description "wtf is this?";
primary_example_queries "first example query", "second example query";
secondary_example_queries "optional -- demonstrate any additional triggers";
# Uncomment and complete: https://duck.co/duckduckhack/metadata#category
# category "";
# Uncomment and complete: https://duck.co/duckduckhack/metadata#topics
# topics "";
code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/er0k.pm";
attribution github => ["https://github.com/er0k", "er0k"],
twitter => "er0k";
# Triggers
triggers any => "duckduckhack er0k";
# Handle statement
handle remainder => sub {
return if $_;
return "fart fart fart";
};
1;

17
t/IsAwesome/er0k.t Normal file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => "is_awesome_er0k";
zci is_cached => 1;
ddg_goodie_test(
[qw( DDG::Goodie::IsAwesome::er0k )],
'duckduckhack er0k' => test_zci('fart fart fart'),
'duckduckhack GitHubUsername is awesome' => undef,
);
done_testing;