Skip to content
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.

Add unlicense fix bug #53

Merged
merged 2 commits into from
May 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/App/KSP_CKAN/Roles/Licenses.pm
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ method _build__license_urls {
"W3C" => 'https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document',
"Zlib" => 'http://www.zlib.net/zlib_license.html',
"Zope" => 'http://old.zope.org/Resources/License.1',
"Unlicense" => 'https://unlicense.org/UNLICENSE',
}
}

Expand Down Expand Up @@ -144,6 +145,7 @@ method redistributable_licenses {
"Zlib",
"Zope",
"WTFPL",
"Unlicense",
"open-source", "unrestricted" ];
}

Expand Down
2 changes: 1 addition & 1 deletion lib/App/KSP_CKAN/Tools/IA.pm
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ method ckan_mirrored( :$ckan ) {
$self->logdie("Metadata JSON failed to parse");
};

if ( any { uc($_->{sha1}) eq $ckan->download_sha1 } @{$data->{files}} ) {
if ( any { defined $_->{sha1} && uc($_->{sha1}) eq $ckan->download_sha1 } @{$data->{files}} ) {
return 1;
}

Expand Down
1 change: 1 addition & 0 deletions t/App/KSP_CKAN/Roles/Licenses.t
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ subtest 'licenses' => sub {
"Zlib",
"Zope",
"WTFPL",
"Unlicense",
"open-source", "unrestricted" ];

my @test = $licenses->redistributable_licenses;
Expand Down