spdx 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/spdx.rb +22 -0
- data/lib/spdx/version.rb +1 -1
- data/spec/spdx_spec.rb +21 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ee8c6428b27ec96a45846d4bcd98a9fd1d769ba
|
4
|
+
data.tar.gz: 6e8ba7832367a63e560b144c9043adb3981b93f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10ff3a6783d7bb21042f8ac931e6657a5c30b312d5dea4552bd5131468b769d657ccec580fe1bec642f8bccc673e6299238411089ecacd1702a6527389267ce3
|
7
|
+
data.tar.gz: de633ce981bc1c1acb783f83247bd6f796f917b5dc149cf2738312fc9296a9e38cdb35bd40d2ec01e2f705fdb61392c9b793b5d4eae160f140b7b4881973f3c1
|
data/lib/spdx.rb
CHANGED
@@ -45,11 +45,33 @@ module Spdx
|
|
45
45
|
'bsd' => 'BSD-3-Clause',
|
46
46
|
'new bsd license' => 'BSD-3-Clause',
|
47
47
|
'gplv3' => 'GPL-3.0',
|
48
|
+
'gplv2' => 'GPL-2.0',
|
49
|
+
'gpl3' => 'GPL-3.0',
|
50
|
+
'gpl2' => 'GPL-2.0',
|
51
|
+
'gpl 3' => 'GPL-3.0',
|
52
|
+
'gpl 2' => 'GPL-2.0',
|
53
|
+
'gpl v3' => 'GPL-3.0',
|
54
|
+
'gpl v2' => 'GPL-2.0',
|
55
|
+
'gpl 3.0' => 'GPL-3.0',
|
56
|
+
'gpl 2.0' => 'GPL-2.0',
|
57
|
+
'gpl-3' => 'GPL-3.0',
|
48
58
|
'gpl-2' => 'GPL-2.0',
|
59
|
+
'gpl30' => 'GPL-3.0',
|
60
|
+
'gpl20' => 'GPL-2.0',
|
61
|
+
'gpl v3+' => 'GPL-3.0+',
|
62
|
+
'gpl v2+' => 'GPL-2.0+',
|
49
63
|
'gpl' => 'GPL-2.0+',
|
64
|
+
'gpl (≥ 3)' => 'GPL-3.0+',
|
65
|
+
'gpl-2 | gpl-3 [expanded from: gpl (≥ 2)]' => 'GPL-2.0+',
|
66
|
+
'gpl-2 | gpl-3 [expanded from: gpl (≥ 2.0)]' => 'GPL-2.0+',
|
67
|
+
'gpl-2 | gpl-3 [expanded from: gpl]' => 'GPL-2.0+',
|
68
|
+
'gpl-2 | gpl-3' => 'GPL-2.0+',
|
50
69
|
"gnu lesser general public license" => 'LGPL-2.1+',
|
51
70
|
'lgplv2 or later' => 'LGPL-2.1+',
|
52
71
|
'gplv2 or later' => 'GPL-2.0+',
|
72
|
+
'gpl2 w/ cpe' => 'GPL-2.0-with-classpath-exception',
|
73
|
+
'new bsd license (gpl-compatible)' => 'BSD-3-Clause',
|
74
|
+
'the gpl v3' => 'GPL-3.0',
|
53
75
|
'public domain' => 'Unlicense'
|
54
76
|
}
|
55
77
|
end
|
data/lib/spdx/version.rb
CHANGED
data/spec/spdx_spec.rb
CHANGED
@@ -32,6 +32,27 @@ describe Spdx do
|
|
32
32
|
end
|
33
33
|
|
34
34
|
it "should return know licenses for special cases" do
|
35
|
+
expect(Spdx.find('GPL3').name).to eq('GNU General Public License v3.0 only')
|
36
|
+
expect(Spdx.find('GPL v3').name).to eq('GNU General Public License v3.0 only')
|
37
|
+
expect(Spdx.find('GPL3').name).to eq('GNU General Public License v3.0 only')
|
38
|
+
expect(Spdx.find('GPL 3.0').name).to eq('GNU General Public License v3.0 only')
|
39
|
+
expect(Spdx.find('GPL-3').name).to eq('GNU General Public License v3.0 only')
|
40
|
+
expect(Spdx.find('GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]').name).to eq('GNU General Public License v2.0 or later')
|
41
|
+
expect(Spdx.find('GPL-2 | GPL-3 [expanded from: GPL]').name).to eq('GNU General Public License v2.0 or later')
|
42
|
+
expect(Spdx.find('GPL (≥ 3)').name).to eq('GNU General Public License v3.0 or later')
|
43
|
+
expect(Spdx.find('gpl30').name).to eq('GNU General Public License v3.0 only')
|
44
|
+
expect(Spdx.find("GPL v2+").name).to eq('GNU General Public License v2.0 or later')
|
45
|
+
expect(Spdx.find("GPL 2").name).to eq('GNU General Public License v2.0 only')
|
46
|
+
expect(Spdx.find("GPL v2").name).to eq('GNU General Public License v2.0 only')
|
47
|
+
expect(Spdx.find("GPL2").name).to eq('GNU General Public License v2.0 only')
|
48
|
+
expect(Spdx.find("GPL-2 | GPL-3").name).to eq('GNU General Public License v2.0 or later')
|
49
|
+
expect(Spdx.find("GPL-2 | GPL-3 [expanded from: GPL (≥ 2.0)]").name).to eq('GNU General Public License v2.0 or later')
|
50
|
+
expect(Spdx.find("GPL2 w/ CPE").name).to eq('GNU General Public License v2.0 w/Classpath exception')
|
51
|
+
expect(Spdx.find("GPL 2.0").name).to eq('GNU General Public License v2.0 only')
|
52
|
+
expect(Spdx.find("New BSD License (GPL-compatible)").name).to eq('BSD 3-clause "New" or "Revised" License')
|
53
|
+
expect(Spdx.find("The GPL V3").name).to eq('GNU General Public License v3.0 only')
|
54
|
+
|
55
|
+
|
35
56
|
expect(Spdx.find('perl_5').name).to eq("Artistic License 1.0 (Perl)")
|
36
57
|
expect(Spdx.find('BSD3').name).to eq('BSD 3-clause "New" or "Revised" License')
|
37
58
|
expect(Spdx.find('BSD').name).to eq('BSD 3-clause "New" or "Revised" License')
|