Skip to content

Commit

Permalink
Merge branch 'master' of github.com:CPAN-API/cpan-api into mo/authorized
Browse files Browse the repository at this point in the history
  • Loading branch information
monken committed Jun 25, 2011
2 parents c961292 + 31da29a commit 0b31289
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion dist.ini
Expand Up @@ -6,6 +6,7 @@ license = BSD
copyright_holder = Moritz Onken and Olaf Alders
copyright_year = 2011

; authordep Dist::Zilla::PluginBundle::JQUELIN
[@Filter]
-bundle = @JQUELIN
-remove = AutoVersion
Expand All @@ -15,7 +16,7 @@ copyright_year = 2011
Archive::Any = 0
DateTime::Format::Epoch::Unix = 0
DateTime::Format::ISO8601 = 0
Devel::Argnames = 0
Devel::ArgNames = 0
ElasticSearch = 0.36
EV = 0
Gravatar::URL = 0
Expand Down
1 change: 1 addition & 0 deletions lib/MetaCPAN/Document/Author.pm
Expand Up @@ -83,6 +83,7 @@ analyzed JSON string.
=cut

has name => ( index => 'analyzed' );
has asciiname => ( index => 'analyzed' );
has email => ( isa => ArrayRef, coerce => 1 );
has pauseid => ( id => 1 );
has dir => ( lazy_build => 1 );
Expand Down
7 changes: 4 additions & 3 deletions lib/MetaCPAN/Script/Author.pm
Expand Up @@ -47,15 +47,16 @@ sub index_authors {
log_info { "Indexing $count authors" };

while ( my ( $pauseid, $data ) = each %$authors ) {
my ( $name, $email, $homepage ) =
( @$data{qw(fullname email homepage)} );
my ( $name, $email, $homepage, $asciiname ) =
( @$data{qw(fullname email homepage asciiname)} );
$name = undef if(ref $name);
$email = lc($pauseid) . '@cpan.org'
unless ( $email && Email::Valid->address($email) );
log_debug { encode( 'UTF-8', sprintf("Indexing %s: %s <%s>", $pauseid, $name, $email ) ) };
my $conf = $self->author_config( $pauseid, MetaCPAN::Util::author_dir($pauseid) );
my $put = { pauseid => $pauseid,
name => $name,
asciiname => ref $asciiname ? undef : $asciiname,
email => $email,
website => $homepage,
map { $_ => $conf->{$_} }
Expand Down Expand Up @@ -104,7 +105,7 @@ sub author_config {
} else {
$author =
{ map { $_ => $author->{$_} }
qw(name profile blog perlmongers donation email website city region country location extra)
qw(name asciiname profile blog perlmongers donation email website city region country location extra)
};
return $author;
}
Expand Down

0 comments on commit 0b31289

Please sign in to comment.