licensee 9.14.0 → 9.14.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/lib/licensee/commands/detect.rb +1 -1
  3. data/lib/licensee/commands/diff.rb +2 -2
  4. data/lib/licensee/content_helper.rb +17 -10
  5. data/lib/licensee/license.rb +1 -1
  6. data/lib/licensee/matchers/cabal.rb +1 -1
  7. data/lib/licensee/matchers/cargo.rb +1 -1
  8. data/lib/licensee/matchers/copyright.rb +1 -1
  9. data/lib/licensee/matchers/dist_zilla.rb +1 -1
  10. data/lib/licensee/matchers/gemspec.rb +4 -4
  11. data/lib/licensee/matchers/npm_bower.rb +5 -2
  12. data/lib/licensee/matchers/nuget.rb +6 -6
  13. data/lib/licensee/matchers/spdx.rb +1 -1
  14. data/lib/licensee/project_files/license_file.rb +3 -3
  15. data/lib/licensee/project_files/project_file.rb +1 -0
  16. data/lib/licensee/projects/github_project.rb +1 -1
  17. data/lib/licensee/version.rb +1 -1
  18. data/licensee.gemspec +1 -1
  19. data/spec/fixtures/bom/LICENSE.txt +21 -0
  20. data/spec/fixtures/crlf-bsd/LICENSE.md +27 -0
  21. data/spec/fixtures/detect.json +12 -18
  22. data/spec/fixtures/fixtures.yml +20 -4
  23. data/spec/fixtures/license-hashes.json +1 -1
  24. data/spec/fixtures/markdown-artistic/LICENSE.md +192 -0
  25. data/spec/fixtures/vim/LICENSE +78 -0
  26. data/spec/integration_spec.rb +39 -2
  27. data/spec/licensee/content_helper_spec.rb +2 -0
  28. data/spec/licensee/hash_helper_spec.rb +22 -22
  29. data/spec/licensee/license_meta_spec.rb +5 -11
  30. data/spec/licensee/license_spec.rb +9 -5
  31. data/spec/licensee/matchers/dice_matcher_spec.rb +1 -1
  32. data/spec/licensee/matchers/matcher_spec.rb +6 -6
  33. data/spec/licensee/matchers/npm_bower_matcher_spec.rb +9 -0
  34. data/spec/licensee/project_files/license_file_spec.rb +27 -26
  35. data/spec/licensee/rule_spec.rb +1 -1
  36. data/vendor/choosealicense.com/_data/meta.yml +1 -1
  37. data/vendor/choosealicense.com/_data/rules.yml +13 -13
  38. data/vendor/choosealicense.com/_licenses/0bsd.txt +3 -3
  39. data/vendor/choosealicense.com/_licenses/apache-2.0.txt +3 -3
  40. data/vendor/choosealicense.com/_licenses/bsd-2-clause.txt +3 -3
  41. data/vendor/choosealicense.com/_licenses/bsd-3-clause.txt +3 -3
  42. data/vendor/choosealicense.com/_licenses/bsd-4-clause.txt +3 -3
  43. data/vendor/choosealicense.com/_licenses/bsl-1.0.txt +3 -3
  44. data/vendor/choosealicense.com/_licenses/cc-by-4.0.txt +3 -3
  45. data/vendor/choosealicense.com/_licenses/cc-by-sa-4.0.txt +3 -3
  46. data/vendor/choosealicense.com/_licenses/cc0-1.0.txt +3 -3
  47. data/vendor/choosealicense.com/_licenses/cecill-2.1.txt +3 -3
  48. data/vendor/choosealicense.com/_licenses/ecl-2.0.txt +3 -3
  49. data/vendor/choosealicense.com/_licenses/epl-1.0.txt +3 -3
  50. data/vendor/choosealicense.com/_licenses/epl-2.0.txt +3 -3
  51. data/vendor/choosealicense.com/_licenses/eupl-1.2.txt +3 -3
  52. data/vendor/choosealicense.com/_licenses/gpl-2.0.txt +3 -3
  53. data/vendor/choosealicense.com/_licenses/gpl-3.0.txt +3 -3
  54. data/vendor/choosealicense.com/_licenses/isc.txt +3 -3
  55. data/vendor/choosealicense.com/_licenses/mit.txt +3 -3
  56. data/vendor/choosealicense.com/_licenses/mpl-2.0.txt +3 -3
  57. data/vendor/choosealicense.com/_licenses/ncsa.txt +3 -3
  58. data/vendor/choosealicense.com/_licenses/odbl-1.0.txt +3 -3
  59. data/vendor/choosealicense.com/_licenses/ofl-1.1.txt +3 -3
  60. data/vendor/choosealicense.com/_licenses/osl-3.0.txt +3 -3
  61. data/vendor/choosealicense.com/_licenses/postgresql.txt +3 -3
  62. data/vendor/choosealicense.com/_licenses/unlicense.txt +3 -3
  63. data/vendor/choosealicense.com/_licenses/upl-1.0.txt +3 -3
  64. data/vendor/choosealicense.com/_licenses/vim.txt +3 -3
  65. data/vendor/choosealicense.com/_licenses/zlib.txt +3 -3
  66. metadata +18 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37e4eac01861b05d0484cc0e81e7c6865386004e2529c2c74e3be8d9e350c14b
4
- data.tar.gz: c506aa44124763dd74b0fa5771fe0c0f750e43a39020dc90d03a716f97861633
3
+ metadata.gz: 0cdac44039e6185c028d41ab8112b43d7e1ba66f2c8bd02be490255d14dfac38
4
+ data.tar.gz: 895ffc0aa9296fef49193b6282edb6286a9115ba4b3207be4c15df5755ca3bf7
5
5
  SHA512:
6
- metadata.gz: df862cae20c0deeaf1caa8c74456603aa91aae1d180103c415885343a0af3ccd6b4bd6d683c1af351b038e50225488d86e83ad031bb061ebf381da38b9ac1537
7
- data.tar.gz: be9e4697ce9f1ca2f410cc7bcb3ef952435f75470d8f69e1236a2aa66f6104a4f6446c185f50117278f2a2c06e455bb68aa5436a9af494a761eb852030c2aa04
6
+ metadata.gz: eb7c6c9d1b2a8c8258b8d499efa96ab7b25b83108bb47ed163eabd5d78e83a2443a0bbf6f43eb1abda0b441e8696a17f79066ec4356c80a1b88d3c40338c726b
7
+ data.tar.gz: e1bfeb5c75d28b334d880351acf7977c71e5efa9b61c407c204921475070c3ede8b2331b82cc64446fa81577ede499cf8d2d5b6d70ae1fc507cc238ee4a52a08
@@ -88,7 +88,7 @@ class LicenseeCLI < Thor
88
88
  when :confidence
89
89
  Licensee::ContentHelper.format_percent(value)
90
90
  when :method
91
- value.to_s.tr('_', ' ').capitalize + ':'
91
+ "#{value.to_s.tr('_', ' ').capitalize}:"
92
92
  else
93
93
  value
94
94
  end
@@ -41,10 +41,10 @@ class LicenseeCLI < Thor
41
41
 
42
42
  def license_to_diff
43
43
  return options[:license_to_diff] if options[:license_to_diff]
44
- return project.license_file if remote? || STDIN.tty? && project.license_file
44
+ return project.license_file if remote? || $stdin.tty? && project.license_file
45
45
 
46
46
  @license_to_diff ||= begin
47
- Licensee::ProjectFiles::LicenseFile.new(STDIN.read, 'LICENSE')
47
+ Licensee::ProjectFiles::LicenseFile.new($stdin.read, 'LICENSE')
48
48
  end
49
49
  end
50
50
 
@@ -9,18 +9,19 @@ module Licensee
9
9
  START_REGEX = /\A\s*/.freeze
10
10
  END_OF_TERMS_REGEX = /^[\s#*_]*end of terms and conditions[\s#*_]*$/i.freeze
11
11
  REGEXES = {
12
- hrs: /^\s*[=\-\*]{3,}\s*$/,
12
+ bom: /#{START_REGEX}\xEF\xBB\xBF/,
13
+ hrs: /^\s*[=\-*]{3,}\s*$/,
13
14
  all_rights_reserved: /#{START_REGEX}all rights reserved\.?$/i,
14
15
  whitespace: /\s+/,
15
- markdown_headings: /#{START_REGEX}#+/,
16
+ markdown_headings: /^\s*#+/,
16
17
  version: /#{START_REGEX}version.*$/i,
17
18
  span_markup: /[_*~]+(.*?)[_*~]+/,
18
19
  link_markup: /\[(.+?)\]\(.+?\)/,
19
20
  block_markup: /^\s*>/,
20
- border_markup: /^[\*-](.*?)[\*-]$/,
21
- comment_markup: %r{^\s*?[/\*]{1,2}},
21
+ border_markup: /^[*-](.*?)[*-]$/,
22
+ comment_markup: %r{^\s*?[/*]{1,2}},
22
23
  url: %r{#{START_REGEX}https?://[^ ]+\n},
23
- bullet: /\n\n\s*(?:[*-]|\(?[\da-z]{1,2}[)\.])\s+/i,
24
+ bullet: /\n\n\s*(?:[*-]|\(?[\da-z]{1,2}[).])\s+/i,
24
25
  developed_by: /#{START_REGEX}developed by:.*?\n\n/im,
25
26
  quote_begin: /[`'"‘“]/,
26
27
  quote_end: /[`'"’”]/,
@@ -88,6 +89,7 @@ module Licensee
88
89
  'owner' => 'holder'
89
90
  }.freeze
90
91
  STRIP_METHODS = %i[
92
+ bom
91
93
  cc0_optional
92
94
  unlicense_optional
93
95
  hrs
@@ -99,7 +101,6 @@ module Licensee
99
101
  copyright
100
102
  title
101
103
  block_markup
102
- span_markup
103
104
  link_markup
104
105
  developed_by
105
106
  end_of_terms
@@ -109,7 +110,7 @@ module Licensee
109
110
 
110
111
  # A set of each word in the license, without duplicates
111
112
  def wordset
112
- @wordset ||= content_normalized&.scan(%r{(?:[\w\/](?:'s|(?<=s)')?)+})&.to_set
113
+ @wordset ||= content_normalized&.scan(%r{(?:[\w/](?:'s|(?<=s)')?)+})&.to_set
113
114
  end
114
115
 
115
116
  # Number of characters in the normalized content
@@ -132,7 +133,7 @@ module Licensee
132
133
  overlap = (wordset_fieldless & other.wordset).size
133
134
  total = wordset_fieldless.size + other.wordset.size -
134
135
  fields_normalized_set.size
135
- (overlap * 200.0) / (total + length_delta(other) / 10)
136
+ (overlap * 200.0) / (total + fields_adjusted_length_delta(other) / 10)
136
137
  end
137
138
 
138
139
  # SHA1 of the normalized content
@@ -157,7 +158,7 @@ module Licensee
157
158
  @content_normalized ||= begin
158
159
  @_content = content_without_title_and_version.downcase
159
160
 
160
- (NORMALIZATIONS.keys + %i[spelling bullets]).each { |op| normalize(op) }
161
+ (NORMALIZATIONS.keys + %i[spelling span_markup bullets]).each { |op| normalize(op) }
161
162
  STRIP_METHODS.each { |op| strip(op) }
162
163
 
163
164
  _content
@@ -284,7 +285,7 @@ module Licensee
284
285
  @_content = body
285
286
  end
286
287
 
287
- def strip_span_markup
288
+ def normalize_span_markup
288
289
  normalize(REGEXES[:span_markup], '\1')
289
290
  end
290
291
 
@@ -335,5 +336,11 @@ module Licensee
335
336
  def fields_normalized_set
336
337
  @fields_normalized_set ||= fields_normalized.to_set
337
338
  end
339
+
340
+ def fields_adjusted_length_delta(other)
341
+ delta = length_delta(other)
342
+ adjusted_delta = delta - fields_normalized.size * 2
343
+ adjusted_delta.positive? ? adjusted_delta : delta
344
+ end
338
345
  end
339
346
  end
@@ -93,7 +93,7 @@ module Licensee
93
93
  }.freeze
94
94
 
95
95
  SOURCE_PREFIX = %r{https?://(?:www\.)?}i.freeze
96
- SOURCE_SUFFIX = %r{(?:\.html?|\.txt|\/)(?:\?[^\s]*)?}i.freeze
96
+ SOURCE_SUFFIX = %r{(?:\.html?|\.txt|/)(?:\?[^\s]*)?}i.freeze
97
97
 
98
98
  HASH_METHODS = %i[
99
99
  key spdx_id meta url rules fields other? gpl? lgpl? cc?
@@ -5,7 +5,7 @@ module Licensee
5
5
  class Cabal < Licensee::Matchers::Package
6
6
  # While we could parse the cabal file, prefer
7
7
  # a lenient regex for speed and security. Moar parsing moar problems.
8
- LICENSE_REGEX = /^\s*license\s*\:\s*([a-z\-0-9\.]+)\s*$/ix.freeze
8
+ LICENSE_REGEX = /^\s*license\s*:\s*([a-z\-0-9.]+)\s*$/ix.freeze
9
9
  LICENSE_CONVERSIONS = {
10
10
  'GPL-2' => 'GPL-2.0',
11
11
  'GPL-3' => 'GPL-3.0',
@@ -4,7 +4,7 @@ module Licensee
4
4
  module Matchers
5
5
  class Cargo < Licensee::Matchers::Package
6
6
  LICENSE_REGEX = %r{
7
- ^\s*[\'\"]?license[\'\"]?\s*=\s*[\'\"]([a-z\-0-9\. +()\/]+)[\'\"]\s*
7
+ ^\s*['"]?license['"]?\s*=\s*['"]([a-z\-0-9. +()/]+)['"]\s*
8
8
  }ix.freeze
9
9
 
10
10
  private
@@ -7,7 +7,7 @@ module Licensee
7
7
 
8
8
  # rubocop:disable Layout/LineLength
9
9
  COPYRIGHT_SYMBOLS = Regexp.union([/copyright/i, /\(c\)/i, "\u00A9", "\xC2\xA9"])
10
- REGEX = /#{ContentHelper::START_REGEX}(?:portions )?(\s*#{COPYRIGHT_SYMBOLS}.*$)+$/i.freeze
10
+ REGEX = /#{ContentHelper::START_REGEX}(?:portions )?([_*\-\s]*#{COPYRIGHT_SYMBOLS}.*$)+$/i.freeze
11
11
  # rubocop:enable Layout/LineLength
12
12
 
13
13
  def match
@@ -5,7 +5,7 @@ module Licensee
5
5
  class DistZilla < Licensee::Matchers::Package
6
6
  attr_reader :file
7
7
 
8
- LICENSE_REGEX = /^license\s*=\s*([a-z\-0-9\._]+)/i.freeze
8
+ LICENSE_REGEX = /^license\s*=\s*([a-z\-0-9._]+)/i.freeze
9
9
 
10
10
  private
11
11
 
@@ -5,7 +5,7 @@ module Licensee
5
5
  class Gemspec < Licensee::Matchers::Package
6
6
  # a value is a string surrounded by any amount of whitespace
7
7
  # optionally ended with (non-captured) ".freeze"
8
- VALUE_REGEX = /\s*[\'\"]([a-z\-0-9\.]+)[\'\"](?:\.freeze)?\s*/i.freeze
8
+ VALUE_REGEX = /\s*['"]([a-z\-0-9.]+)['"](?:\.freeze)?\s*/i.freeze
9
9
 
10
10
  # an array contains one or more values. all values, or array itself,
11
11
  # can be surrounded by any amount of whitespace. do not capture
@@ -13,15 +13,15 @@ module Licensee
13
13
  ARRAY_REGEX = /\s*\[#{VALUE_REGEX}(?:,#{VALUE_REGEX})*\]\s*/i.freeze
14
14
 
15
15
  DECLARATION_REGEX = /
16
- ^\s*[a-z0-9_]+\.([a-z0-9_]+)\s*\=#{VALUE_REGEX}$
16
+ ^\s*[a-z0-9_]+\.([a-z0-9_]+)\s*=#{VALUE_REGEX}$
17
17
  /ix.freeze
18
18
 
19
19
  LICENSE_REGEX = /
20
- ^\s*[a-z0-9_]+\.license\s*\=#{VALUE_REGEX}$
20
+ ^\s*[a-z0-9_]+\.license\s*=#{VALUE_REGEX}$
21
21
  /ix.freeze
22
22
 
23
23
  LICENSE_ARRAY_REGEX = /
24
- ^\s*[a-z0-9_]+\.licenses\s*\=#{ARRAY_REGEX}$
24
+ ^\s*[a-z0-9_]+\.licenses\s*=#{ARRAY_REGEX}$
25
25
  /ix.freeze
26
26
 
27
27
  private
@@ -6,14 +6,17 @@ module Licensee
6
6
  # While we could parse the package.json or bower.json file, prefer
7
7
  # a lenient regex for speed and security. Moar parsing moar problems.
8
8
  LICENSE_REGEX = /
9
- \s*[\"\']license[\"\']\s*\:\s*[\'\"]([a-z\-0-9\.+ ()]+)[\'\"],?\s*
9
+ \s*["']license["']\s*:\s*['"]([a-z\-0-9.+ ()]+)['"],?\s*
10
10
  /ix.freeze
11
11
 
12
12
  private
13
13
 
14
14
  def license_property
15
15
  match = @file.content.match LICENSE_REGEX
16
- match[1].downcase if match && match[1]
16
+ return unless match && match[1]
17
+ return 'no-license' if match[1] == 'UNLICENSED'
18
+
19
+ match[1].downcase
17
20
  end
18
21
  end
19
22
  end
@@ -6,15 +6,15 @@ module Licensee
6
6
  # While we could parse the nuspec file, prefer a lenient regex for speed and security.
7
7
  # Moar parsing moar problems.
8
8
  LICENSE_REGEX = %r{
9
- <license\s*type\s*=\s*["']expression["']\s*>([a-z\-0-9\. +()]+)<\/license\s*>
9
+ <license\s*type\s*=\s*["']expression["']\s*>([a-z\-0-9. +()]+)</license\s*>
10
10
  }ix.freeze
11
11
 
12
- LICENSE_URL_REGEX = %r{<licenseUrl>\s*(.*)\s*<\/licenseUrl>}i.freeze
12
+ LICENSE_URL_REGEX = %r{<licenseUrl>\s*(.*)\s*</licenseUrl>}i.freeze
13
13
 
14
- NUGET_REGEX = %r{https?:\/\/licenses.nuget.org\/(.*)}i.freeze
15
- OPENSOURCE_REGEX = %r{https?:\/\/(?:www\.)?opensource.org\/licenses\/(.*)}i.freeze
16
- SPDX_REGEX = %r{https?:\/\/(?:www\.)?spdx.org\/licenses\/(.*?)(?:\.html|\.txt)?$}i.freeze
17
- APACHE_REGEX = %r{https?:\/\/(?:www\.)?apache.org\/licenses\/(.*?)(?:\.html|\.txt)?$}i.freeze
14
+ NUGET_REGEX = %r{https?://licenses.nuget.org/(.*)}i.freeze
15
+ OPENSOURCE_REGEX = %r{https?://(?:www\.)?opensource.org/licenses/(.*)}i.freeze
16
+ SPDX_REGEX = %r{https?://(?:www\.)?spdx.org/licenses/(.*?)(?:\.html|\.txt)?$}i.freeze
17
+ APACHE_REGEX = %r{https?://(?:www\.)?apache.org/licenses/(.*?)(?:\.html|\.txt)?$}i.freeze
18
18
 
19
19
  private
20
20
 
@@ -5,7 +5,7 @@ module Licensee
5
5
  class Spdx < Licensee::Matchers::Package
6
6
  # While we could parse the LICENSE.spdx file, prefer
7
7
  # a lenient regex for speed and security. Moar parsing moar problems.
8
- LICENSE_REGEX = /PackageLicenseDeclared:\s*([a-z\-0-9\. +()]+)\s*/i.freeze
8
+ LICENSE_REGEX = /PackageLicenseDeclared:\s*([a-z\-0-9. +()]+)\s*/i.freeze
9
9
 
10
10
  private
11
11
 
@@ -34,8 +34,8 @@ module Licensee
34
34
  /\A#{COPYING_REGEX}#{OTHER_EXT_REGEX}\z/ => 0.75, # COPYING.textile
35
35
  /\A#{LICENSE_REGEX}[-_]/ => 0.70, # LICENSE-MIT
36
36
  /\A#{COPYING_REGEX}[-_]/ => 0.65, # COPYING-MIT
37
- /[-_]#{LICENSE_REGEX}/ => 0.60, # MIT-LICENSE-MIT
38
- /[-_]#{COPYING_REGEX}/ => 0.55, # MIT-COPYING
37
+ /\A\w+[-_]#{LICENSE_REGEX}/ => 0.60, # MIT-LICENSE-MIT
38
+ /\A\w+[-_]#{COPYING_REGEX}/ => 0.55, # MIT-COPYING
39
39
  /\A#{OFL_REGEX}#{PREFERRED_EXT_REGEX}/ => 0.50, # OFL.md
40
40
  /\A#{OFL_REGEX}#{OTHER_EXT_REGEX}/ => 0.45, # OFL.textile
41
41
  /\A#{OFL_REGEX}\z/ => 0.40, # OFL
@@ -56,7 +56,7 @@ module Licensee
56
56
 
57
57
  def attribution
58
58
  @attribution ||= begin
59
- return unless copyright? || license.content =~ /\[fullname\]/
59
+ return unless copyright? || license.content&.include?('[fullname]')
60
60
 
61
61
  matches = Matchers::Copyright::REGEX
62
62
  .match(content_without_title_and_version)
@@ -40,6 +40,7 @@ module Licensee
40
40
  unless @content.valid_encoding?
41
41
  @content.encode!(ENCODING, **ENCODING_OPTIONS)
42
42
  end
43
+ @content.encode!(ENCODING, universal_newline: true)
43
44
 
44
45
  metadata = { name: metadata } if metadata.is_a? String
45
46
  @data = metadata || {}
@@ -15,7 +15,7 @@ module Licensee
15
15
  # If there's any trailing data (e.g. `.git`) this pattern will ignore it:
16
16
  # we're going to use the API rather than clone the repo.
17
17
  GITHUB_REPO_PATTERN =
18
- %r{https://github.com/([^\/]+\/([^\/]+(?=\.git)|[^\/]+)).*}.freeze
18
+ %r{https://github.com/([^/]+/([^/]+(?=\.git)|[^/]+)).*}.freeze
19
19
 
20
20
  class RepoNotFound < StandardError; end
21
21
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Licensee
4
- VERSION = '9.14.0'
4
+ VERSION = '9.14.1'
5
5
  end
@@ -23,7 +23,7 @@ Gem::Specification.new do |gem|
23
23
  gem.add_dependency('dotenv', '~> 2.0')
24
24
  gem.add_dependency('octokit', '~> 4.17')
25
25
  gem.add_dependency('reverse_markdown', '~> 1.0')
26
- gem.add_dependency('rugged', '~> 0.24')
26
+ gem.add_dependency('rugged', '>= 0.24', '<2.0')
27
27
  gem.add_dependency('thor', '>= 0.19', '< 2.0')
28
28
 
29
29
  gem.add_development_dependency('mustache', '>= 0.9', '< 2.0')
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Artúr Barnabás Kovács
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,27 @@
1
+ Copyright (c) 2010-2020, William Bittle
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+
7
+ * Redistributions of source code must retain the above copyright notice, this
8
+ list of conditions and the following disclaimer.
9
+
10
+ * Redistributions in binary form must reproduce the above copyright notice,
11
+ this list of conditions and the following disclaimer in the documentation
12
+ and/or other materials provided with the distribution.
13
+
14
+ * Neither the name of the copyright holder nor the names of its
15
+ contributors may be used to endorse or promote products derived from
16
+ this software without specific prior written permission.
17
+
18
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -8,17 +8,11 @@
8
8
  "source": "https://spdx.org/licenses/MIT.html",
9
9
  "description": "A short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code.",
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. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders.",
11
- "using": [
12
- {
13
- "Babel": "https://github.com/babel/babel/blob/master/LICENSE"
14
- },
15
- {
16
- ".NET Core": "https://github.com/dotnet/runtime/blob/master/LICENSE.TXT"
17
- },
18
- {
19
- "Rails": "https://github.com/rails/rails/blob/master/MIT-LICENSE"
20
- }
21
- ],
11
+ "using": {
12
+ "Babel": "https://github.com/babel/babel/blob/master/LICENSE",
13
+ ".NET Core": "https://github.com/dotnet/runtime/blob/master/LICENSE.TXT",
14
+ "Rails": "https://github.com/rails/rails/blob/master/MIT-LICENSE"
15
+ },
22
16
  "featured": true,
23
17
  "hidden": false,
24
18
  "nickname": null,
@@ -30,29 +24,29 @@
30
24
  {
31
25
  "tag": "commercial-use",
32
26
  "label": "Commercial use",
33
- "description": "This software and derivatives may be used for commercial purposes."
27
+ "description": "The licensed material and derivatives may be used for commercial purposes."
34
28
  },
35
29
  {
36
30
  "tag": "modifications",
37
31
  "label": "Modification",
38
- "description": "This software may be modified."
32
+ "description": "The licensed material may be modified."
39
33
  },
40
34
  {
41
35
  "tag": "distribution",
42
36
  "label": "Distribution",
43
- "description": "This software may be distributed."
37
+ "description": "The licensed material may be distributed."
44
38
  },
45
39
  {
46
40
  "tag": "private-use",
47
41
  "label": "Private use",
48
- "description": "This software may be used and modified in private."
42
+ "description": "The licensed material may be used and modified in private."
49
43
  }
50
44
  ],
51
45
  "conditions": [
52
46
  {
53
47
  "tag": "include-copyright",
54
48
  "label": "License and copyright notice",
55
- "description": "A copy of the license and copyright notice must be included with the software."
49
+ "description": "A copy of the license and copyright notice must be included with the licensed material."
56
50
  }
57
51
  ],
58
52
  "limitations": [
@@ -64,7 +58,7 @@
64
58
  {
65
59
  "tag": "warranty",
66
60
  "label": "Warranty",
67
- "description": "The license explicitly states that it does NOT provide any warranty."
61
+ "description": "This license explicitly states that it does NOT provide any warranty."
68
62
  }
69
63
  ]
70
64
  },
@@ -99,7 +93,7 @@
99
93
  },
100
94
  {
101
95
  "filename": "licensee.gemspec",
102
- "content": "# frozen_string_literal: true\n\nrequire File.expand_path('lib/licensee/version', __dir__)\n\nGem::Specification.new do |gem|\n gem.name = 'licensee'\n gem.version = Licensee::VERSION\n\n gem.summary = 'A Ruby Gem to detect open source project licenses'\n gem.description = <<-DESC\n Licensee automates the process of reading LICENSE files and\n compares their contents to known licenses using a fancy maths.\n DESC\n\n gem.authors = ['Ben Balter']\n gem.email = 'ben.balter@github.com'\n gem.homepage = 'https://github.com/benbalter/licensee'\n gem.license = 'MIT'\n\n gem.bindir = 'bin'\n gem.executables << 'licensee'\n\n gem.add_dependency('dotenv', '~> 2.0')\n gem.add_dependency('octokit', '~> 4.17')\n gem.add_dependency('reverse_markdown', '~> 1.0')\n gem.add_dependency('rugged', '~> 0.24')\n gem.add_dependency('thor', '>= 0.19', '< 2.0')\n\n gem.add_development_dependency('mustache', '>= 0.9', '< 2.0')\n gem.add_development_dependency('pry', '~> 0.9')\n gem.add_development_dependency('rspec', '~> 3.5')\n gem.add_development_dependency('rubocop', '~> 0.80')\n gem.add_development_dependency('rubocop-performance', '~> 1.5')\n gem.add_development_dependency('rubocop-rspec', '~> 1.36')\n gem.add_development_dependency('simplecov', '~> 0.16')\n gem.add_development_dependency('webmock', '~> 3.1')\n\n gem.required_ruby_version = '> 2.3'\n\n # ensure the gem is built out of versioned files\n gem.files = Dir[\n '{bin,lib,man,test,vendor,spec}/**/*',\n 'README*', 'LICENSE*'\n ] & `git ls-files -z`.split(\"\\0\")\nend\n",
96
+ "content": "# frozen_string_literal: true\n\nrequire File.expand_path('lib/licensee/version', __dir__)\n\nGem::Specification.new do |gem|\n gem.name = 'licensee'\n gem.version = Licensee::VERSION\n\n gem.summary = 'A Ruby Gem to detect open source project licenses'\n gem.description = <<-DESC\n Licensee automates the process of reading LICENSE files and\n compares their contents to known licenses using a fancy maths.\n DESC\n\n gem.authors = ['Ben Balter']\n gem.email = 'ben.balter@github.com'\n gem.homepage = 'https://github.com/benbalter/licensee'\n gem.license = 'MIT'\n\n gem.bindir = 'bin'\n gem.executables << 'licensee'\n\n gem.add_dependency('dotenv', '~> 2.0')\n gem.add_dependency('octokit', '~> 4.17')\n gem.add_dependency('reverse_markdown', '~> 1.0')\n gem.add_dependency('rugged', '>= 0.24', '<2.0')\n gem.add_dependency('thor', '>= 0.19', '< 2.0')\n\n gem.add_development_dependency('mustache', '>= 0.9', '< 2.0')\n gem.add_development_dependency('pry', '~> 0.9')\n gem.add_development_dependency('rspec', '~> 3.5')\n gem.add_development_dependency('rubocop', '~> 0.80')\n gem.add_development_dependency('rubocop-performance', '~> 1.5')\n gem.add_development_dependency('rubocop-rspec', '~> 1.36')\n gem.add_development_dependency('simplecov', '~> 0.16')\n gem.add_development_dependency('webmock', '~> 3.1')\n\n gem.required_ruby_version = '> 2.3'\n\n # ensure the gem is built out of versioned files\n gem.files = Dir[\n '{bin,lib,man,test,vendor,spec}/**/*',\n 'README*', 'LICENSE*'\n ] & `git ls-files -z`.split(\"\\0\")\nend\n",
103
97
  "content_hash": null,
104
98
  "content_normalized": null,
105
99
  "matcher": {
@@ -4,6 +4,10 @@ apache-with-readme-notice:
4
4
  key: apache-2.0
5
5
  matcher: exact
6
6
  hash: ab3901051663cb8ee5dea9ebdff406ad136910e3
7
+ bom:
8
+ key: mit
9
+ matcher: exact
10
+ hash: d64f3bb4282a97b37454b5bb96a8a264a3363dc3
7
11
  bsd-3-lists:
8
12
  key: bsd-3-clause
9
13
  matcher:
@@ -11,7 +15,7 @@ bsd-3-lists:
11
15
  bsd-3-noendorseslash:
12
16
  key: bsd-3-clause
13
17
  matcher: dice
14
- hash: 11df3173c40b87a9da370f3420372a310259b273
18
+ hash: ca28b4e030d0ec26cb01debe697105b6670c7521
15
19
  bsd-plus-patents:
16
20
  key: other
17
21
  matcher:
@@ -44,6 +48,10 @@ copyright-encoding:
44
48
  key: no-license
45
49
  matcher: copyright
46
50
  hash: da39a3ee5e6b4b0d3255bfef95601890afd80709
51
+ crlf-bsd:
52
+ key: bsd-3-clause
53
+ matcher: exact
54
+ hash: fa22c672927af9c7334874561198799cbf4bdf31
47
55
  crlf-license:
48
56
  key: gpl-3.0
49
57
  matcher: exact
@@ -67,7 +75,7 @@ gpl3-without-instructions:
67
75
  html:
68
76
  key: epl-1.0
69
77
  matcher: dice
70
- hash: 5265922b5943810a3ad23c66c50a0828ba342bfd
78
+ hash: b0a3248238c79a7e4aae7a0fb61e927ea5fc31d3
71
79
  lgpl:
72
80
  key: lgpl-3.0
73
81
  matcher: exact
@@ -84,10 +92,14 @@ license-with-readme-reference:
84
92
  key: mit
85
93
  matcher: exact
86
94
  hash: d64f3bb4282a97b37454b5bb96a8a264a3363dc3
95
+ markdown-artistic:
96
+ key: artistic-2.0
97
+ matcher: dice
98
+ hash: fb7d858f0e6b9885b5ae4a7a763888f01624ebdf
87
99
  markdown-gpl:
88
100
  key: gpl-2.0
89
- matcher: dice
90
- hash: a0de4ee2a7e6ef2c2f6283b09cc755af5de5a5cb
101
+ matcher: exact
102
+ hash: f1dfb00b32ff9058e780f3ff9c528ed73594f3ba
91
103
  mit:
92
104
  key: mit
93
105
  matcher: exact
@@ -124,6 +136,10 @@ unlicense-noinfo:
124
136
  key: unlicense
125
137
  matcher: exact
126
138
  hash: 853b375edc61b9e823da0fa5fead97c9460c3e45
139
+ vim:
140
+ key: vim
141
+ matcher: dice
142
+ hash: d66f1d3714fdcd834c5bf871fcb36c1aab4f7e38
127
143
  webmock:
128
144
  key:
129
145
  matcher: