licensee 8.8.5 → 8.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df6cb4b146e1145c45570486db954caccfa552b6
4
- data.tar.gz: bf9255dd2536cc83a1a4f415a557d8e9c3578af3
3
+ metadata.gz: 6f42e79b0d67e4f07903fcd743577d3b1ffc25b7
4
+ data.tar.gz: a526511974c7bb03179d11d556288024359e8653
5
5
  SHA512:
6
- metadata.gz: af41cfdf339dd0b50098f0c28b729ecb3a15f099cc2840c0ae02fdd3f2fdf47f53eaa3a849417e4374604e0167e2fd956c094402a10a368c4eff5b58a198f330
7
- data.tar.gz: 955ff81195f0a39032bb35473e7f0985d5e1449799a04216f6b97178d2f1b7ff0741772978eb2f473e9cdf9551712878a6d0b96674e07421b029ffcc445e9a55
6
+ metadata.gz: a693bc163e0cab6683f954b62533d5fb167d840451ec4e6e26d77b8a3df40eb1cfb66ccdbe3071281aa28de85cd92678f7aa420a26737952989a853c53829b70
7
+ data.tar.gz: e8ee3124e634b40c7974d12aeff99a328230bdb268291f1b37fe84687e71c6302fa8e3f3911a36d78895e05ea595e601a292a49fe2239874951a0825d3e0d1cc
data/README.md ADDED
@@ -0,0 +1 @@
1
+ ./docs/README.md
@@ -5,6 +5,7 @@ module Licensee
5
5
  module ContentHelper
6
6
  DIGEST = Digest::SHA1
7
7
  END_OF_TERMS_REGEX = /^\s*end of terms and conditions\s*$/i
8
+ HR_REGEX = /^\s*[=-]{4,}/
8
9
  ALT_TITLE_REGEX = {
9
10
  'bsd-2-clause' => /bsd 2-clause( \"simplified\")? license/i,
10
11
  'bsd-3-clause' => /bsd 3-clause( \"new\" or \"revised\")? license/i,
@@ -55,6 +56,8 @@ module Licensee
55
56
  def content_without_title_and_version
56
57
  @content_without_title_and_version ||= begin
57
58
  string = content.strip
59
+ string = strip_markdown_headings(string)
60
+ string = strip_hrs(string)
58
61
  string = strip_title(string) while string =~ title_regex
59
62
  strip_version(string).strip
60
63
  end
@@ -68,7 +71,6 @@ module Licensee
68
71
  while string =~ Matchers::Copyright::REGEX
69
72
  string = strip_copyright(string)
70
73
  end
71
- string = strip_hrs(string)
72
74
  string, _partition, _instructions = string.partition(END_OF_TERMS_REGEX)
73
75
  strip_whitespace(string)
74
76
  end
@@ -101,7 +103,12 @@ module Licensee
101
103
 
102
104
  # Strip HRs from MPL
103
105
  def strip_hrs(string)
104
- string.gsub(/[=-]{4,}/, '')
106
+ string.gsub HR_REGEX, ''
107
+ end
108
+
109
+ # Strip leading #s from the document
110
+ def strip_markdown_headings(string)
111
+ string.sub(/\A\s*#+/, '').strip
105
112
  end
106
113
 
107
114
  def strip_whitespace(string)
@@ -63,7 +63,7 @@ module Licensee
63
63
  # `no-license` - The project is not licensed (e.g., all rights reserved)
64
64
  #
65
65
  # Note: A lack of detected license will be a nil license
66
- PSEUDO_LICENSES = %w(other no-license).freeze
66
+ PSEUDO_LICENSES = %w[other no-license].freeze
67
67
 
68
68
  include Licensee::ContentHelper
69
69
 
@@ -1,4 +1,5 @@
1
1
  # encoding: UTF-8
2
+
2
3
  module Licensee
3
4
  module Matchers
4
5
  class Copyright
@@ -3,17 +3,36 @@ module Licensee
3
3
  class Cran < Package
4
4
  attr_reader :file
5
5
 
6
- # While we could parse the package.json or bower.json file, prefer
6
+ # While we could parse the DESCRIPTION file, prefer
7
7
  # a lenient regex for speed and security. Moar parsing moar problems.
8
- LICENSE_REGEX = /
9
- ^license:\s*([a-z\-0-9\.]+)
10
- /ix
8
+ LICENSE_FIELD_REGEX = /^license:\s*(.+)/i
9
+ PLUS_FILE_LICENSE_REGEX = /\s*\+\s*file\s+LICENSE$/i
10
+ GPL_VERSION_REGEX = /^GPL(?:-([23])|\s*\(\s*>=\s*([23])\s*\))$/i
11
11
 
12
12
  private
13
13
 
14
+ # Returns the raw license string from the `license: ` field
15
+ # or `nil` if no license field is found
16
+ def license_field
17
+ return @license_field if defined? @license_field
18
+ match = @file.content.match LICENSE_FIELD_REGEX
19
+ @license_field = match ? match[1].downcase : nil
20
+ end
21
+
22
+ # returns the normalized GPL version, if the license is a GPL license
23
+ # Otherwise, returns `nil`
24
+ def gpl_version(license_key)
25
+ match = license_key.match GPL_VERSION_REGEX
26
+ match ? "gpl-#{(match[1] || match[2])}.0" : nil
27
+ end
28
+
29
+ # Normalizes the license field value to an SPDX ID
30
+ # Rerurns `nil` if no license is found
14
31
  def license_property
15
- match = @file.content.match LICENSE_REGEX
16
- match[1].downcase if match && match[1]
32
+ return unless license_field
33
+ # Remove The common + file LICENSE text
34
+ license_key = license_field.sub(PLUS_FILE_LICENSE_REGEX, '')
35
+ gpl_version(license_key) || license_key
17
36
  end
18
37
  end
19
38
  end
@@ -17,7 +17,9 @@ module Licensee
17
17
  end
18
18
 
19
19
  def matched_file
20
- @matched_file ||= (license_file || readme || package_file)
20
+ @matched_file ||= begin
21
+ [license_file, readme, package_file].compact.find(&:license)
22
+ end
21
23
  end
22
24
 
23
25
  def license_file
@@ -4,7 +4,7 @@ module Licensee
4
4
  include Licensee::ContentHelper
5
5
 
6
6
  # List of extensions to give preference to
7
- PREFERRED_EXT = %w(md markdown txt).freeze
7
+ PREFERRED_EXT = %w[md markdown txt].freeze
8
8
  PREFERRED_EXT_REGEX = /\.#{Regexp.union(PREFERRED_EXT)}\z/
9
9
 
10
10
  # Regex to match any extension
@@ -16,23 +16,29 @@ module Licensee
16
16
  # Regex to match COPYING, COPYRIGHT, etc.
17
17
  COPYING_REGEX = /copy(ing|right)/i
18
18
 
19
+ # Regex to match OFL.
20
+ OFL_REGEX = /ofl/i
21
+
19
22
  # Hash of Regex => score with which to score potential license files
20
23
  FILENAME_REGEXES = {
21
- /\A#{LICENSE_REGEX}\z/ => 1.0, # LICENSE
22
- /\A#{LICENSE_REGEX}#{PREFERRED_EXT_REGEX}\z/ => 0.9, # LICENSE.md
23
- /\A#{COPYING_REGEX}\z/ => 0.8, # COPYING
24
- /\A#{COPYING_REGEX}#{PREFERRED_EXT_REGEX}\z/ => 0.7, # COPYING.md
25
- /\A#{LICENSE_REGEX}#{ANY_EXT_REGEX}\z/ => 0.6, # LICENSE.textile
26
- /\A#{COPYING_REGEX}#{ANY_EXT_REGEX}\z/ => 0.5, # COPYING.textile
27
- /#{LICENSE_REGEX}/ => 0.4, # LICENSE-MIT
28
- /#{COPYING_REGEX}/ => 0.3, # COPYING-MIT
29
- // => 0.0 # Catch all
24
+ /\A#{LICENSE_REGEX}\z/ => 1.0, # LICENSE
25
+ /\A#{LICENSE_REGEX}#{PREFERRED_EXT_REGEX}\z/ => 0.9, # LICENSE.md
26
+ /\A#{COPYING_REGEX}\z/ => 0.8, # COPYING
27
+ /\A#{COPYING_REGEX}#{PREFERRED_EXT_REGEX}\z/ => 0.7, # COPYING.md
28
+ /\A#{LICENSE_REGEX}#{ANY_EXT_REGEX}\z/ => 0.6, # LICENSE.textile
29
+ /\A#{COPYING_REGEX}#{ANY_EXT_REGEX}\z/ => 0.5, # COPYING.textile
30
+ /#{LICENSE_REGEX}/ => 0.4, # LICENSE-MIT
31
+ /#{COPYING_REGEX}/ => 0.3, # COPYING-MIT
32
+ /\A#{OFL_REGEX}#{PREFERRED_EXT_REGEX}/ => 0.2, # OFL.md
33
+ /\A#{OFL_REGEX}#{ANY_EXT_REGEX}/ => 0.1, # OFL.textile
34
+ /\A#{OFL_REGEX}\z/ => 0.05, # OFL
35
+ // => 0.0 # Catch all
30
36
  }.freeze
31
37
 
32
38
  # CC-NC and CC-ND are not open source licenses and should not be
33
39
  # detected as CC-BY or CC-BY-SA which are 98%+ similar
34
40
  CC_FALSE_POSITIVE_REGEX = /
35
- \A(creative\ commons\ )?Attribution-(NonCommercial|NoDerivatives)
41
+ ^(creative\ commons\ )?Attribution-(NonCommercial|NoDerivatives)
36
42
  /xi
37
43
 
38
44
  def possible_matchers
@@ -8,7 +8,7 @@ module Licensee
8
8
  when '.json'
9
9
  [Matchers::NpmBower]
10
10
  else
11
- if filename == 'DESCRIPTION' && content.start_with?('Package:')
11
+ if filename == 'DESCRIPTION' && content.match(/^Package:/)
12
12
  [Matchers::Cran]
13
13
  elsif filename == 'dist.ini'
14
14
  [Matchers::DistZilla]
@@ -1,3 +1,3 @@
1
1
  module Licensee
2
- VERSION = '8.8.5'.freeze
2
+ VERSION = '8.9.0'.freeze
3
3
  end
@@ -0,0 +1,2 @@
1
+ Package: xyz
2
+ License: MIT + file LICENSE
@@ -0,0 +1,2 @@
1
+ YEAR: 2017
2
+ COPYRIGHT HOLDER: Jane Doe
@@ -70,6 +70,17 @@ RSpec.describe 'integration test' do
70
70
  expect(subject.license).to eql(license)
71
71
  end
72
72
  end
73
+
74
+ context 'DESCRIPTION file with a LICENSE file' do
75
+ let(:license) { Licensee::License.find('mit') }
76
+ let(:fixture) { 'description-license' }
77
+ let(:arguments) { { detect_packages: true } }
78
+
79
+ it 'matches' do
80
+ expect(subject.license).to eql(license)
81
+ expect(subject.package_file.path).to eql('DESCRIPTION')
82
+ end
83
+ end
73
84
  end
74
85
 
75
86
  context 'with the license file stubbed' do
@@ -130,7 +141,7 @@ RSpec.describe 'integration test' do
130
141
  end
131
142
 
132
143
  context 'a DESCRIPTION file' do
133
- let(:content) { "Package: test\nLicense: MIT + file LICENSE" }
144
+ let(:content) { "Package: test\nLicense: MIT" }
134
145
  let(:filename) { 'DESCRIPTION' }
135
146
  let(:license) { Licensee::License.find('mit') }
136
147
  let(:arguments) { { detect_packages: true } }
@@ -9,21 +9,22 @@ end
9
9
 
10
10
  RSpec.describe Licensee::ContentHelper do
11
11
  let(:content) do
12
- <<-EOS.freeze
13
- The MIT License
12
+ <<-EOS.freeze.gsub(/^\s*/, '')
13
+ # The MIT License
14
+ =================
14
15
 
15
- Copyright 2016 Ben Balter
16
+ Copyright 2016 Ben Balter
16
17
 
17
- The made
18
- up license.
19
- -----------
18
+ The made
19
+ up license.
20
+ -----------
20
21
  EOS
21
22
  end
22
23
  subject { ContentHelperTestHelper.new(content) }
23
24
  let(:mit) { Licensee::License.find('mit') }
24
25
 
25
26
  it 'creates the wordset' do
26
- expect(subject.wordset).to eql(Set.new(%w(the made up license)))
27
+ expect(subject.wordset).to eql(Set.new(%w[the made up license]))
27
28
  end
28
29
 
29
30
  it 'knows the length' do
@@ -73,6 +74,10 @@ EOS
73
74
  expect(normalized_content).to_not match(/\n/)
74
75
  end
75
76
 
77
+ it 'strips markdown headings' do
78
+ expect(normalized_content).to_not match('#')
79
+ end
80
+
76
81
  Licensee::License.all(hidden: true).each do |license|
77
82
  context license.name do
78
83
  let(:stripped_content) { subject.content_without_title_and_version }
@@ -1,6 +1,6 @@
1
1
  RSpec.describe Licensee::License do
2
- let(:license_count) { 30 }
3
- let(:hidden_license_count) { 18 }
2
+ let(:license_count) { 32 }
3
+ let(:hidden_license_count) { 20 }
4
4
  let(:featured_license_count) { 3 }
5
5
  let(:pseudo_license_count) { 2 }
6
6
  let(:non_featured_license_count) do
@@ -35,7 +35,7 @@ RSpec.describe Licensee::License do
35
35
  end
36
36
 
37
37
  it "doesn't include hidden licenses" do
38
- expect(licenses).to all satisfy { |license| !license.hidden? }
38
+ expect(licenses).to all(satisfy { |license| !license.hidden? })
39
39
  end
40
40
 
41
41
  it 'includes featured licenses' do
@@ -238,5 +238,10 @@ RSpec.describe Licensee::License do
238
238
  rule = cc_by.rules['limitations'].find { |r| r.tag == 'patent-use' }
239
239
  expect(rule).to_not be_nil
240
240
  expect(rule.description).to include('does NOT grant')
241
+
242
+ expect(gpl.rules).to have_key('permissions')
243
+ rule = gpl.rules['permissions'].find { |r| r.tag == 'patent-use' }
244
+ expect(rule).to_not be_nil
245
+ expect(rule.description).to include('an express grant of patent rights')
241
246
  end
242
247
  end
@@ -1,18 +1,39 @@
1
1
  RSpec.describe Licensee::Matchers::Cran do
2
2
  let(:mit) { Licensee::License.find('mit') }
3
- let(:content) { "Package: test\nLicense: MIT + file LICENSE" }
4
- let(:file) { Licensee::Project::LicenseFile.new(content, 'project.gemspec') }
3
+ let(:gpl2) { Licensee::License.find('gpl-2.0') }
4
+ let(:gpl3) { Licensee::License.find('gpl-3.0') }
5
+ let(:content) { "License: MIT + file LICENSE\nPackage: test" }
6
+ let(:file) { Licensee::Project::LicenseFile.new(content, 'DESCRIPTION') }
5
7
  subject { described_class.new(file) }
6
8
 
7
9
  it 'stores the file' do
8
10
  expect(subject.file).to eql(file)
9
11
  end
10
12
 
11
- it 'matches' do
13
+ it 'matches MIT' do
12
14
  expect(subject.match).to eql(mit)
13
15
  end
14
16
 
15
17
  it 'is confident' do
16
18
  expect(subject.confidence).to eql(90)
17
19
  end
20
+
21
+ {
22
+ 'MIT' => Licensee::License.find('mit'),
23
+ 'MIT + file LICENSE' => Licensee::License.find('mit'),
24
+ 'GPL (>=2)' => Licensee::License.find('gpl-2.0'),
25
+ 'GPL( >= 2 )' => Licensee::License.find('gpl-2.0'),
26
+ 'GPL (>=2) + file LICENSE' => Licensee::License.find('gpl-2.0'),
27
+ 'GPL (>=3)' => Licensee::License.find('gpl-3.0'),
28
+ 'GPL-2' => Licensee::License.find('gpl-2.0'),
29
+ 'GPL-3' => Licensee::License.find('gpl-3.0')
30
+ }.each do |license_declaration, license|
31
+ context "with '#{license_declaration}' declaration" do
32
+ let(:content) { "Package: test\nLicense: #{license_declaration}" }
33
+
34
+ it 'matches' do
35
+ expect(subject.match).to eql(license)
36
+ end
37
+ end
38
+ end
18
39
  end
@@ -56,6 +56,10 @@ RSpec.describe Licensee::Project::LicenseFile do
56
56
  'mit-license-foo.md' => 0.4,
57
57
  'COPYING-GPL' => 0.3,
58
58
  'COPYRIGHT-BSD' => 0.3,
59
+ 'OFL.md' => 0.2,
60
+ 'ofl.textile' => 0.1,
61
+ 'ofl' => 0.05,
62
+ 'not-the-ofl' => 0.0,
59
63
  'README.txt' => 0.0
60
64
  }.each do |filename, expected|
61
65
  context "a file named #{filename}" do
@@ -86,7 +90,7 @@ RSpec.describe Licensee::Project::LicenseFile do
86
90
  end
87
91
 
88
92
  context 'preferred license regex' do
89
- %w(md markdown txt).each do |ext|
93
+ %w[md markdown txt].each do |ext|
90
94
  it "matches .#{ext}" do
91
95
  expect(described_class::PREFERRED_EXT_REGEX).to match(".#{ext}")
92
96
  end
@@ -112,7 +116,7 @@ RSpec.describe Licensee::Project::LicenseFile do
112
116
  end
113
117
 
114
118
  context 'license regex' do
115
- %w(LICENSE licence unlicense LICENSE-MIT MIT-LICENSE).each do |license|
119
+ %w[LICENSE licence unlicense LICENSE-MIT MIT-LICENSE].each do |license|
116
120
  it "matches #{license}" do
117
121
  expect(described_class::LICENSE_REGEX).to match(license)
118
122
  end
@@ -120,7 +124,7 @@ RSpec.describe Licensee::Project::LicenseFile do
120
124
  end
121
125
 
122
126
  context 'copying regex' do
123
- %w(COPYING copyright).each do |copying|
127
+ %w[COPYING copyright].each do |copying|
124
128
  it "matches #{copying}" do
125
129
  expect(described_class::COPYING_REGEX).to match(copying)
126
130
  end
@@ -162,5 +166,20 @@ RSpec.describe Licensee::Project::LicenseFile do
162
166
  expect(subject).to be_a_potential_false_positive
163
167
  end
164
168
  end
169
+
170
+ context 'CC-BY-ND with leading instructions' do
171
+ let(:content) do
172
+ <<-EOS
173
+ Creative Commons Corporation ("Creative Commons") is not a law firm
174
+ ======================================================================
175
+ Creative Commons Attribution-NonCommercial 4.0
176
+ EOS
177
+ end
178
+
179
+ it "knows it's a potential false positive" do
180
+ expect(subject.content).to match(regex)
181
+ expect(subject).to be_a_potential_false_positive
182
+ end
183
+ end
165
184
  end
166
185
  end
@@ -1,5 +1,5 @@
1
1
  RSpec.describe Licensee::Rule do
2
- let(:groups) { %w(permissions conditions limitations) }
2
+ let(:groups) { %w[permissions conditions limitations] }
3
3
 
4
4
  it 'stores the properties' do
5
5
  rule = described_class.new(
@@ -41,6 +41,11 @@ RSpec.describe Licensee::Rule do
41
41
  expect(rule).to be_a(described_class)
42
42
  expect(rule.tag).to eql('patent-use')
43
43
  expect(rule.description).to include('does NOT grant')
44
+
45
+ rule = described_class.find_by_tag_and_group('patent-use', 'permissions')
46
+ expect(rule).to be_a(described_class)
47
+ expect(rule.tag).to eql('patent-use')
48
+ expect(rule.description).to include('an express grant of patent rights')
44
49
  end
45
50
 
46
51
  it 'loads all rules' do
@@ -5,7 +5,7 @@ RSpec.describe Licensee do
5
5
 
6
6
  it 'exposes licenses' do
7
7
  expect(described_class.licenses).to be_an(Array)
8
- expect(described_class.licenses(hidden: true).count).to eql(30)
8
+ expect(described_class.licenses(hidden: true).count).to eql(32)
9
9
  expect(described_class.licenses.first).to be_a(Licensee::License)
10
10
  end
11
11
 
data/spec/spec_helper.rb CHANGED
@@ -54,7 +54,7 @@ end
54
54
  # Add random words to the end of a license to test similarity tollerances
55
55
  def add_random_words(string, count = 5)
56
56
  string = string.dup
57
- ipsum = %w(lorem ipsum dolor sit amet consectetur adipiscing elit)
57
+ ipsum = %w[lorem ipsum dolor sit amet consectetur adipiscing elit]
58
58
  count.times do
59
59
  string << " #{ipsum[Random.rand(ipsum.length)]}"
60
60
  end
@@ -5,31 +5,31 @@ permissions:
5
5
  - description: This software may be modified.
6
6
  label: Modification
7
7
  tag: modifications
8
- - description: You may distribute this software.
8
+ - description: This software may be distributed.
9
9
  label: Distribution
10
10
  tag: distribution
11
- - description: You may use and modify the software without distributing it.
11
+ - description: This software may be used and modified in private.
12
12
  label: Private use
13
13
  tag: private-use
14
- - description: This license provides an express grant of patent rights from the contributor to the recipient.
14
+ - description: This license provides an express grant of patent rights from contributors.
15
15
  label: Patent use
16
16
  tag: patent-use
17
17
 
18
18
  conditions:
19
- - description: Include a copy of the license and copyright notice with the software.
19
+ - description: A copy of the license and copyright notice must be included with the software.
20
20
  label: License and copyright notice
21
21
  tag: include-copyright
22
- - description: Indicate changes made to the code.
22
+ - description: Changes made to the code must be documented.
23
23
  label: State changes
24
24
  tag: document-changes
25
- - description: Source code must be made available when distributing the software.
25
+ - description: Source code must be made available when the software is distributed.
26
26
  label: Disclose source
27
27
  tag: disclose-source
28
- - description: Users who interact with the software via network are given the right to receive a copy of the corresponding source code.
28
+ - description: Users who interact with the software via network are given the right to receive a copy of the source code.
29
29
  label: Network use is distribution
30
30
  tag: network-use-disclose
31
31
  - description: Modifications must be released under the same license when distributing the software. In some cases a similar or related license may be used.
32
- label: Same License
32
+ label: Same license
33
33
  tag: same-license
34
34
  - description: Modifications of existing files must be released under the same license when distributing the software. In some cases a similar or related license may be used.
35
35
  label: Same license (file)
@@ -39,13 +39,13 @@ conditions:
39
39
  tag: same-license--library
40
40
 
41
41
  limitations:
42
- - description: This license explicitly states that it does NOT grant you trademark rights, even though licenses without such a statement probably do not grant you any implicit trademark rights.
42
+ - description: This license explicitly states that it does NOT grant trademark rights, even though licenses without such a statement probably do not grant any implicit trademark rights.
43
43
  label: Trademark use
44
44
  tag: trademark-use
45
45
  - description: This license includes a limitation of liability.
46
46
  label: Liability
47
47
  tag: liability
48
- - description: This license explicitly states that it does NOT grant you any rights in the patents of contributors.
48
+ - description: This license explicitly states that it does NOT grant any rights in the patents of contributors.
49
49
  label: Patent use
50
50
  tag: patent-use
51
51
  - description: The license explicitly states that it does NOT provide any warranty.
@@ -0,0 +1,236 @@
1
+ ---
2
+ title: Educational Community License v2.0
3
+ spdx-id: ECL-2.0
4
+ source: https://opensource.org/licenses/ECL-2.0
5
+
6
+ description: The Educational Community License version 2.0 ("ECL") consists of the Apache 2.0 license, modified to change the scope of the patent grant in section 3 to be specific to the needs of the education communities using this license.
7
+
8
+ 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.
9
+
10
+ note: The Apereo Foundation recommends taking the additional step of adding a boilerplate notice to the header of each source file. You can find the notice at the very end of the license in the appendix.
11
+
12
+ using:
13
+ - Sakai: https://github.com/sakaiproject/sakai/blob/master/LICENSE
14
+ - OAE: https://github.com/oaeproject/Hilary/blob/master/LICENSE
15
+ - Opencast Matterhorn: https://bitbucket.org/opencast-community/matterhorn/src/e5b1684a822c0bd9bb07f3e53b4e1f22932da5ef/LICENSE?fileviewer=file-view-default
16
+
17
+ permissions:
18
+ - commercial-use
19
+ - modifications
20
+ - distribution
21
+ - patent-use
22
+ - private-use
23
+
24
+ conditions:
25
+ - include-copyright
26
+ - document-changes
27
+
28
+ limitations:
29
+ - trademark-use
30
+ - liability
31
+ - warranty
32
+
33
+ ---
34
+ Educational Community License
35
+
36
+ Version 2.0, April 2007
37
+
38
+ http://opensource.org/licenses/ECL-2.0
39
+
40
+ The Educational Community License version 2.0 ("ECL") consists of the Apache
41
+ 2.0 license, modified to change the scope of the patent grant in section 3 to
42
+ be specific to the needs of the education communities using this license. The
43
+ original Apache 2.0 license can be found at:
44
+ http://www.apache.org/licenses/LICENSE-2.0
45
+
46
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
47
+
48
+ 1. Definitions.
49
+
50
+ "License" shall mean the terms and conditions for use, reproduction, and
51
+ distribution as defined by Sections 1 through 9 of this document.
52
+
53
+ "Licensor" shall mean the copyright owner or entity authorized by the
54
+ copyright owner that is granting the License.
55
+
56
+ "Legal Entity" shall mean the union of the acting entity and all other
57
+ entities that control, are controlled by, or are under common control with
58
+ that entity. For the purposes of this definition, "control" means (i) the
59
+ power, direct or indirect, to cause the direction or management of such
60
+ entity, whether by contract or otherwise, or (ii) ownership of fifty percent
61
+ (50%) or more of the outstanding shares, or (iii) beneficial ownership of such
62
+ entity.
63
+
64
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
65
+ permissions granted by this License.
66
+
67
+ "Source" form shall mean the preferred form for making modifications,
68
+ including but not limited to software source code, documentation source, and
69
+ configuration files.
70
+
71
+ "Object" form shall mean any form resulting from mechanical transformation or
72
+ translation of a Source form, including but not limited to compiled object
73
+ code, generated documentation, and conversions to other media types.
74
+
75
+ "Work" shall mean the work of authorship, whether in Source or Object form,
76
+ made available under the License, as indicated by a copyright notice that is
77
+ included in or attached to the work (an example is provided in the Appendix
78
+ below).
79
+
80
+ "Derivative Works" shall mean any work, whether in Source or Object form, that
81
+ is based on (or derived from) the Work and for which the editorial revisions,
82
+ annotations, elaborations, or other modifications represent, as a whole, an
83
+ original work of authorship. For the purposes of this License, Derivative
84
+ Works shall not include works that remain separable from, or merely link (or
85
+ bind by name) to the interfaces of, the Work and Derivative Works thereof.
86
+
87
+ "Contribution" shall mean any work of authorship, including the original
88
+ version of the Work and any modifications or additions to that Work or
89
+ Derivative Works thereof, that is intentionally submitted to Licensor for
90
+ inclusion in the Work by the copyright owner or by an individual or Legal
91
+ Entity authorized to submit on behalf of the copyright owner. For the purposes
92
+ of this definition, "submitted" means any form of electronic, verbal, or
93
+ written communication sent to the Licensor or its representatives, including
94
+ but not limited to communication on electronic mailing lists, source code
95
+ control systems, and issue tracking systems that are managed by, or on behalf
96
+ of, the Licensor for the purpose of discussing and improving the Work, but
97
+ excluding communication that is conspicuously marked or otherwise designated
98
+ in writing by the copyright owner as "Not a Contribution."
99
+
100
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
101
+ of whom a Contribution has been received by Licensor and subsequently
102
+ incorporated within the Work.
103
+
104
+ 2. Grant of Copyright License.
105
+
106
+ Subject to the terms and conditions of this License, each Contributor hereby
107
+ grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
108
+ irrevocable copyright license to reproduce, prepare Derivative Works of,
109
+ publicly display, publicly perform, sublicense, and distribute the Work and
110
+ such Derivative Works in Source or Object form.
111
+
112
+ 3. Grant of Patent License.
113
+
114
+ Subject to the terms and conditions of this License, each Contributor hereby
115
+ grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
116
+ irrevocable (except as stated in this section) patent license to make, have
117
+ made, use, offer to sell, sell, import, and otherwise transfer the Work, where
118
+ such license applies only to those patent claims licensable by such
119
+ Contributor that are necessarily infringed by their Contribution(s) alone or
120
+ by combination of their Contribution(s) with the Work to which such
121
+ Contribution(s) was submitted. If You institute patent litigation against any
122
+ entity (including a cross-claim or counterclaim in a lawsuit) alleging that
123
+ the Work or a Contribution incorporated within the Work constitutes direct or
124
+ contributory patent infringement, then any patent licenses granted to You
125
+ under this License for that Work shall terminate as of the date such
126
+ litigation is filed. Any patent license granted hereby with respect to
127
+ contributions by an individual employed by an institution or organization is
128
+ limited to patent claims where the individual that is the author of the Work
129
+ is also the inventor of the patent claims licensed, and where the organization
130
+ or institution has the right to grant such license under applicable grant and
131
+ research funding agreements. No other express or implied licenses are granted.
132
+
133
+ 4. Redistribution.
134
+
135
+ You may reproduce and distribute copies of the Work or Derivative Works
136
+ thereof in any medium, with or without modifications, and in Source or Object
137
+ form, provided that You meet the following conditions:
138
+
139
+ You must give any other recipients of the Work or Derivative Works a copy of
140
+ this License; and You must cause any modified files to carry prominent notices
141
+ stating that You changed the files; and You must retain, in the Source form of
142
+ any Derivative Works that You distribute, all copyright, patent, trademark,
143
+ and attribution notices from the Source form of the Work, excluding those
144
+ notices that do not pertain to any part of the Derivative Works; and If the
145
+ Work includes a "NOTICE" text file as part of its distribution, then any
146
+ Derivative Works that You distribute must include a readable copy of the
147
+ attribution notices contained within such NOTICE file, excluding those notices
148
+ that do not pertain to any part of the Derivative Works, in at least one of
149
+ the following places: within a NOTICE text file distributed as part of the
150
+ Derivative Works; within the Source form or documentation, if provided along
151
+ with the Derivative Works; or, within a display generated by the Derivative
152
+ Works, if and wherever such third-party notices normally appear. The contents
153
+ of the NOTICE file are for informational purposes only and do not modify the
154
+ License. You may add Your own attribution notices within Derivative Works that
155
+ You distribute, alongside or as an addendum to the NOTICE text from the Work,
156
+ provided that such additional attribution notices cannot be construed as
157
+ modifying the License. You may add Your own copyright statement to Your
158
+ modifications and may provide additional or different license terms and
159
+ conditions for use, reproduction, or distribution of Your modifications, or
160
+ for any such Derivative Works as a whole, provided Your use, reproduction, and
161
+ distribution of the Work otherwise complies with the conditions stated in this
162
+ License.
163
+
164
+ 5. Submission of Contributions.
165
+
166
+ Unless You explicitly state otherwise, any Contribution intentionally
167
+ submitted for inclusion in the Work by You to the Licensor shall be under the
168
+ terms and conditions of this License, without any additional terms or
169
+ conditions. Notwithstanding the above, nothing herein shall supersede or
170
+ modify the terms of any separate license agreement you may have executed with
171
+ Licensor regarding such Contributions.
172
+
173
+ 6. Trademarks.
174
+
175
+ This License does not grant permission to use the trade names, trademarks,
176
+ service marks, or product names of the Licensor, except as required for
177
+ reasonable and customary use in describing the origin of the Work and
178
+ reproducing the content of the NOTICE file.
179
+
180
+ 7. Disclaimer of Warranty.
181
+
182
+ Unless required by applicable law or agreed to in writing, Licensor provides
183
+ the Work (and each Contributor provides its Contributions) on an "AS IS"
184
+ BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
185
+ implied, including, without limitation, any warranties or conditions of TITLE,
186
+ NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You
187
+ are solely responsible for determining the appropriateness of using or
188
+ redistributing the Work and assume any risks associated with Your exercise of
189
+ permissions under this License.
190
+
191
+ 8. Limitation of Liability.
192
+
193
+ In no event and under no legal theory, whether in tort (including negligence),
194
+ contract, or otherwise, unless required by applicable law (such as deliberate
195
+ and grossly negligent acts) or agreed to in writing, shall any Contributor be
196
+ liable to You for damages, including any direct, indirect, special,
197
+ incidental, or consequential damages of any character arising as a result of
198
+ this License or out of the use or inability to use the Work (including but not
199
+ limited to damages for loss of goodwill, work stoppage, computer failure or
200
+ malfunction, or any and all other commercial damages or losses), even if such
201
+ Contributor has been advised of the possibility of such damages.
202
+
203
+ 9. Accepting Warranty or Additional Liability.
204
+
205
+ While redistributing the Work or Derivative Works thereof, You may choose to
206
+ offer, and charge a fee for, acceptance of support, warranty, indemnity, or
207
+ other liability obligations and/or rights consistent with this License.
208
+ However, in accepting such obligations, You may act only on Your own behalf
209
+ and on Your sole responsibility, not on behalf of any other Contributor, and
210
+ only if You agree to indemnify, defend, and hold each Contributor harmless for
211
+ any liability incurred by, or claims asserted against, such Contributor by
212
+ reason of your accepting any such warranty or additional liability.
213
+
214
+ END OF TERMS AND CONDITIONS
215
+
216
+ APPENDIX: How to apply the Educational Community License to your work
217
+
218
+ To apply the Educational Community License to your work, attach the following
219
+ boilerplate notice, with the fields enclosed by brackets "{}" replaced with
220
+ your own identifying information. (Don't include the brackets!) The text
221
+ should be enclosed in the appropriate comment syntax for the file format. We
222
+ also recommend that a file or class name and description of purpose be
223
+ included on the same "printed page" as the copyright notice for easier
224
+ identification within third-party archives.
225
+
226
+ Copyright {yyyy} {name of copyright owner} Licensed under the Educational
227
+ Community License, Version 2.0 (the "License"); you may not use this file
228
+ except in compliance with the License. You may obtain a copy of the License at
229
+
230
+ http://opensource.org/licenses/ECL-2.0
231
+
232
+ Unless required by applicable law or agreed to in writing, software
233
+ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
234
+ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
235
+ License for the specific language governing permissions and limitations under
236
+ the License.
@@ -10,7 +10,7 @@ how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of
10
10
  using:
11
11
  - documentation.js: https://github.com/documentationjs/documentation/blob/master/LICENSE
12
12
  - Node.js semver: https://github.com/npm/node-semver/blob/master/LICENSE
13
- - OpenStreetMap iD: https://github.com/openstreetmap/iD/blob/master/LICENSE
13
+ - OpenStreetMap iD: https://github.com/openstreetmap/iD/blob/master/LICENSE.md
14
14
 
15
15
  permissions:
16
16
  - commercial-use
@@ -11,7 +11,7 @@ how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of
11
11
 
12
12
  using:
13
13
  - jQuery: https://github.com/jquery/jquery/blob/master/LICENSE.txt
14
- - .NET Core: https://github.com/dotnet/corefx/blob/master/LICENSE
14
+ - .NET Core: https://github.com/dotnet/corefx/blob/master/LICENSE.TXT
15
15
  - Rails: https://github.com/rails/rails/blob/master/activerecord/MIT-LICENSE
16
16
 
17
17
  permissions:
@@ -0,0 +1,65 @@
1
+ ---
2
+ title: University of Illinois/NCSA Open Source License
3
+ spdx-id: NCSA
4
+ nickname: UIUC/NCSA
5
+ source: https://opensource.org/licenses/NCSA
6
+
7
+ description: The University of Illinois/NCSA Open Source License, or UIUC license, is a permissive free software license, based on the <a href="/licenses/mit/">MIT/X11 license</a> and the <a href="/licenses/bsd-3-clause/">BSD 3-clause License</a>. Its conditions include requiring the preservation of copyright and license notices both in source and in binary distributions and the prohibtion of using the names of the authors or the project organization to promote or endorse derived products.
8
+
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 license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders. Replace [project] with the project organization, if any, that sponsors this work.
10
+
11
+ using:
12
+ - LLDB: https://github.com/llvm-mirror/lldb/blob/master/LICENSE.TXT
13
+ - ROCR-Runtime: https://github.com/RadeonOpenCompute/ROCR-Runtime/blob/master/LICENSE.txt
14
+ - RLTK: https://github.com/chriswailes/RLTK/blob/master/LICENSE
15
+
16
+
17
+ permissions:
18
+ - commercial-use
19
+ - modifications
20
+ - distribution
21
+ - private-use
22
+
23
+ conditions:
24
+ - include-copyright
25
+
26
+ limitations:
27
+ - liability
28
+ - warranty
29
+
30
+ ---
31
+
32
+ University of Illinois/NCSA Open Source License
33
+
34
+ Copyright (c) [year] [fullname]. All rights reserved.
35
+
36
+ Developed by: [fullname]
37
+ [project]
38
+ [project_url]
39
+
40
+ Permission is hereby granted, free of charge, to any person
41
+ obtaining a copy of this software and associated documentation files
42
+ (the "Software"), to deal with the Software without restriction,
43
+ including without limitation the rights to use, copy, modify, merge,
44
+ publish, distribute, sublicense, and/or sell copies of the Software,
45
+ and to permit persons to whom the Software is furnished to do so,
46
+ subject to the following conditions:
47
+
48
+ * Redistributions of source code must retain the above copyright notice,
49
+ this list of conditions and the following disclaimers.
50
+
51
+ * Redistributions in binary form must reproduce the above copyright
52
+ notice, this list of conditions and the following disclaimers in the
53
+ documentation and/or other materials provided with the distribution.
54
+
55
+ * Neither the names of [fullname], [project] nor the names of its
56
+ contributors may be used to endorse or promote products derived from
57
+ this Software without specific prior written permission.
58
+
59
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
60
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
61
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
62
+ CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
63
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
64
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH
65
+ THE SOFTWARE.
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: 8.8.5
4
+ version: 8.9.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-03-20 00:00:00.000000000 Z
11
+ date: 2017-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rugged
@@ -130,6 +130,8 @@ files:
130
130
  - spec/fixtures/case-sensitive/LiCeNsE.TxT
131
131
  - spec/fixtures/cc-by-nc-sa/LICENSE
132
132
  - spec/fixtures/cc-by-nd/LICENSE
133
+ - spec/fixtures/description-license/DESCRIPTION
134
+ - spec/fixtures/description-license/LICENSE
133
135
  - spec/fixtures/gemspec/project._gemspec
134
136
  - spec/fixtures/gpl3-without-instructions/LICENSE
135
137
  - spec/fixtures/lgpl/COPYING.lesser
@@ -173,6 +175,7 @@ files:
173
175
  - vendor/choosealicense.com/_licenses/cc-by-4.0.txt
174
176
  - vendor/choosealicense.com/_licenses/cc-by-sa-4.0.txt
175
177
  - vendor/choosealicense.com/_licenses/cc0-1.0.txt
178
+ - vendor/choosealicense.com/_licenses/ecl-2.0.txt
176
179
  - vendor/choosealicense.com/_licenses/epl-1.0.txt
177
180
  - vendor/choosealicense.com/_licenses/eupl-1.1.txt
178
181
  - vendor/choosealicense.com/_licenses/gpl-2.0.txt
@@ -185,6 +188,7 @@ files:
185
188
  - vendor/choosealicense.com/_licenses/mpl-2.0.txt
186
189
  - vendor/choosealicense.com/_licenses/ms-pl.txt
187
190
  - vendor/choosealicense.com/_licenses/ms-rl.txt
191
+ - vendor/choosealicense.com/_licenses/ncsa.txt
188
192
  - vendor/choosealicense.com/_licenses/ofl-1.1.txt
189
193
  - vendor/choosealicense.com/_licenses/osl-3.0.txt
190
194
  - vendor/choosealicense.com/_licenses/unlicense.txt
@@ -210,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
214
  version: '0'
211
215
  requirements: []
212
216
  rubyforge_project:
213
- rubygems_version: 2.5.2
217
+ rubygems_version: 2.6.11
214
218
  signing_key:
215
219
  specification_version: 4
216
220
  summary: A Ruby Gem to detect open source project licenses
data/README.md DELETED
@@ -1,44 +0,0 @@
1
- # Licensee
2
-
3
- *A Ruby Gem to detect under what license a project is distributed.*
4
-
5
- [![Build Status](https://travis-ci.org/benbalter/licensee.svg?branch=master)](https://travis-ci.org/benbalter/licensee) [![Gem Version](https://badge.fury.io/rb/licensee.svg)](http://badge.fury.io/rb/licensee) [![Coverage Status](https://coveralls.io/repos/github/benbalter/licensee/badge.svg?branch=rspec)](https://coveralls.io/github/benbalter/licensee?branch=rspec)
6
-
7
- ## The problem
8
-
9
- * You've got an open source project. How do you know what you can and can't do with the software?
10
- * You've got a bunch of open source projects, how do you know what their licenses are?
11
- * You've got a project with a license file, but which license is it? Has it been modified?
12
-
13
- ## The solution
14
-
15
- Licensee automates the process of reading `LICENSE` files and compares their contents to known licenses using a several strategies (which we call "Matchers"). It attempts to determine a project's license in the following order:
16
-
17
- * If the license file has an explicit copyright notice, and nothing more (e.g., `Copyright (c) 2015 Ben Balter`), we'll assume the author intends to retain all rights, and thus the project isn't licensed.
18
- * If the license is an exact match to a known license. If we strip away whitespace and copyright notice, we might get lucky, and direct string comparison in Ruby is cheap.
19
- * If we still can't match the license, we use a fancy math thing called the [Sørensen–Dice coefficient](https://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient), which is really good at calculating the similarity between two strings. By calculating the percent changed from the known license to the license file, you can tell, e.g., that a given license is 95% similar to the MIT license, that 5% likely representing legally insignificant changes to the license text.
20
-
21
- *Special thanks to [@vmg](https://github.com/vmg) for his Git and algorithmic prowess.*
22
-
23
- ## Installation
24
-
25
- [`gem`](https://rubygems.org/pages/download)` install licensee` or add `gem 'licensee'` to your project's `Gemfile`.
26
-
27
- ## Documentation
28
-
29
- See [the docs folder](/docs) for more information. You may be interested in:
30
-
31
- * [Instructions for using Licensee](docs/usage.md)
32
- * [Customizing Licensee's behavior](docs/customizing.md)
33
- * [Contributing to Licensee](CONTRIBUTING.md) (and development instructions)
34
- * More information about [what Licensee looks at](docs/what-we-look-at.md) (or doesn't, and why)
35
-
36
- ## Semantic Versioning
37
-
38
- This project conforms to [semver](http://semver.org/). As a result of this policy, you can (and should) specify a dependency on this gem using the [Pessimistic Version Constraint](http://guides.rubygems.org/patterns/) with two digits of precision. For example:
39
-
40
- spec.add_dependency 'licensee', '~> 1.0'
41
-
42
- This means your project is compatible with licensee 1.0 up until 2.0. You can also set a higher minimum version:
43
-
44
- spec.add_dependency 'licensee', '~> 1.1'