Skip to content

Commit

Permalink
Merge pull request #622 from metacpan/mickey/author_custodial_flag
Browse files Browse the repository at this point in the history
Added 'custodial' flag to 'author' mapping.
  • Loading branch information
oalders committed Apr 1, 2017
2 parents aa6a719 + 2c3cc83 commit f9058f9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/MetaCPAN/Document/Author.pm
Expand Up @@ -92,6 +92,12 @@ has updated => (
isa => 'DateTime',
);

has is_pause_custodial_account => (
is => 'ro',
isa => Bool,
default => 0,
);

sub _build_gravatar_url {
my $self = shift;

Expand Down
3 changes: 3 additions & 0 deletions lib/MetaCPAN/Script/Author.pm
Expand Up @@ -96,6 +96,9 @@ sub index_authors {
grep {$_} @{ $put->{website} }
];

$put->{is_pause_custodial_account} = 1
if $name and $name =~ /\(PAUSE Custodial Account\)/;

# Now check the format we have is actually correct
my @errors = MetaCPAN::Document::Author->validate($put);
next if scalar @errors;
Expand Down
3 changes: 3 additions & 0 deletions lib/MetaCPAN/Script/Mapping/CPAN/Author.pm
Expand Up @@ -47,6 +47,9 @@ sub mapping {
"index" : "not_analyzed",
"type" : "string"
},
"is_pause_custodial_account" : {
"type" : "boolean"
},
"donation" : {
"dynamic" : true,
"properties" : {
Expand Down

0 comments on commit f9058f9

Please sign in to comment.