spdx 1.2.8 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CODE_OF_CONDUCT.md +52 -28
- data/README.md +1 -1
- data/lib/spdx.rb +14 -45
- data/lib/spdx/version.rb +1 -1
- data/spdx.gemspec +2 -2
- data/spec/spdx_spec.rb +15 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab1a08a469d835c79da210f3089871c2a90a4582
|
4
|
+
data.tar.gz: ce5e6e21b416a8dfb3d3cd2cefab5f9b3e65166f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8599cb7916bf96d6259556effabdd3172e85c048963e8a67099a092701f3a6f757d591aaabd3c67db580e1a967a3cc28adc9486898807da830bfcbc2ebdc04c
|
7
|
+
data.tar.gz: 8adf47e9e068838ab72463e006d44dfe0039c41ca43e5081ee8a2b7e55a0a5de0a024cde2c05396fe3351c7480f3255bda014a2922c99880e4599f119489a47a
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -1,24 +1,41 @@
|
|
1
|
-
# Contributor Code of Conduct
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
2
|
|
3
|
-
|
4
|
-
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
-
contribute through reporting issues, posting feature requests, updating
|
6
|
-
documentation, submitting pull requests or patches, and other activities.
|
3
|
+
## Our Pledge
|
7
4
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
12
22
|
|
13
23
|
Examples of unacceptable behavior by participants include:
|
14
24
|
|
15
|
-
* The use of sexualized language or imagery
|
16
|
-
|
17
|
-
* Trolling
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
18
28
|
* Public or private harassment
|
19
|
-
* Publishing
|
20
|
-
|
21
|
-
* Other
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
22
39
|
|
23
40
|
Project maintainers have the right and responsibility to remove, edit, or
|
24
41
|
reject comments, commits, code, wiki edits, issues, and other contributions
|
@@ -26,25 +43,32 @@ that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
26
43
|
permanently any contributor for other behaviors that they deem inappropriate,
|
27
44
|
threatening, offensive, or harmful.
|
28
45
|
|
29
|
-
|
30
|
-
fairly and consistently applying these principles to every aspect of managing
|
31
|
-
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
-
Conduct may be permanently removed from the project team.
|
46
|
+
## Scope
|
33
47
|
|
34
48
|
This Code of Conduct applies both within project spaces and in public spaces
|
35
|
-
when an individual is representing the project or its community.
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
36
56
|
|
37
57
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
-
reported by contacting
|
58
|
+
reported by contacting the project team at andrew@libraries.io. All
|
39
59
|
complaints will be reviewed and investigated and will result in a response that
|
40
|
-
is deemed necessary and appropriate to the circumstances.
|
41
|
-
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
-
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
43
67
|
|
68
|
+
## Attribution
|
44
69
|
|
45
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
46
|
-
|
47
|
-
[http://contributor-covenant.org/version/1/3/0/][version]
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
48
72
|
|
49
73
|
[homepage]: http://contributor-covenant.org
|
50
|
-
[version]: http://contributor-covenant.org/version/1/
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# [Spdx](http://libraries.io/rubygems/spdx)
|
2
2
|
|
3
|
-
A SPDX license
|
3
|
+
A SPDX license normalizer
|
4
4
|
|
5
5
|
This gem allows you to find standard SPDX licenses from similar, but not exact names using [FuzzyMatch](https://github.com/seamusabshere/fuzzy_match) to find the closest match.
|
6
6
|
|
data/lib/spdx.rb
CHANGED
@@ -43,69 +43,49 @@ module Spdx
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def self.find_by_special_case(name)
|
46
|
+
gpl = gpl_match(name)
|
47
|
+
return gpl if gpl
|
46
48
|
lookup(special_cases[name.downcase.strip])
|
47
49
|
end
|
48
50
|
|
51
|
+
def self.gpl_match(name)
|
52
|
+
match = name.match(/^(l|a)?gpl-?\s?_?v?(1|2|3)\.?(\d)?(\+)?$/i)
|
53
|
+
return unless match
|
54
|
+
lookup "#{match[1]}GPL-#{match[2]}.#{match[3] || 0}#{match[4]}"
|
55
|
+
end
|
56
|
+
|
49
57
|
def self.special_cases
|
50
58
|
{
|
51
59
|
'perl_5' => 'Artistic-1.0-Perl',
|
52
60
|
'bsd3' => 'BSD-3-Clause',
|
53
61
|
'bsd' => 'BSD-3-Clause',
|
54
62
|
'new bsd license' => 'BSD-3-Clause',
|
55
|
-
'gplv3' => 'GPL-3.0',
|
56
|
-
'gplv2' => 'GPL-2.0',
|
57
|
-
'gpl3' => 'GPL-3.0',
|
58
|
-
'gpl2' => 'GPL-2.0',
|
59
|
-
'gpl 3' => 'GPL-3.0',
|
60
|
-
'gpl_1' => 'GPL-1.0',
|
61
|
-
'gpl_2' => 'GPL-2.0',
|
62
|
-
'gpl_3' => 'GPL-3.0',
|
63
|
-
'gpl 2' => 'GPL-2.0',
|
64
|
-
'gpl v3' => 'GPL-3.0',
|
65
|
-
'gpl v2' => 'GPL-2.0',
|
66
|
-
'gpl 3.0' => 'GPL-3.0',
|
67
|
-
'gpl 2.0' => 'GPL-2.0',
|
68
|
-
'gpl-3' => 'GPL-3.0',
|
69
|
-
'gpl-2' => 'GPL-2.0',
|
70
|
-
'gpl30' => 'GPL-3.0',
|
71
|
-
'gpl20' => 'GPL-2.0',
|
72
|
-
'gpl v3+' => 'GPL-3.0+',
|
73
|
-
'gpl v2+' => 'GPL-2.0+',
|
74
|
-
'gplv2+' => 'GPL-2.0+',
|
75
63
|
'gpl' => 'GPL-2.0+',
|
64
|
+
'gpl-2 | gpl-3 [expanded from: gpl (≥ 2.0)]' => 'GPL-2.0+',
|
65
|
+
'gpl-2 | gpl-3 [expanded from: gpl]' => 'GPL-2.0+',
|
66
|
+
'gpl-2 | gpl-3 [expanded from: gpl (≥ 2)]' => 'GPL-2.0+',
|
67
|
+
'gpl-2 | gpl-3' => 'GPL-2.0+',
|
68
|
+
'gplv2 or later' => 'GPL-2.0+',
|
69
|
+
'the gpl v3' => 'GPL-3.0',
|
76
70
|
'gpl (≥ 3)' => 'GPL-3.0+',
|
77
71
|
'mpl2.0' => 'mpl-2.0',
|
78
72
|
'mpl1' => 'mpl-1.0',
|
79
73
|
'mpl1.0' => 'mpl-1.0',
|
80
74
|
'mpl1.1' => 'mpl-1.1',
|
81
75
|
'mpl2' => 'mpl-2.0',
|
82
|
-
'gpl-2 | gpl-3 [expanded from: gpl (≥ 2)]' => 'GPL-2.0+',
|
83
|
-
'gpl-2 | gpl-3 [expanded from: gpl (≥ 2.0)]' => 'GPL-2.0+',
|
84
|
-
'gpl-2 | gpl-3 [expanded from: gpl]' => 'GPL-2.0+',
|
85
|
-
'gpl-2 | gpl-3' => 'GPL-2.0+',
|
86
76
|
"gnu lesser general public license" => 'LGPL-2.1+',
|
87
77
|
'lgplv2 or later' => 'LGPL-2.1+',
|
88
|
-
'gplv2 or later' => 'GPL-2.0+',
|
89
78
|
'gpl2 w/ cpe' => 'GPL-2.0-with-classpath-exception',
|
90
79
|
'new bsd license (gpl-compatible)' => 'BSD-3-Clause',
|
91
|
-
'the gpl v3' => 'GPL-3.0',
|
92
80
|
'public domain' => 'Unlicense',
|
93
81
|
'cc0' => 'CC0-1.0',
|
94
|
-
'lgpl v3' => 'LGPL-3.0',
|
95
82
|
'artistic_2' => 'Artistic-2.0',
|
96
83
|
'artistic_1' => 'Artistic-1.0',
|
97
|
-
'lgpl 2.1' => 'LGPL-2.1',
|
98
|
-
'lgpl' => 'LGPL-3.0',
|
99
|
-
'lgplv2.1+' => 'LGPL-2.1+',
|
100
|
-
'lgplv3' => 'LGPL-3.0',
|
101
|
-
'gplv3+' => 'GPL-3.0+',
|
102
84
|
'alv2' => 'Apache-2.0',
|
103
85
|
'asl 2.0' => 'Apache-2.0',
|
104
86
|
'mpl 2.0' => 'MPL-2.0',
|
105
|
-
'agplv3' => 'AGPL-3.0',
|
106
87
|
'publicdomain' => 'Unlicense',
|
107
88
|
'unlicensed' => 'Unlicense',
|
108
|
-
'lgpl-3' => 'LGPL-3.0',
|
109
89
|
'psfl' => 'Python-2.0',
|
110
90
|
'psf' => 'Python-2.0',
|
111
91
|
'asl2' => 'Apache-2.0',
|
@@ -116,20 +96,9 @@ module Spdx
|
|
116
96
|
'ZPL 1.1' => 'ZPL-1.1',
|
117
97
|
'ZPL 2.0' => 'ZPL-2.0',
|
118
98
|
'ZPL 2.1' => 'ZPL-2.1',
|
119
|
-
'lgplv2' => 'LGPL-2.0',
|
120
|
-
'lgplv2+' => 'LGPL-2.0+',
|
121
|
-
'lgplv2.1' => 'LGPL-2.1',
|
122
99
|
'lgpl_2_1' => 'LGPL-2.1',
|
123
100
|
'lgpl_v2_1' => 'LGPL-2.1',
|
124
|
-
'lgpl v2.1+' => 'LGPL-2.1+',
|
125
|
-
'lgplv3+' => 'LGPL-3.0+',
|
126
|
-
'lgpl 3.0' => 'LGPL-3.0',
|
127
|
-
'lgpl 3' => 'LGPL-3.0',
|
128
|
-
'lgpl3' => 'LGPL-3.0',
|
129
101
|
'lgpl version 3' => 'LGPL-3.0',
|
130
|
-
'agpl3' => 'AGPL-3.0',
|
131
|
-
'agpl-3' => 'AGPL-3.0',
|
132
|
-
'agpl3+' => 'AGPL-3.0+',
|
133
102
|
'cc by-sa 4.0' => 'CC-BY-SA-4.0',
|
134
103
|
'cc by-nc-sa 3.0' => 'CC-BY-NC-SA-3.0',
|
135
104
|
'cc by-sa 3.0' => 'CC-BY-SA-3.0',
|
data/lib/spdx/version.rb
CHANGED
data/spdx.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Spdx::VERSION
|
9
9
|
spec.authors = ["Andrew Nesbitt"]
|
10
10
|
spec.email = ["andrewnez@gmail.com"]
|
11
|
-
spec.summary = %q{A SPDX license
|
11
|
+
spec.summary = %q{A SPDX license normalizer}
|
12
12
|
spec.homepage = "https://github.com/librariesio/spdx"
|
13
13
|
spec.license = "MIT"
|
14
14
|
|
@@ -20,6 +20,6 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.add_dependency "spdx-licenses", "~> 1.0"
|
21
21
|
spec.add_dependency "fuzzy_match", "~> 2.1"
|
22
22
|
spec.add_development_dependency "bundler", "~> 1.10"
|
23
|
-
spec.add_development_dependency "rake", "~>
|
23
|
+
spec.add_development_dependency "rake", "~> 11.1"
|
24
24
|
spec.add_development_dependency "rspec", "~> 3.4.0"
|
25
25
|
end
|
data/spec/spdx_spec.rb
CHANGED
@@ -69,6 +69,21 @@ describe Spdx do
|
|
69
69
|
expect(Spdx.find('GNU LESSER GENERAL PUBLIC LICENSE').name).to eq('GNU Lesser General Public License v2.1 or later')
|
70
70
|
expect(Spdx.find('New BSD License').name).to eq('BSD 3-clause "New" or "Revised" License')
|
71
71
|
expect(Spdx.find('(MIT OR X11) ').name).to eq('MIT License')
|
72
|
+
expect(Spdx.find('mit-license').name).to eq('MIT License')
|
73
|
+
expect(Spdx.find('lgpl-3').name).to eq('GNU Lesser General Public License v3.0 only')
|
74
|
+
expect(Spdx.find('agpl-3').name).to eq('GNU Affero General Public License v3.0')
|
75
|
+
expect(Spdx.find('cc by-sa 4.0').name).to eq('Creative Commons Attribution Share Alike 4.0')
|
76
|
+
expect(Spdx.find('cc by-nc-sa 3.0').name).to eq('Creative Commons Attribution Non Commercial Share Alike 3.0')
|
77
|
+
expect(Spdx.find('cc by-sa 3.0').name).to eq('Creative Commons Attribution Share Alike 3.0')
|
78
|
+
expect(Spdx.find('gpl_1').name).to eq('GNU General Public License v1.0 only')
|
79
|
+
expect(Spdx.find('gpl_2').name).to eq('GNU General Public License v2.0 only')
|
80
|
+
expect(Spdx.find('gpl_3').name).to eq('GNU General Public License v3.0 only')
|
81
|
+
expect(Spdx.find('artistic_2').name).to eq('Artistic License 2.0')
|
82
|
+
expect(Spdx.find('artistic_1').name).to eq('Artistic License 1.0')
|
83
|
+
expect(Spdx.find('apache_2_0').name).to eq('Apache License 2.0')
|
84
|
+
expect(Spdx.find('apache_v2').name).to eq('Apache License 2.0')
|
85
|
+
expect(Spdx.find('lgpl_2_1').name).to eq('GNU Lesser General Public License v2.1 only')
|
86
|
+
expect(Spdx.find('lgpl_v2_1').name).to eq('GNU Lesser General Public License v2.1 only')
|
72
87
|
end
|
73
88
|
end
|
74
89
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spdx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Nesbitt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spdx-licenses
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '11.1'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '11.1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -124,7 +124,7 @@ rubyforge_project:
|
|
124
124
|
rubygems_version: 2.5.1
|
125
125
|
signing_key:
|
126
126
|
specification_version: 4
|
127
|
-
summary: A SPDX license
|
127
|
+
summary: A SPDX license normalizer
|
128
128
|
test_files:
|
129
129
|
- spec/spdx_spec.rb
|
130
130
|
- spec/spec_helper.rb
|