licensee 9.2.1 → 9.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/licensee.rb +1 -0
- data/lib/licensee/license.rb +13 -0
- data/lib/licensee/license_field.rb +48 -0
- data/lib/licensee/matchers/copyright.rb +1 -3
- data/lib/licensee/version.rb +1 -1
- data/spec/licensee/content_helper_spec.rb +2 -2
- data/spec/licensee/license_field_spec.rb +58 -0
- data/spec/licensee/license_spec.rb +32 -2
- data/spec/licensee/matchers/copyright_matcher_spec.rb +1 -1
- data/spec/licensee/matchers/dice_matcher_spec.rb +2 -2
- data/spec/licensee/matchers/exact_matcher_spec.rb +1 -1
- data/spec/licensee/project_files/license_file_spec.rb +7 -7
- data/spec/licensee/project_spec.rb +2 -1
- data/spec/licensee_spec.rb +3 -1
- data/spec/spec_helper.rb +5 -5
- data/spec/vendored_license_spec.rb +2 -1
- data/vendor/choosealicense.com/_licenses/afl-3.0.txt +1 -1
- data/vendor/choosealicense.com/_licenses/agpl-3.0.txt +1 -1
- data/vendor/choosealicense.com/_licenses/apache-2.0.txt +3 -3
- data/vendor/choosealicense.com/_licenses/bsd-2-clause.txt +1 -1
- data/vendor/choosealicense.com/_licenses/bsd-3-clause.txt +1 -1
- data/vendor/choosealicense.com/_licenses/cc0-1.0.txt +2 -2
- data/vendor/choosealicense.com/_licenses/ecl-2.0.txt +3 -3
- data/vendor/choosealicense.com/_licenses/epl-1.0.txt +3 -3
- data/vendor/choosealicense.com/_licenses/eupl-1.1.txt +1 -1
- data/vendor/choosealicense.com/_licenses/gpl-2.0.txt +5 -5
- data/vendor/choosealicense.com/_licenses/gpl-3.0.txt +5 -5
- data/vendor/choosealicense.com/_licenses/isc.txt +1 -1
- data/vendor/choosealicense.com/_licenses/lgpl-2.1.txt +6 -6
- data/vendor/choosealicense.com/_licenses/lgpl-3.0.txt +1 -1
- data/vendor/choosealicense.com/_licenses/mpl-2.0.txt +1 -1
- data/vendor/choosealicense.com/_licenses/ms-pl.txt +1 -1
- data/vendor/choosealicense.com/_licenses/ms-rl.txt +1 -1
- data/vendor/choosealicense.com/_licenses/osl-3.0.txt +2 -2
- data/vendor/choosealicense.com/_licenses/unlicense.txt +2 -2
- metadata +35 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b197d0a8c72ae6b9e0ebf6efb916dd21122bec0
|
4
|
+
data.tar.gz: 52798f462821dcb9df5fbdf3f5915413320231a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8d631034f15606955ecc4280dea23b8a50574bef9a141dd9b50236aa7f1cf03477ef3363091b43980c5c0cdd47d56da9dd3d7d27c10b9cbad69f287ee988c14
|
7
|
+
data.tar.gz: 9983c80e0767ccbf73b32f66156747abe5cd0ae36bcbacfd6f97d2a3fe7001a94f77600f874e75e759b5052f33cbfc393bc836383375f4f078a17ea9f650128b
|
data/lib/licensee.rb
CHANGED
@@ -7,6 +7,7 @@ require 'yaml'
|
|
7
7
|
module Licensee
|
8
8
|
autoload :ContentHelper, 'licensee/content_helper'
|
9
9
|
autoload :License, 'licensee/license'
|
10
|
+
autoload :LicenseField, 'licensee/license_field'
|
10
11
|
autoload :LicenseMeta, 'licensee/license_meta'
|
11
12
|
autoload :LicenseRules, 'licensee/license_rules'
|
12
13
|
autoload :Rule, 'licensee/rule'
|
data/lib/licensee/license.rb
CHANGED
@@ -143,6 +143,19 @@ module Licensee
|
|
143
143
|
"#<Licensee::License key=#{key}>"
|
144
144
|
end
|
145
145
|
|
146
|
+
# Returns an array of strings of substitutable fields in the license body
|
147
|
+
def fields
|
148
|
+
@fields ||= LicenseField.from_content(content)
|
149
|
+
end
|
150
|
+
|
151
|
+
# Returns a string with `[fields]` replaced by `{{{fields}}}`
|
152
|
+
# Does not mangle non-supported fields in the form of `[field]`
|
153
|
+
def content_for_mustache
|
154
|
+
@content_for_mustache ||= begin
|
155
|
+
content.gsub(LicenseField::FIELD_REGEX, '{{{\1}}}')
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
146
159
|
private
|
147
160
|
|
148
161
|
# Raw content of license file, including YAML front matter
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module Licensee
|
2
|
+
class LicenseField < Struct.new(:name, :description)
|
3
|
+
class << self
|
4
|
+
# Return a single license field
|
5
|
+
#
|
6
|
+
# key - string representing the field's text
|
7
|
+
#
|
8
|
+
# Returns a LicenseField
|
9
|
+
def find(key)
|
10
|
+
@all.find { |f| f.key == key }
|
11
|
+
end
|
12
|
+
|
13
|
+
# Returns an array of strings representing all field keys
|
14
|
+
def keys
|
15
|
+
@keys ||= LicenseField.all.map(&:key)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Returns an array of all known LicenseFields
|
19
|
+
def all
|
20
|
+
@all ||= begin
|
21
|
+
path = '../../vendor/choosealicense.com/_data/fields.yml'
|
22
|
+
path = File.expand_path path, __dir__
|
23
|
+
fields = YAML.safe_load File.read(path)
|
24
|
+
fields.map { |field| LicenseField.from_hash(field) }
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
# Builds a LicenseField from a hash of properties
|
29
|
+
def from_hash(hash)
|
30
|
+
ordered_array = hash.values_at(*members.map(&:to_s))
|
31
|
+
new(*ordered_array)
|
32
|
+
end
|
33
|
+
|
34
|
+
# Given an array of keys, returns an array of coresponding LicenseFields
|
35
|
+
def from_array(array)
|
36
|
+
array.map { |key| LicenseField.find(key) }
|
37
|
+
end
|
38
|
+
|
39
|
+
# Given a license body, returns an array of included LicneseFields
|
40
|
+
def from_content(content)
|
41
|
+
LicenseField.from_array content.scan(FIELD_REGEX).flatten
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
alias key name
|
46
|
+
FIELD_REGEX = /\[(#{Regexp.union(LicenseField.keys)})\]/
|
47
|
+
end
|
48
|
+
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
|
3
1
|
module Licensee
|
4
2
|
module Matchers
|
5
3
|
class Copyright < Licensee::Matchers::Matcher
|
@@ -15,7 +13,7 @@ module Licensee
|
|
15
13
|
if @file.content.strip =~ /\A#{REGEX}\z/i
|
16
14
|
Licensee::License.find('no-license')
|
17
15
|
end
|
18
|
-
rescue
|
16
|
+
rescue Encoding::CompatibilityError
|
19
17
|
nil
|
20
18
|
end
|
21
19
|
|
data/lib/licensee/version.rb
CHANGED
@@ -9,7 +9,7 @@ end
|
|
9
9
|
|
10
10
|
RSpec.describe Licensee::ContentHelper do
|
11
11
|
let(:content) do
|
12
|
-
<<-
|
12
|
+
<<-LICENSE.freeze.gsub(/^\s*/, '')
|
13
13
|
# The MIT License
|
14
14
|
=================
|
15
15
|
|
@@ -22,7 +22,7 @@ RSpec.describe Licensee::ContentHelper do
|
|
22
22
|
* * * *
|
23
23
|
up license.
|
24
24
|
-----------
|
25
|
-
|
25
|
+
LICENSE
|
26
26
|
end
|
27
27
|
subject { ContentHelperTestHelper.new(content) }
|
28
28
|
let(:mit) { Licensee::License.find('mit') }
|
@@ -0,0 +1,58 @@
|
|
1
|
+
RSpec.describe Licensee::LicenseField do
|
2
|
+
context 'class' do
|
3
|
+
it 'returns all license fields' do
|
4
|
+
expect(described_class.all.count).to eql(6)
|
5
|
+
expect(described_class.all.first).to be_a(Licensee::LicenseField)
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'returns all license field keys' do
|
9
|
+
expect(described_class.keys.count).to eql(6)
|
10
|
+
expect(described_class.keys.first).to be_a(String)
|
11
|
+
expect(described_class.keys.first).to eql('fullname')
|
12
|
+
end
|
13
|
+
|
14
|
+
context 'from a hash' do
|
15
|
+
let(:hash) { { 'name' => 'foo', 'description' => 'bar' } }
|
16
|
+
|
17
|
+
it 'builds from a hash' do
|
18
|
+
field = described_class.from_hash(hash)
|
19
|
+
expect(field.name).to eql('foo')
|
20
|
+
expect(field.description).to eql('bar')
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'retrieves a specific field' do
|
25
|
+
field = described_class.find('year')
|
26
|
+
expect(field.description).to eql('The current year')
|
27
|
+
end
|
28
|
+
|
29
|
+
context 'from an array' do
|
30
|
+
let(:array) { %w[year fullname] }
|
31
|
+
let(:fields) { described_class.from_array(array) }
|
32
|
+
|
33
|
+
it 'returns an array of LicenseFields' do
|
34
|
+
expect(fields.count).to eql(2)
|
35
|
+
expect(fields.first).to be_a(described_class)
|
36
|
+
expect(fields.first.name).to eql('year')
|
37
|
+
expect(fields.last.name).to eql('fullname')
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context 'from content' do
|
42
|
+
let(:content) { 'Foo [year] bar [baz] [fullname]' }
|
43
|
+
let(:fields) { described_class.from_content(content) }
|
44
|
+
|
45
|
+
it 'pulls fields from content' do
|
46
|
+
expect(fields.count).to eql(2)
|
47
|
+
expect(fields.first.key).to eql('year')
|
48
|
+
expect(fields[1].key).to eql('fullname')
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
it 'stores and exposes values' do
|
54
|
+
field = described_class.new('foo', 'bar')
|
55
|
+
expect(field.name).to eql('foo')
|
56
|
+
expect(field.description).to eql('bar')
|
57
|
+
end
|
58
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
RSpec.describe Licensee::License do
|
2
|
-
let(:license_count) {
|
3
|
-
let(:hidden_license_count) {
|
2
|
+
let(:license_count) { 33 }
|
3
|
+
let(:hidden_license_count) { 21 }
|
4
4
|
let(:featured_license_count) { 3 }
|
5
5
|
let(:pseudo_license_count) { 2 }
|
6
6
|
let(:non_featured_license_count) do
|
@@ -267,4 +267,34 @@ RSpec.describe Licensee::License do
|
|
267
267
|
expect(rule).to_not be_nil
|
268
268
|
expect(rule.description).to include('an express grant of patent rights')
|
269
269
|
end
|
270
|
+
|
271
|
+
context 'fields' do
|
272
|
+
it 'returns the license fields' do
|
273
|
+
expect(mit.fields.count).to eql(2)
|
274
|
+
expect(mit.fields.first.key).to eql('year')
|
275
|
+
expect(mit.fields.last.key).to eql('fullname')
|
276
|
+
expect(gpl.fields).to be_empty
|
277
|
+
end
|
278
|
+
|
279
|
+
context 'muscache' do
|
280
|
+
let(:license) do
|
281
|
+
license = described_class.new 'MIT'
|
282
|
+
content = license.content + '[foo] [bar]'
|
283
|
+
license.instance_variable_set(:@content, content)
|
284
|
+
license
|
285
|
+
end
|
286
|
+
|
287
|
+
it 'returns mustache content' do
|
288
|
+
expect(license.content_for_mustache).to match(/{{{year}}}/)
|
289
|
+
expect(license.content_for_mustache).to match(/{{{fullname}}}/)
|
290
|
+
expect(license.content_for_mustache).to_not match(/\[year\]/)
|
291
|
+
expect(license.content_for_mustache).to_not match(/\[fullname\]/)
|
292
|
+
end
|
293
|
+
|
294
|
+
it "doesn't mangle other fields" do
|
295
|
+
expect(license.content_for_mustache).to match(/\[foo\]/)
|
296
|
+
expect(license.content_for_mustache).to_not match(/{{{foo}}}/)
|
297
|
+
end
|
298
|
+
end
|
299
|
+
end
|
270
300
|
end
|
@@ -39,7 +39,7 @@ RSpec.describe Licensee::Matchers::Copyright do
|
|
39
39
|
end
|
40
40
|
|
41
41
|
context 'with a license with a copyright notice' do
|
42
|
-
let(:content) { sub_copyright_info(mit
|
42
|
+
let(:content) { sub_copyright_info(mit) }
|
43
43
|
|
44
44
|
it "doesn't match" do
|
45
45
|
expect(subject.match).to be_nil
|
@@ -4,7 +4,7 @@ RSpec.describe Licensee::Matchers::Dice do
|
|
4
4
|
let(:agpl) { Licensee::License.find('agpl-3.0') }
|
5
5
|
let(:cc_by) { Licensee::License.find('cc-by-4.0') }
|
6
6
|
let(:cc_by_sa) { Licensee::License.find('cc-by-sa-4.0') }
|
7
|
-
let(:content) { sub_copyright_info(gpl
|
7
|
+
let(:content) { sub_copyright_info(gpl) }
|
8
8
|
let(:file) { Licensee::ProjectFiles::LicenseFile.new(content, 'LICENSE.txt') }
|
9
9
|
subject { described_class.new(file) }
|
10
10
|
|
@@ -46,7 +46,7 @@ RSpec.describe Licensee::Matchers::Dice do
|
|
46
46
|
|
47
47
|
context 'stacked licenses' do
|
48
48
|
let(:content) do
|
49
|
-
sub_copyright_info(mit
|
49
|
+
sub_copyright_info(mit) + "\n\n" + sub_copyright_info(gpl)
|
50
50
|
end
|
51
51
|
|
52
52
|
it "doesn't match" do
|
@@ -1,6 +1,6 @@
|
|
1
1
|
RSpec.describe Licensee::Matchers::Exact do
|
2
2
|
let(:mit) { Licensee::License.find('mit') }
|
3
|
-
let(:content) { sub_copyright_info(mit
|
3
|
+
let(:content) { sub_copyright_info(mit) }
|
4
4
|
let(:file) { Licensee::ProjectFiles::LicenseFile.new(content, 'LICENSE.txt') }
|
5
5
|
subject { described_class.new(file) }
|
6
6
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
RSpec.describe Licensee::ProjectFiles::LicenseFile do
|
2
2
|
let(:filename) { 'LICENSE.txt' }
|
3
3
|
let(:mit) { Licensee::License.find('mit') }
|
4
|
-
let(:content) { sub_copyright_info(mit
|
4
|
+
let(:content) { sub_copyright_info(mit) }
|
5
5
|
|
6
6
|
subject { described_class.new(content, filename) }
|
7
7
|
|
@@ -170,11 +170,11 @@ RSpec.describe Licensee::ProjectFiles::LicenseFile do
|
|
170
170
|
|
171
171
|
context 'CC-BY-ND with leading instructions' do
|
172
172
|
let(:content) do
|
173
|
-
<<-
|
173
|
+
<<-LICENSE
|
174
174
|
Creative Commons Corporation ("Creative Commons") is not a law firm
|
175
175
|
======================================================================
|
176
176
|
Creative Commons Attribution-NonCommercial 4.0
|
177
|
-
|
177
|
+
LICENSE
|
178
178
|
end
|
179
179
|
|
180
180
|
it "knows it's a potential false positive" do
|
@@ -186,7 +186,7 @@ Creative Commons Attribution-NonCommercial 4.0
|
|
186
186
|
|
187
187
|
context 'LGPL' do
|
188
188
|
let(:lgpl) { Licensee::License.find('lgpl-3.0') }
|
189
|
-
let(:content) { sub_copyright_info(lgpl
|
189
|
+
let(:content) { sub_copyright_info(lgpl) }
|
190
190
|
|
191
191
|
context 'with a COPYING.lesser file' do
|
192
192
|
let(:filename) { 'COPYING.lesser' }
|
@@ -196,7 +196,7 @@ Creative Commons Attribution-NonCommercial 4.0
|
|
196
196
|
end
|
197
197
|
|
198
198
|
context 'with non-lgpl content' do
|
199
|
-
let(:content) { sub_copyright_info(mit
|
199
|
+
let(:content) { sub_copyright_info(mit) }
|
200
200
|
|
201
201
|
it 'is not lgpl' do
|
202
202
|
expect(subject).to_not be_lgpl
|
@@ -215,14 +215,14 @@ Creative Commons Attribution-NonCommercial 4.0
|
|
215
215
|
|
216
216
|
context 'GPL' do
|
217
217
|
let(:gpl) { Licensee::License.find('gpl-3.0') }
|
218
|
-
let(:content) { sub_copyright_info(gpl
|
218
|
+
let(:content) { sub_copyright_info(gpl) }
|
219
219
|
|
220
220
|
it 'knows its GPL' do
|
221
221
|
expect(subject).to be_gpl
|
222
222
|
end
|
223
223
|
|
224
224
|
context 'another license' do
|
225
|
-
let(:content) { sub_copyright_info(mit
|
225
|
+
let(:content) { sub_copyright_info(mit) }
|
226
226
|
|
227
227
|
it 'is not GPL' do
|
228
228
|
expect(subject).to_not be_gpl
|
@@ -73,7 +73,8 @@
|
|
73
73
|
|
74
74
|
it 'returns the file list' do
|
75
75
|
expect(files.count).to eql(2)
|
76
|
-
|
76
|
+
license = files.find { |f| f[:name] == 'LICENSE.txt' }
|
77
|
+
expect(license).to_not be_nil
|
77
78
|
|
78
79
|
if described_class == Licensee::Projects::GitProject
|
79
80
|
expect(files.first).to have_key(:oid)
|
data/spec/licensee_spec.rb
CHANGED
@@ -2,10 +2,12 @@ RSpec.describe Licensee do
|
|
2
2
|
let(:project_path) { fixture_path('mit') }
|
3
3
|
let(:license_path) { fixture_path('mit/LICENSE.txt') }
|
4
4
|
let(:mit_license) { Licensee::License.find('mit') }
|
5
|
+
let(:hidden_license_count) { 33 }
|
5
6
|
|
6
7
|
it 'exposes licenses' do
|
7
8
|
expect(described_class.licenses).to be_an(Array)
|
8
|
-
|
9
|
+
hidden_licenses = described_class.licenses(hidden: true).count
|
10
|
+
expect(hidden_licenses).to eql(hidden_license_count)
|
9
11
|
expect(described_class.licenses.first).to be_a(Licensee::License)
|
10
12
|
end
|
11
13
|
|
data/spec/spec_helper.rb
CHANGED
@@ -4,6 +4,7 @@ Coveralls.wear!
|
|
4
4
|
require 'licensee'
|
5
5
|
require 'open3'
|
6
6
|
require 'tmpdir'
|
7
|
+
require 'mustache'
|
7
8
|
|
8
9
|
RSpec.configure do |config|
|
9
10
|
config.shared_context_metadata_behavior = :apply_to_host_groups
|
@@ -29,11 +30,10 @@ def fixture_path(fixture)
|
|
29
30
|
File.expand_path fixture, fixtures_base
|
30
31
|
end
|
31
32
|
|
32
|
-
def sub_copyright_info(
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
text
|
33
|
+
def sub_copyright_info(license)
|
34
|
+
Mustache.render license.content_for_mustache, fullname: 'Ben Balter',
|
35
|
+
year: '2016',
|
36
|
+
email: 'ben@github.invalid'
|
37
37
|
end
|
38
38
|
|
39
39
|
# Add random words to the end of a license to test similarity tollerances
|
@@ -8,9 +8,10 @@ RSpec.describe 'vendored licenses' do
|
|
8
8
|
|
9
9
|
Licensee.licenses(hidden: true).each do |license|
|
10
10
|
next if license.pseudo_license?
|
11
|
+
next if license.key == 'postgresql'
|
11
12
|
|
12
13
|
context "the #{license.name} license" do
|
13
|
-
let(:content_with_copyright) { sub_copyright_info(license
|
14
|
+
let(:content_with_copyright) { sub_copyright_info(license) }
|
14
15
|
let(:content) { content_with_copyright }
|
15
16
|
|
16
17
|
it 'detects the license' do
|
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
title: Academic Free License v3.0
|
3
3
|
spdx-id: AFL-3.0
|
4
|
-
source:
|
4
|
+
source: https://opensource.org/licenses/afl-3.0
|
5
5
|
|
6
6
|
description: The Academic Free License is a variant of the Open Software License that does not require that the source code of derivative works be disclosed. It contains explicit copyright and patent grants and reserves trademark rights in the author.
|
7
7
|
|
@@ -3,7 +3,7 @@ title: GNU Affero General Public License v3.0
|
|
3
3
|
spdx-id: AGPL-3.0
|
4
4
|
nickname: GNU AGPLv3
|
5
5
|
redirect_from: /licenses/agpl/
|
6
|
-
source:
|
6
|
+
source: https://www.gnu.org/licenses/agpl-3.0.txt
|
7
7
|
hidden: false
|
8
8
|
|
9
9
|
description: Permissions of this strongest copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. When a modified version is used to provide a service over a network, the complete source code of the modified version must be made available.
|
@@ -2,7 +2,7 @@
|
|
2
2
|
title: Apache License 2.0
|
3
3
|
spdx-id: Apache-2.0
|
4
4
|
redirect_from: /licenses/apache/
|
5
|
-
source:
|
5
|
+
source: https://www.apache.org/licenses/LICENSE-2.0.html
|
6
6
|
featured: true
|
7
7
|
hidden: false
|
8
8
|
|
@@ -215,7 +215,7 @@ limitations:
|
|
215
215
|
APPENDIX: How to apply the Apache License to your work.
|
216
216
|
|
217
217
|
To apply the Apache License to your work, attach the following
|
218
|
-
boilerplate notice, with the fields enclosed by brackets "
|
218
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
219
219
|
replaced with your own identifying information. (Don't include
|
220
220
|
the brackets!) The text should be enclosed in the appropriate
|
221
221
|
comment syntax for the file format. We also recommend that a
|
@@ -223,7 +223,7 @@ limitations:
|
|
223
223
|
same "printed page" as the copyright notice for easier
|
224
224
|
identification within third-party archives.
|
225
225
|
|
226
|
-
Copyright
|
226
|
+
Copyright [yyyy] [name of copyright owner]
|
227
227
|
|
228
228
|
Licensed under the Apache License, Version 2.0 (the "License");
|
229
229
|
you may not use this file except in compliance with the License.
|
@@ -2,7 +2,7 @@
|
|
2
2
|
title: BSD 2-clause "Simplified" License
|
3
3
|
spdx-id: BSD-2-Clause
|
4
4
|
redirect_from: /licenses/bsd/
|
5
|
-
source:
|
5
|
+
source: https://opensource.org/licenses/BSD-2-Clause
|
6
6
|
hidden: false
|
7
7
|
|
8
8
|
description: A permissive license that comes in two variants, the <a href="/licenses/bsd-2-clause/">BSD 2-Clause</a> and <a href="/licenses/bsd-3-clause/">BSD 3-Clause</a>. Both have very minute differences to the MIT license.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
title: BSD 3-clause "New" or "Revised" License
|
3
3
|
spdx-id: BSD-3-Clause
|
4
|
-
source:
|
4
|
+
source: https://opensource.org/licenses/BSD-3-Clause
|
5
5
|
hidden: false
|
6
6
|
|
7
7
|
description: A permissive license similar to the <a href="/licenses/bsd-2-clause/">BSD 2-Clause License</a>, but with a 3rd clause that prohibits others from using the name of the project or its contributors to promote derived products without written consent.
|
@@ -2,9 +2,9 @@
|
|
2
2
|
title: Creative Commons Zero v1.0 Universal
|
3
3
|
spdx-id: CC0-1.0
|
4
4
|
redirect_from: /licenses/cc0/
|
5
|
-
source:
|
5
|
+
source: https://creativecommons.org/publicdomain/zero/1.0/
|
6
6
|
|
7
|
-
description: The <a href="
|
7
|
+
description: The <a href="https://creativecommons.org/publicdomain/zero/1.0/">Creative Commons CC0 Public Domain Dedication</a> waives copyright interest in any a work you've created and dedicates it to the world-wide public domain. Use CC0 to opt out of copyright entirely and ensure your work has the widest reach. As with the Unlicense and typical software licenses, CC0 disclaims warranties. CC0 is very similar to the Unlicense.
|
8
8
|
|
9
9
|
how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the CC0 into the file.
|
10
10
|
|
@@ -12,7 +12,7 @@ note: The Apereo Foundation recommends taking the additional step of adding a bo
|
|
12
12
|
using:
|
13
13
|
- Sakai: https://github.com/sakaiproject/sakai/blob/master/LICENSE
|
14
14
|
- OAE: https://github.com/oaeproject/Hilary/blob/master/LICENSE
|
15
|
-
- Opencast
|
15
|
+
- Opencast: https://bitbucket.org/opencast-community/opencast/src/905077ba5e6483f8c49869a1fc13bf9268790a79/LICENSE?at=develop
|
16
16
|
|
17
17
|
permissions:
|
18
18
|
- commercial-use
|
@@ -216,14 +216,14 @@ END OF TERMS AND CONDITIONS
|
|
216
216
|
APPENDIX: How to apply the Educational Community License to your work
|
217
217
|
|
218
218
|
To apply the Educational Community License to your work, attach the following
|
219
|
-
boilerplate notice, with the fields enclosed by brackets "
|
219
|
+
boilerplate notice, with the fields enclosed by brackets "[]" replaced with
|
220
220
|
your own identifying information. (Don't include the brackets!) The text
|
221
221
|
should be enclosed in the appropriate comment syntax for the file format. We
|
222
222
|
also recommend that a file or class name and description of purpose be
|
223
223
|
included on the same "printed page" as the copyright notice for easier
|
224
224
|
identification within third-party archives.
|
225
225
|
|
226
|
-
Copyright
|
226
|
+
Copyright [yyyy] [name of copyright owner] Licensed under the Educational
|
227
227
|
Community License, Version 2.0 (the "License"); you may not use this file
|
228
228
|
except in compliance with the License. You may obtain a copy of the License at
|
229
229
|
|
@@ -10,9 +10,9 @@ description: This commercially-friendly copyleft license provides the ability to
|
|
10
10
|
how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file.
|
11
11
|
|
12
12
|
using:
|
13
|
-
-
|
14
|
-
- JUnit: https://github.com/junit-team/
|
15
|
-
- openHAB: https://github.com/openhab/openhab/blob/master/LICENSE
|
13
|
+
- Eclipse Che: https://github.com/eclipse/che/blob/master/LICENSE
|
14
|
+
- JUnit: https://github.com/junit-team/junit4/blob/master/LICENSE-junit.txt
|
15
|
+
- openHAB: https://github.com/openhab/openhab-distro/blob/master/LICENSE
|
16
16
|
|
17
17
|
permissions:
|
18
18
|
- commercial-use
|
@@ -2,7 +2,7 @@
|
|
2
2
|
title: European Union Public License 1.1
|
3
3
|
spdx-id: EUPL-1.1
|
4
4
|
redirect_from: /licenses/eupl-v1.1/
|
5
|
-
source: https://joinup.ec.europa.eu/
|
5
|
+
source: https://joinup.ec.europa.eu/page/eupl-text-11-12
|
6
6
|
|
7
7
|
description: The “European Union Public Licence” (EUPL) is a copyleft free/open source software license created on the initiative of and approved by the European Commission in 22 official languages of the European Union.
|
8
8
|
|
@@ -3,7 +3,7 @@ title: GNU General Public License v2.0
|
|
3
3
|
spdx-id: GPL-2.0
|
4
4
|
nickname: GNU GPLv2
|
5
5
|
redirect_from: /licenses/gpl-v2/
|
6
|
-
source:
|
6
|
+
source: https://www.gnu.org/licenses/gpl-2.0.txt
|
7
7
|
hidden: false
|
8
8
|
|
9
9
|
description: The GNU GPL is the most widely used free software license and has a strong copyleft requirement. When distributing derived works, the source code of the work must be made available under the same license. There are multiple variants of the GNU GPL, each with different requirements.
|
@@ -37,7 +37,7 @@ limitations:
|
|
37
37
|
GNU GENERAL PUBLIC LICENSE
|
38
38
|
Version 2, June 1991
|
39
39
|
|
40
|
-
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
40
|
+
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
41
41
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
42
42
|
Everyone is permitted to copy and distribute verbatim copies
|
43
43
|
of this license document, but changing it is not allowed.
|
@@ -326,8 +326,8 @@ to attach them to the start of each source file to most effectively
|
|
326
326
|
convey the exclusion of warranty; and each file should have at least
|
327
327
|
the "copyright" line and a pointer to where the full notice is found.
|
328
328
|
|
329
|
-
|
330
|
-
Copyright (C)
|
329
|
+
<one line to give the program's name and a brief idea of what it does.>
|
330
|
+
Copyright (C) <year> <name of author>
|
331
331
|
|
332
332
|
This program is free software; you can redistribute it and/or modify
|
333
333
|
it under the terms of the GNU General Public License as published by
|
@@ -365,7 +365,7 @@ necessary. Here is a sample; alter the names:
|
|
365
365
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
366
366
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
367
367
|
|
368
|
-
|
368
|
+
<signature of Ty Coon>, 1 April 1989
|
369
369
|
Ty Coon, President of Vice
|
370
370
|
|
371
371
|
This General Public License does not permit incorporating your program into
|
@@ -3,7 +3,7 @@ title: GNU General Public License v3.0
|
|
3
3
|
spdx-id: GPL-3.0
|
4
4
|
nickname: GNU GPLv3
|
5
5
|
redirect_from: /licenses/gpl-v3/
|
6
|
-
source:
|
6
|
+
source: https://www.gnu.org/licenses/gpl-3.0.txt
|
7
7
|
featured: true
|
8
8
|
hidden: false
|
9
9
|
|
@@ -14,7 +14,7 @@ how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of
|
|
14
14
|
note: The Free Software Foundation recommends taking the additional step of adding a boilerplate notice to the top of each file. The boilerplate can be found at the end of the license.
|
15
15
|
|
16
16
|
using:
|
17
|
-
- Bash:
|
17
|
+
- Bash: https://git.savannah.gnu.org/cgit/bash.git/tree/COPYING
|
18
18
|
- GIMP: https://git.gnome.org/browse/gimp/tree/COPYING
|
19
19
|
- Privacy Badger: https://github.com/EFForg/privacybadgerfirefox/blob/master/LICENSE
|
20
20
|
|
@@ -670,8 +670,8 @@ to attach them to the start of each source file to most effectively
|
|
670
670
|
state the exclusion of warranty; and each file should have at least
|
671
671
|
the "copyright" line and a pointer to where the full notice is found.
|
672
672
|
|
673
|
-
|
674
|
-
Copyright (C)
|
673
|
+
<one line to give the program's name and a brief idea of what it does.>
|
674
|
+
Copyright (C) <year> <name of author>
|
675
675
|
|
676
676
|
This program is free software: you can redistribute it and/or modify
|
677
677
|
it under the terms of the GNU General Public License as published by
|
@@ -691,7 +691,7 @@ Also add information on how to contact you by electronic and paper mail.
|
|
691
691
|
If the program does terminal interaction, make it output a short
|
692
692
|
notice like this when it starts in an interactive mode:
|
693
693
|
|
694
|
-
|
694
|
+
<program> Copyright (C) <year> <name of author>
|
695
695
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
696
696
|
This is free software, and you are welcome to redistribute it
|
697
697
|
under certain conditions; type `show c' for details.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
title: ISC License
|
3
3
|
spdx-id: ISC
|
4
|
-
source:
|
4
|
+
source: https://opensource.org/licenses/isc-license
|
5
5
|
|
6
6
|
description: A permissive license lets people do anything with your code with proper attribution and without warranty. The ISC license is functionally equivalent to the <a href="/licenses/bsd-2-clause/">BSD 2-Clause</a> and <a href="/licenses/mit/">MIT</a> licenses, removing some language that is no longer necessary.
|
7
7
|
|
@@ -3,7 +3,7 @@ title: GNU Lesser General Public License v2.1
|
|
3
3
|
spdx-id: LGPL-2.1
|
4
4
|
nickname: GNU LGPLv2.1
|
5
5
|
redirect_from: /licenses/lgpl-v2.1/
|
6
|
-
source:
|
6
|
+
source: https://www.gnu.org/licenses/lgpl-2.1.txt
|
7
7
|
hidden: false
|
8
8
|
|
9
9
|
description: Primarily used for software libraries, the GNU LGPL requires that derived works be licensed under the same license, but works that only link to it do not fall under this restriction. There are two commonly used versions of the GNU LGPL.
|
@@ -40,9 +40,9 @@ limitations:
|
|
40
40
|
Everyone is permitted to copy and distribute verbatim copies
|
41
41
|
of this license document, but changing it is not allowed.
|
42
42
|
|
43
|
-
|
43
|
+
[This is the first released version of the Lesser GPL. It also counts
|
44
44
|
as the successor of the GNU Library Public License, version 2, hence
|
45
|
-
the version number 2.1.
|
45
|
+
the version number 2.1.]
|
46
46
|
|
47
47
|
Preamble
|
48
48
|
|
@@ -504,8 +504,8 @@ safest to attach them to the start of each source file to most effectively
|
|
504
504
|
convey the exclusion of warranty; and each file should have at least the
|
505
505
|
"copyright" line and a pointer to where the full notice is found.
|
506
506
|
|
507
|
-
|
508
|
-
Copyright (C)
|
507
|
+
<one line to give the library's name and a brief idea of what it does.>
|
508
|
+
Copyright (C) <year> <name of author>
|
509
509
|
|
510
510
|
This library is free software; you can redistribute it and/or
|
511
511
|
modify it under the terms of the GNU Lesser General Public
|
@@ -532,7 +532,7 @@ necessary. Here is a sample; alter the names:
|
|
532
532
|
library `Frob' (a library for tweaking knobs) written by James Random
|
533
533
|
Hacker.
|
534
534
|
|
535
|
-
|
535
|
+
<signature of Ty Coon>, 1 April 1990
|
536
536
|
Ty Coon, President of Vice
|
537
537
|
|
538
538
|
That's all there is to it!
|
@@ -3,7 +3,7 @@ title: GNU Lesser General Public License v3.0
|
|
3
3
|
spdx-id: LGPL-3.0
|
4
4
|
nickname: GNU LGPLv3
|
5
5
|
redirect_from: /licenses/lgpl-v3/
|
6
|
-
source:
|
6
|
+
source: https://www.gnu.org/licenses/lgpl-3.0.txt
|
7
7
|
hidden: false
|
8
8
|
|
9
9
|
description: Permissions of this copyleft license are conditioned on making available complete source code of licensed works and modifications under the same license or the GNU GPLv3. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. However, a larger work using the licensed work through interfaces provided by the licensed work may be distributed under different terms and without source code for the larger work.
|
@@ -13,8 +13,8 @@ note: The Mozilla Foundation recommends taking the additional step of adding a b
|
|
13
13
|
|
14
14
|
using:
|
15
15
|
- Servo: https://github.com/servo/servo/blob/master/LICENSE
|
16
|
+
- Syncthing: https://github.com/syncthing/syncthing/blob/master/LICENSE
|
16
17
|
- TimelineJS3: https://github.com/NUKnightLab/TimelineJS3/blob/master/LICENSE
|
17
|
-
- LibreOffice: https://cgit.freedesktop.org/libreoffice/core/tree/COPYING.MPL
|
18
18
|
|
19
19
|
permissions:
|
20
20
|
- commercial-use
|
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
title: Microsoft Reciprocal License
|
3
3
|
spdx-id: MS-RL
|
4
|
-
source:
|
4
|
+
source: https://opensource.org/licenses/ms-rl
|
5
5
|
|
6
6
|
description: An open source license with a patent grant similar to the <a href="/licenses/ms-pl/">Microsoft Public License</a>, with the additional condition that any source code for any derived file be provided under this license.
|
7
7
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
title: Open Software License 3.0
|
3
3
|
spdx-id: OSL-3.0
|
4
|
-
source:
|
4
|
+
source: https://opensource.org/licenses/OSL-3.0
|
5
5
|
|
6
6
|
description: OSL 3.0 is a copyleft license that does not require reciprocal licensing on linked works. It also provides an express grant of patent rights from contributors to users, with a termination clause triggered if a user files a patent infringement lawsuit.
|
7
7
|
|
@@ -11,7 +11,7 @@ note: OSL 3.0's author has <a href="http://rosenlaw.com/OSL3.0-explained.htm">pr
|
|
11
11
|
|
12
12
|
using:
|
13
13
|
- appserver.io: https://github.com/appserver-io/appserver/blob/master/LICENSE.txt
|
14
|
-
-
|
14
|
+
- JsonMapper: https://github.com/cweiske/jsonmapper/blob/master/LICENSE
|
15
15
|
- Restyaboard: https://github.com/RestyaPlatform/board/blob/master/LICENSE.txt
|
16
16
|
|
17
17
|
permissions:
|
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
title: The Unlicense
|
3
3
|
spdx-id: Unlicense
|
4
|
-
source:
|
4
|
+
source: https://unlicense.org/UNLICENSE
|
5
5
|
hidden: false
|
6
6
|
|
7
7
|
description: A license with no conditions whatsoever which dedicates works to the public domain. Unlicensed works, modifications, and larger works may be distributed under different terms and without source code.
|
@@ -50,4 +50,4 @@ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
50
50
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
51
51
|
OTHER DEALINGS IN THE SOFTWARE.
|
52
52
|
|
53
|
-
For more information, please refer to <
|
53
|
+
For more information, please refer to <http://unlicense.org>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: licensee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.
|
4
|
+
version: 9.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Balter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rugged
|
@@ -25,33 +25,53 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.24'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: coveralls
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.8'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.8'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: mustache
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
39
46
|
- !ruby/object:Gem::Version
|
40
47
|
version: '0.9'
|
48
|
+
- - "<"
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '2.0'
|
51
|
+
type: :development
|
52
|
+
prerelease: false
|
53
|
+
version_requirements: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: '0.9'
|
58
|
+
- - "<"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '2.0'
|
41
61
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
62
|
+
name: pry
|
43
63
|
requirement: !ruby/object:Gem::Requirement
|
44
64
|
requirements:
|
45
65
|
- - "~>"
|
46
66
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
67
|
+
version: '0.9'
|
48
68
|
type: :development
|
49
69
|
prerelease: false
|
50
70
|
version_requirements: !ruby/object:Gem::Requirement
|
51
71
|
requirements:
|
52
72
|
- - "~>"
|
53
73
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
74
|
+
version: '0.9'
|
55
75
|
- !ruby/object:Gem::Dependency
|
56
76
|
name: rake
|
57
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -67,33 +87,33 @@ dependencies:
|
|
67
87
|
- !ruby/object:Gem::Version
|
68
88
|
version: '10.3'
|
69
89
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
90
|
+
name: rspec
|
71
91
|
requirement: !ruby/object:Gem::Requirement
|
72
92
|
requirements:
|
73
93
|
- - "~>"
|
74
94
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
95
|
+
version: '3.5'
|
76
96
|
type: :development
|
77
97
|
prerelease: false
|
78
98
|
version_requirements: !ruby/object:Gem::Requirement
|
79
99
|
requirements:
|
80
100
|
- - "~>"
|
81
101
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
102
|
+
version: '3.5'
|
83
103
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
104
|
+
name: rubocop
|
85
105
|
requirement: !ruby/object:Gem::Requirement
|
86
106
|
requirements:
|
87
107
|
- - "~>"
|
88
108
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0.
|
109
|
+
version: '0.35'
|
90
110
|
type: :development
|
91
111
|
prerelease: false
|
92
112
|
version_requirements: !ruby/object:Gem::Requirement
|
93
113
|
requirements:
|
94
114
|
- - "~>"
|
95
115
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0.
|
116
|
+
version: '0.35'
|
97
117
|
description: |2
|
98
118
|
Licensee automates the process of reading LICENSE files and
|
99
119
|
compares their contents to known licenses using a fancy maths.
|
@@ -108,6 +128,7 @@ files:
|
|
108
128
|
- lib/licensee.rb
|
109
129
|
- lib/licensee/content_helper.rb
|
110
130
|
- lib/licensee/license.rb
|
131
|
+
- lib/licensee/license_field.rb
|
111
132
|
- lib/licensee/license_meta.rb
|
112
133
|
- lib/licensee/license_rules.rb
|
113
134
|
- lib/licensee/matchers.rb
|
@@ -160,6 +181,7 @@ files:
|
|
160
181
|
- spec/fixtures/wrk-modified-apache/LICENSE
|
161
182
|
- spec/integration_spec.rb
|
162
183
|
- spec/licensee/content_helper_spec.rb
|
184
|
+
- spec/licensee/license_field_spec.rb
|
163
185
|
- spec/licensee/license_meta_spec.rb
|
164
186
|
- spec/licensee/license_rules_spec.rb
|
165
187
|
- spec/licensee/license_spec.rb
|