Acme-CPANAuthors-MBTI
view release on metacpan or search on metacpan
}
],
"include_underscores" : 0
},
"Dist::Zilla::Role::MetaProvider::Provider" : {
"$Dist::Zilla::Role::MetaProvider::Provider::VERSION" : "2.002004",
"inherit_missing" : 1,
"inherit_version" : 1,
"meta_noindex" : 1
},
"Dist::Zilla::Role::ModuleMetadata" : {
"Module::Metadata" : "1.000033",
"version" : "0.004"
}
},
"name" : "@Author::KENTNL/MetaProvides::Package",
"version" : "2.004003"
},
{
"class" : "Dist::Zilla::Plugin::MetaData::BuiltWith",
"config" : {
"Dist::Zilla::Plugin::MetaData::BuiltWith" : {
"$Module::Metadata::VERSION" : "1.000033",
"_stash_key" : "x_BuiltWith",
"external_file_name" : "misc/built_with.json",
"show_config" : "1",
"show_uname" : "1",
"uname" : {
"uname_args" : [
"-s",
"-o",
"-r",
"-m",
-phase = develop
-type = suggests
Dist::Zilla::App::Command::bakeini = 0.001000
Dist::Zilla::PluginBundle::Author::KENTNL = 2.025021
[Prereqs::AuthorDeps / @Author::KENTNL/Prereqs::AuthorDeps]
[Authority / @Author::KENTNL/Authority]
:version = 1.006
authority = cpan:KENTNL
do_metadata = 1
locate_comment = 1
[MakeMaker / @Author::KENTNL/MakeMaker]
default_jobs = 10
[Author::KENTNL::RecommendFixes / @Author::KENTNL/Author::KENTNL::RecommendFixes]
:version = 0.004002
[Readme::Brief / @Author::KENTNL/ShippedReadme]
inc/expand_author_list.pm view on Meta::CPAN
my ($authorid) = @_;
dolog("Resolving Gravatar for $authorid");
my $request = http()->get( 'http://api.metacpan.org/v0/author/' . $authorid ) // {};
my $content = $request->{content} // {};
my $json = json()->decode($content);
my $url = $json->{gravatar_url};
$url =~ s/s=\K130/80/g;
return $url;
}
sub extract_data {
state $result_cache = {};
my ( $category, $source_file ) = @_;
return $result_cache->{$category} if exists $result_cache->{$category};
my $author_data = Parse::CPAN::Whois->new( mirror_whois('00whois.xml') );
my $author_hash = {};
my @authors;
for my $id ( path($source_file)->lines_raw( { chomp => 1 } ) ) {
dolog("$category / $id");
my $name = $author_data->author($id)->name;
$author_hash->{$id} = $name;
push @authors,
{
id => $id,
name => $name,
avatar => get_gravatar_url($id),
};
}
my $author_db = Acme::CPANAuthors::Factory->create( $category . '_temp' => $author_hash );
for my $author (@authors) {
inc/expand_author_list.pm view on Meta::CPAN
my (%config) = ref $_[0] ? %{ $_[0] } : @_;
my $plugin = $config{plugin};
my $plugin_name = $config{plugin_name} // ref $config{plugin};
my $plugin_version = $config{plugin_version} // $plugin_name->VERSION;
my $category = $config{category};
my $authors = '';
my $avatar_urls = '';
for my $author ( @{ $config{data} } ) {
$authors .= " $author->{id} => '$author->{name}',\n";
$avatar_urls .= " $author->{id} => '$author->{avatar}',\n";
}
my @display_authors = map { $config{data}->[ rng->irand() % scalar @{ $config{data} } ] } 1;
return <<"EOF";
# Code inserted by inc/expand_author_list#authors_to_code
# by $plugin_name $plugin_version
## no critic (ValuesAndExpressions::RestrictLongStrings)
my \%authors = (
$authors);
my \%avatar_urls = (
$avatar_urls);
inc/expand_author_list.pm view on Meta::CPAN
}
sub authors_to_avatars {
my (%config) = ref $_[0] ? %{ $_[0] } : @_;
my $plugin = $config{plugin};
my $plugin_name = $config{plugin_name} // ref $config{plugin};
my $plugin_version = $config{plugin_version} // $plugin_name->VERSION;
my @lines;
for my $author ( @{ $config{data} } ) {
my $name = encode_entities( $author->{name} );
my $title = "$author->{id} ($name), $author->{dists} distribution" . ( $author->{dists} != 1 ? 's' : '' );
push @lines,
qq{<a href="http://metacpan.org/author/$author->{id}">}
. q{<span>}
. q{<img style="margin: 0 5px 5px 0;" width="80" height="80" }
. qq{src="$author->{avatar}" alt="$author->{id}" title="$title" />}
. q{</span>} . q{</a>};
}
my $content = join( "<!--\n-->", @lines );
inc/expand_author_list.pm view on Meta::CPAN
EOF
}
sub generate_synopsis {
my (%config) = ref $_[0] ? %{ $_[0] } : @_;
my $plugin = $config{plugin};
my $plugin_name = $config{plugin_name} // ref $config{plugin};
my $plugin_version = $config{plugin_version} // $plugin_name->VERSION;
my @items = @{ $config{'data'} };
my @authors = map { $items[ rng->irand() % scalar @items ] } 1 .. 3;
return ( <<"EOF" =~ s/^(\S)/ $1/msgr );
use Acme::CPANAuthors;
use Acme::CPANAuthors::$config{category};
# Or just use Acme::CPANAuthors::MBTI
my \$authors = Acme::CPANAuthors->new('$config{category}');
my \$number = \$authors->count;
my \@ids = \$authors->id;
t/00-report-prereqs.t view on Meta::CPAN
);
# Add dynamic prereqs to the included modules list (if we can)
my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml';
if ( $source && $HAS_CPAN_META
&& (my $meta = eval { CPAN::Meta->load_file($source) } )
) {
$full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs);
}
else {
$source = 'static metadata';
}
my @full_reports;
my @dep_errors;
my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs;
# Add static includes into a fake section
for my $mod (@include) {
$req_hash->{other}{modules}{$mod} = 0;
}
( run in 0.274 second using v1.01-cache-2.11-cpan-496ff517765 )