Skip to content

Commit

Permalink
Add the Release download_url to Document::File
Browse files Browse the repository at this point in the history
  • Loading branch information
clintongormley committed Apr 17, 2015
1 parent de4b47a commit d514cfa
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
13 changes: 13 additions & 0 deletions lib/MetaCPAN/Document/File.pm
Expand Up @@ -113,6 +113,19 @@ has module => (
default => sub { [] },
);

=head2 download_url
B<Required>
Download URL of the release
=cut

has download_url => (
is => 'ro',
required => 1
);

=head2 date
B<Required>
Expand Down
19 changes: 10 additions & 9 deletions lib/MetaCPAN/Model/Release.pm
Expand Up @@ -248,15 +248,16 @@ sub _build_files {
indexed => $self->metadata->should_index_file($fpath)
? 1
: 0,
local_path => $child,
maturity => $self->maturity,
metadata => $self->metadata,
name => $filename,
path => $fpath,
release => $self->name,
stat => $stat,
status => $self->status,
version => $self->version,
local_path => $child,
maturity => $self->maturity,
metadata => $self->metadata,
name => $filename,
path => $fpath,
release => $self->name,
download_url => $self->document->download_url,
stat => $stat,
status => $self->status,
version => $self->version,
}
);

Expand Down

0 comments on commit d514cfa

Please sign in to comment.