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

Commit

Permalink
Merge pull request #53 from techman83/add_unlicense-fix_bug
Browse files Browse the repository at this point in the history
Add unlicense fix bug
  • Loading branch information
techman83 committed May 25, 2016
2 parents 5d56a8c + b8a8003 commit f3bb17f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
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

0 comments on commit f3bb17f

Please sign in to comment.