Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

KirshApps's First Goodie #1015

Merged
merged 6 commits into from Mar 4, 2015
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 19 additions & 0 deletions lib/DDG/Goodie/IsAwesome/kirshapps.pm
@@ -0,0 +1,19 @@
package DDG::Goodie::IsAwesome::kirshapps;

use DDG::Goodie;
zci answer_type => "is_awesome_kirshapps";
zci is_cached => 1;
name "IsAwesome kirshapps";
description "Tells everyone that kirshapps is awesome";
primary_example_queries "duckduckhack kirshapps";
secondary_example_queries "optional -- demonstrate any additional triggers";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seconday_example_queries line can be removed

category "special";
topics "special_interest", "geek";
code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/IsAwesome/kirshapps.pm";
attribution github => ["https://github.com/kirshapps", "kirshapps"];
triggers start => "duckduckhack kirshapps";
handle remainder => sub {
return "kirshapps is awesome and has successfully completed the DuckDuckHack goodie tutorial!"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you switch this hard-tab out for 4 spaces

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kirshapps Can you fix this hard-tab here? It should be 4 spaces 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mintsoft. How exactly would I do that?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kirshapps sorry for the slow reply; you could just delete the tab character and manually type 4 spaces; however the Codio editor should already be configured for spaces/"soft tabs":
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mintsoft.

};

1;
19 changes: 19 additions & 0 deletions t/IsAwesome/kirshapps.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_kirshapps";
zci is_cached => 1;

ddg_goodie_test(
[qw(
DDG::Goodie::IsAwesome::kirshapps
)],
'duckduckhack kirshapps' => test_zci('kirshapps is awesome and has successfully completed the DuckDuckHack Goodie tutorial!'),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you decapitalize the g in goodie? This is what is making the tests fail.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either makes sense...It's up to @kirshapps

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@javathunderman Hate to be that guy..... 😬 As "Goodie" is a proper noun it does start with a capital letter and is included in the tutorial this way, but overall it's a tiny change and either way would work.. 😄

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MrChrisW You're right, and don't worry...More than usual I am that guy. 😄

'duckduckhack kirshapps is awesome' => undef,
);

done_testing;