<commit_before>package DDG::Spice::Gravatar;
# ABSTRACT: Shows gravatar of given e-mail 

use DDG::Spice;
use Digest::MD5 qw(md5_hex);

triggers startend => "gravatar", "avatar of", "gravatar of";

spice to => 'http://gravatar.com/$1.json?callback={{callback}}';

attribution github => ['https://github.com/adman','Adman'],
            twitter => ['http://twitter.com/adman_X','adman_X'];

handle remainder => sub {
    s/^\s+//;
    s/\s+$//;
    my $email_hash = md5_hex(lc $_);
    return $email_hash if defined $email_hash;
    return;
};

1;<commit_msg>Changed http://gravatar.com to http://en.gravatar.com in Gravatar.pm to avoid redirection (possible leak).<commit_after>package DDG::Spice::Gravatar;
# ABSTRACT: Shows gravatar of given e-mail 

use DDG::Spice;
use Digest::MD5 qw(md5_hex);

triggers startend => "gravatar", "avatar of", "gravatar of";

spice to => 'http://en.gravatar.com/$1.json?callback={{callback}}';

attribution github => ['https://github.com/adman','Adman'],
            twitter => ['http://twitter.com/adman_X','adman_X'];

handle remainder => sub {
    s/^\s+//;
    s/\s+$//;
    my $email_hash = md5_hex(lc $_);
    return $email_hash if defined $email_hash;
    return;
};

1;
{'fraction_non_alphanumeric': 0.18976897689768976, 'fraction_numerical': 0.00825082508250825, 'mean_word_length': 3.9109311740890687, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3187774', 'n_tokens_mistral': 458, 'n_tokens_neox': 441, 'n_words': 95}