Skip to content

Commit

Permalink
Merge pull request #20 from legoktm/spdx-3.1
Browse files Browse the repository at this point in the history
Update to SPDX 3.1
  • Loading branch information
alcohol authored Apr 30, 2018
2 parents 7e111c5 + ce81807 commit cb17687
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 34 deletions.
6 changes: 6 additions & 0 deletions res/spdx-exceptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
"Linux-syscall-note": [
"Linux Syscall Note"
],
"LLVM-exception": [
"LLVM Exception"
],
"LZMA-exception": [
"LZMA exception"
],
Expand All @@ -68,6 +71,9 @@
"OCCT-exception-1.0": [
"Open CASCADE Exception 1.0"
],
"OpenJDK-assembly-exception-1.0": [
"OpenJDK Assembly exception 1.0"
],
"openvpn-openssl-exception": [
"OpenVPN OpenSSL Exception"
],
Expand Down
82 changes: 51 additions & 31 deletions res/spdx-licenses.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@
"AGPL-1.0": [
"Affero General Public License v1.0",
false,
true
],
"AGPL-1.0-only": [
"Affero General Public License v1.0 only",
false,
false
],
"AGPL-1.0-or-later": [
"Affero General Public License v1.0 or later",
false,
false
],
"AGPL-3.0": [
Expand Down Expand Up @@ -305,152 +315,152 @@
false
],
"CC-BY-1.0": [
"Creative Commons Attribution 1.0",
"Creative Commons Attribution 1.0 Generic",
false,
false
],
"CC-BY-2.0": [
"Creative Commons Attribution 2.0",
"Creative Commons Attribution 2.0 Generic",
false,
false
],
"CC-BY-2.5": [
"Creative Commons Attribution 2.5",
"Creative Commons Attribution 2.5 Generic",
false,
false
],
"CC-BY-3.0": [
"Creative Commons Attribution 3.0",
"Creative Commons Attribution 3.0 Unported",
false,
false
],
"CC-BY-4.0": [
"Creative Commons Attribution 4.0",
"Creative Commons Attribution 4.0 International",
false,
false
],
"CC-BY-NC-1.0": [
"Creative Commons Attribution Non Commercial 1.0",
"Creative Commons Attribution Non Commercial 1.0 Generic",
false,
false
],
"CC-BY-NC-2.0": [
"Creative Commons Attribution Non Commercial 2.0",
"Creative Commons Attribution Non Commercial 2.0 Generic",
false,
false
],
"CC-BY-NC-2.5": [
"Creative Commons Attribution Non Commercial 2.5",
"Creative Commons Attribution Non Commercial 2.5 Generic",
false,
false
],
"CC-BY-NC-3.0": [
"Creative Commons Attribution Non Commercial 3.0",
"Creative Commons Attribution Non Commercial 3.0 Unported",
false,
false
],
"CC-BY-NC-4.0": [
"Creative Commons Attribution Non Commercial 4.0",
"Creative Commons Attribution Non Commercial 4.0 International",
false,
false
],
"CC-BY-NC-ND-1.0": [
"Creative Commons Attribution Non Commercial No Derivatives 1.0",
"Creative Commons Attribution Non Commercial No Derivatives 1.0 Generic",
false,
false
],
"CC-BY-NC-ND-2.0": [
"Creative Commons Attribution Non Commercial No Derivatives 2.0",
"Creative Commons Attribution Non Commercial No Derivatives 2.0 Generic",
false,
false
],
"CC-BY-NC-ND-2.5": [
"Creative Commons Attribution Non Commercial No Derivatives 2.5",
"Creative Commons Attribution Non Commercial No Derivatives 2.5 Generic",
false,
false
],
"CC-BY-NC-ND-3.0": [
"Creative Commons Attribution Non Commercial No Derivatives 3.0",
"Creative Commons Attribution Non Commercial No Derivatives 3.0 Unported",
false,
false
],
"CC-BY-NC-ND-4.0": [
"Creative Commons Attribution Non Commercial No Derivatives 4.0",
"Creative Commons Attribution Non Commercial No Derivatives 4.0 International",
false,
false
],
"CC-BY-NC-SA-1.0": [
"Creative Commons Attribution Non Commercial Share Alike 1.0",
"Creative Commons Attribution Non Commercial Share Alike 1.0 Generic",
false,
false
],
"CC-BY-NC-SA-2.0": [
"Creative Commons Attribution Non Commercial Share Alike 2.0",
"Creative Commons Attribution Non Commercial Share Alike 2.0 Generic",
false,
false
],
"CC-BY-NC-SA-2.5": [
"Creative Commons Attribution Non Commercial Share Alike 2.5",
"Creative Commons Attribution Non Commercial Share Alike 2.5 Generic",
false,
false
],
"CC-BY-NC-SA-3.0": [
"Creative Commons Attribution Non Commercial Share Alike 3.0",
"Creative Commons Attribution Non Commercial Share Alike 3.0 Unported",
false,
false
],
"CC-BY-NC-SA-4.0": [
"Creative Commons Attribution Non Commercial Share Alike 4.0",
"Creative Commons Attribution Non Commercial Share Alike 4.0 International",
false,
false
],
"CC-BY-ND-1.0": [
"Creative Commons Attribution No Derivatives 1.0",
"Creative Commons Attribution No Derivatives 1.0 Generic",
false,
false
],
"CC-BY-ND-2.0": [
"Creative Commons Attribution No Derivatives 2.0",
"Creative Commons Attribution No Derivatives 2.0 Generic",
false,
false
],
"CC-BY-ND-2.5": [
"Creative Commons Attribution No Derivatives 2.5",
"Creative Commons Attribution No Derivatives 2.5 Generic",
false,
false
],
"CC-BY-ND-3.0": [
"Creative Commons Attribution No Derivatives 3.0",
"Creative Commons Attribution No Derivatives 3.0 Unported",
false,
false
],
"CC-BY-ND-4.0": [
"Creative Commons Attribution No Derivatives 4.0",
"Creative Commons Attribution No Derivatives 4.0 International",
false,
false
],
"CC-BY-SA-1.0": [
"Creative Commons Attribution Share Alike 1.0",
"Creative Commons Attribution Share Alike 1.0 Generic",
false,
false
],
"CC-BY-SA-2.0": [
"Creative Commons Attribution Share Alike 2.0",
"Creative Commons Attribution Share Alike 2.0 Generic",
false,
false
],
"CC-BY-SA-2.5": [
"Creative Commons Attribution Share Alike 2.5",
"Creative Commons Attribution Share Alike 2.5 Generic",
false,
false
],
"CC-BY-SA-3.0": [
"Creative Commons Attribution Share Alike 3.0",
"Creative Commons Attribution Share Alike 3.0 Unported",
false,
false
],
"CC-BY-SA-4.0": [
"Creative Commons Attribution Share Alike 4.0",
"Creative Commons Attribution Share Alike 4.0 International",
false,
false
],
Expand Down Expand Up @@ -1015,7 +1025,7 @@
true
],
"LGPL-2.1+": [
"GNU Library General Public License v2 or later",
"GNU Library General Public License v2.1 or later",
true,
true
],
Expand Down Expand Up @@ -1079,6 +1089,11 @@
true,
false
],
"Linux-OpenIB": [
"Linux Kernel Variant of OpenIB.org license",
false,
false
],
"LPL-1.0": [
"Lucent Public License Version 1.0",
true,
Expand Down Expand Up @@ -1129,6 +1144,11 @@
true,
false
],
"MIT-0": [
"MIT No Attribution",
true,
false
],
"MIT-advertising": [
"Enlightenment License (e16)",
false,
Expand Down
6 changes: 3 additions & 3 deletions tests/SpdxLicensesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ public function testResourceFilesContainJson($file)

public function testGetLicenseByIdentifier()
{
$license = $this->licenses->getLicenseByIdentifier('AGPL-1.0');
$this->assertEquals('Affero General Public License v1.0', $license[0]);
$license = $this->licenses->getLicenseByIdentifier('AGPL-1.0-only');
$this->assertEquals('Affero General Public License v1.0 only', $license[0]);
$this->assertFalse($license[1]);
$this->assertStringStartsWith('https://spdx.org/licenses/', $license[2]);
$this->assertFalse($license[3]);
Expand All @@ -149,7 +149,7 @@ public function testGetLicenses()
$this->assertArrayHasKey('cc-by-sa-4.0', $results);
$this->assertArrayHasKey(0, $results['cc-by-sa-4.0']);
$this->assertEquals('CC-BY-SA-4.0', $results['cc-by-sa-4.0'][0]);
$this->assertEquals('Creative Commons Attribution Share Alike 4.0', $results['cc-by-sa-4.0'][1]);
$this->assertEquals('Creative Commons Attribution Share Alike 4.0 International', $results['cc-by-sa-4.0'][1]);
$this->assertEquals(false, $results['cc-by-sa-4.0'][2]);
$this->assertEquals(false, $results['cc-by-sa-4.0'][3]);
}
Expand Down

0 comments on commit cb17687

Please sign in to comment.