licensee 9.16.0 → 9.16.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/licensee +1 -1
- data/lib/licensee/commands/license_path.rb +8 -8
- data/lib/licensee/content_helper.rb +4 -4
- data/lib/licensee/license.rb +2 -2
- data/lib/licensee/license_field.rb +2 -2
- data/lib/licensee/license_meta.rb +2 -2
- data/lib/licensee/matchers/cabal.rb +1 -1
- data/lib/licensee/matchers/cargo.rb +1 -1
- data/lib/licensee/matchers/copyright.rb +3 -3
- data/lib/licensee/matchers/cran.rb +3 -3
- data/lib/licensee/matchers/dist_zilla.rb +1 -1
- data/lib/licensee/matchers/gemspec.rb +5 -5
- data/lib/licensee/matchers/npm_bower.rb +1 -1
- data/lib/licensee/matchers/nuget.rb +6 -6
- data/lib/licensee/matchers/spdx.rb +1 -1
- data/lib/licensee/project_files/license_file.rb +9 -9
- data/lib/licensee/project_files/readme_file.rb +3 -3
- data/lib/licensee/projects/fs_project.rb +2 -2
- data/lib/licensee/projects/git_project.rb +2 -2
- data/lib/licensee/projects/github_project.rb +1 -1
- data/lib/licensee/rule.rb +1 -1
- data/lib/licensee/version.rb +1 -1
- data/spec/fixtures/detect.json +1 -1
- data/spec/licensee/commands/license_path_spec.rb +3 -2
- data/spec/licensee/content_helper_spec.rb +1 -1
- data/spec/licensee/license_meta_spec.rb +2 -2
- data/spec/licensee/matchers/cran_matcher_spec.rb +0 -2
- data/spec/spec_helper.rb +1 -1
- data/vendor/choosealicense.com/_licenses/cc-by-sa-4.0.txt +1 -1
- data/vendor/choosealicense.com/_licenses/epl-1.0.txt +1 -1
- data/vendor/choosealicense.com/_licenses/epl-2.0.txt +3 -3
- data/vendor/choosealicense.com/_licenses/odbl-1.0.txt +1 -1
- data/vendor/choosealicense.com/_licenses/upl-1.0.txt +3 -3
- data/vendor/license-list-XML/src/AGPL-3.0.xml +2 -2
- data/vendor/license-list-XML/src/Apache-2.0.xml +2 -2
- data/vendor/license-list-XML/src/BSD-2-Clause.xml +2 -2
- data/vendor/license-list-XML/src/BSD-3-Clause.xml +9 -9
- data/vendor/license-list-XML/src/GFDL-1.3.xml +1 -1
- data/vendor/license-list-XML/src/GPL-2.0.xml +1 -1
- data/vendor/license-list-XML/src/GPL-3.0.xml +1 -1
- data/vendor/license-list-XML/src/LGPL-2.1.xml +1 -1
- data/vendor/license-list-XML/src/LGPL-3.0.xml +1 -1
- metadata +11 -12
- data/licensee.gemspec +0 -47
- /data/spec/licensee/project_files/{package_info_spec.rb → package_manager_file_spec.rb} +0 -0
- /data/spec/licensee/projects/{github_project_spec.rb → git_hub_project_spec.rb} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f5ee0aef5bea7c09d85b5fe00cde34590331108dea73bede502928d3e863809
|
4
|
+
data.tar.gz: 4ce51466168c4b9aaf354ffe897f6727e598cc534aadff4846f028a2a66dff7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 314636d52fd93d47a39b9b9835fe3b305735fc84be5767f1ab31a6bb0f933abb0e837d7bb9c4cb20ce64be0bcb0e2043adbce964b09dfc05776d955e6a089012
|
7
|
+
data.tar.gz: 308beab7147f0e4f5f8f16c70533e899c5106b30245544d0d27cea2727d28a929e5b328031dd1658be998da04b477e2adc6c5e3f0686cfbe8d2cd05fb93eca25
|
data/bin/licensee
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
class LicenseeCLI < Thor
|
4
4
|
desc 'license-path [PATH]', "Returns the path to the given project's license file"
|
5
|
-
def license_path(
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
5
|
+
def license_path(path)
|
6
|
+
project = Licensee.project(path)
|
7
|
+
|
8
|
+
exit 1 unless project.license_file
|
9
|
+
|
10
|
+
if remote?
|
11
|
+
say project.license_file.path
|
12
12
|
else
|
13
|
-
|
13
|
+
say File.expand_path(project.license_file.path, path)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
@@ -6,8 +6,8 @@ require 'digest'
|
|
6
6
|
module Licensee
|
7
7
|
module ContentHelper
|
8
8
|
DIGEST = Digest::SHA1
|
9
|
-
START_REGEX = /\A\s
|
10
|
-
END_OF_TERMS_REGEX = /^[\s#*_]*end of (the )?terms and conditions[\s#*_]*$/i
|
9
|
+
START_REGEX = /\A\s*/
|
10
|
+
END_OF_TERMS_REGEX = /^[\s#*_]*end of (the )?terms and conditions[\s#*_]*$/i
|
11
11
|
REGEXES = {
|
12
12
|
bom: /#{START_REGEX}\xEF\xBB\xBF/,
|
13
13
|
hrs: /^\s*[=\-*]{3,}\s*$/,
|
@@ -304,8 +304,8 @@ module Licensee
|
|
304
304
|
|
305
305
|
if operation
|
306
306
|
@_content = _content.gsub operation[:from], operation[:to]
|
307
|
-
elsif respond_to?("normalize_#{from_or_key}", true)
|
308
|
-
send("normalize_#{from_or_key}")
|
307
|
+
elsif respond_to?(:"normalize_#{from_or_key}", true)
|
308
|
+
send(:"normalize_#{from_or_key}")
|
309
309
|
else
|
310
310
|
raise ArgumentError, "#{from_or_key} is an invalid normalization"
|
311
311
|
end
|
data/lib/licensee/license.rb
CHANGED
@@ -98,8 +98,8 @@ module Licensee
|
|
98
98
|
pseudo: true
|
99
99
|
}.freeze
|
100
100
|
|
101
|
-
SOURCE_PREFIX = %r{https?://(?:www\.)?}i
|
102
|
-
SOURCE_SUFFIX = %r{(?:\.html?|\.txt|/)(?:\?[^\s]*)?}i
|
101
|
+
SOURCE_PREFIX = %r{https?://(?:www\.)?}i
|
102
|
+
SOURCE_SUFFIX = %r{(?:\.html?|\.txt|/)(?:\?[^\s]*)?}i
|
103
103
|
|
104
104
|
HASH_METHODS = %i[
|
105
105
|
key spdx_id meta url rules fields other? gpl? lgpl? cc?
|
@@ -22,7 +22,7 @@ module Licensee
|
|
22
22
|
@all ||= begin
|
23
23
|
path = '../../vendor/choosealicense.com/_data/fields.yml'
|
24
24
|
path = File.expand_path path, __dir__
|
25
|
-
fields = YAML.
|
25
|
+
fields = YAML.safe_load_file(path)
|
26
26
|
fields.map { |field| LicenseField.from_hash(field) }
|
27
27
|
end
|
28
28
|
end
|
@@ -47,7 +47,7 @@ module Licensee
|
|
47
47
|
end
|
48
48
|
|
49
49
|
alias key name
|
50
|
-
FIELD_REGEX = /\[(#{Regexp.union(LicenseField.keys)})\]
|
50
|
+
FIELD_REGEX = /\[(#{Regexp.union(LicenseField.keys)})\]/
|
51
51
|
|
52
52
|
# The human-readable field name
|
53
53
|
def label
|
@@ -43,12 +43,12 @@ module Licensee
|
|
43
43
|
|
44
44
|
# Array of symbolized helper methods to expose on the License class
|
45
45
|
def helper_methods
|
46
|
-
members - PREDICATE_FIELDS + PREDICATE_FIELDS.map { |f| "#{f}?"
|
46
|
+
members - PREDICATE_FIELDS + PREDICATE_FIELDS.map { |f| :"#{f}?" }
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
50
|
PREDICATE_FIELDS.each do |field|
|
51
|
-
alias_method "#{field}?"
|
51
|
+
alias_method :"#{field}?", field
|
52
52
|
end
|
53
53
|
|
54
54
|
# Backward compatibalize `#["spdx-id"]` calls to avoid a breaking change
|
@@ -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
|
8
|
+
LICENSE_REGEX = /^\s*license\s*:\s*([a-z\-0-9.]+)\s*$/ix
|
9
9
|
LICENSE_CONVERSIONS = {
|
10
10
|
'GPL-2' => 'GPL-2.0',
|
11
11
|
'GPL-3' => 'GPL-3.0',
|
@@ -6,9 +6,9 @@ module Licensee
|
|
6
6
|
attr_reader :file
|
7
7
|
|
8
8
|
COPYRIGHT_SYMBOLS = Regexp.union([/copyright/i, /\(c\)/i, "\u00A9", "\xC2\xA9"])
|
9
|
-
MAIN_LINE_REGEX = /[_*\-\s]*#{COPYRIGHT_SYMBOLS}.*$/i
|
10
|
-
OPTIONAL_LINE_REGEX = /[_*\-\s]*with Reserved Font Name.*$/i
|
11
|
-
REGEX = /#{ContentHelper::START_REGEX}(#{MAIN_LINE_REGEX}#{OPTIONAL_LINE_REGEX}*)+$/i
|
9
|
+
MAIN_LINE_REGEX = /[_*\-\s]*#{COPYRIGHT_SYMBOLS}.*$/i
|
10
|
+
OPTIONAL_LINE_REGEX = /[_*\-\s]*with Reserved Font Name.*$/i
|
11
|
+
REGEX = /#{ContentHelper::START_REGEX}(#{MAIN_LINE_REGEX}#{OPTIONAL_LINE_REGEX}*)+$/i
|
12
12
|
def match
|
13
13
|
# NOTE: must use content, and not content_normalized here
|
14
14
|
Licensee::License.find('no-license') if /#{REGEX}+\z/io.match?(file.content.strip)
|
@@ -7,9 +7,9 @@ module Licensee
|
|
7
7
|
|
8
8
|
# While we could parse the DESCRIPTION file, prefer
|
9
9
|
# a lenient regex for speed and security. Moar parsing moar problems.
|
10
|
-
LICENSE_FIELD_REGEX = /^license:\s*(.+)/i
|
11
|
-
PLUS_FILE_LICENSE_REGEX = /\s*\+\s*file\s+LICENSE$/i
|
12
|
-
GPL_VERSION_REGEX = /^GPL(?:-([23])|\s*\(\s*>=\s*([23])\s*\))$/i
|
10
|
+
LICENSE_FIELD_REGEX = /^license:\s*(.+)/i
|
11
|
+
PLUS_FILE_LICENSE_REGEX = /\s*\+\s*file\s+LICENSE$/i
|
12
|
+
GPL_VERSION_REGEX = /^GPL(?:-([23])|\s*\(\s*>=\s*([23])\s*\))$/i
|
13
13
|
|
14
14
|
private
|
15
15
|
|
@@ -5,24 +5,24 @@ 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
|
8
|
+
VALUE_REGEX = /\s*['"]([a-z\-0-9.]+)['"](?:\.freeze)?\s*/i
|
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
|
12
12
|
# non-value groups
|
13
|
-
ARRAY_REGEX = /\s*\[#{VALUE_REGEX}(?:,#{VALUE_REGEX})*\]\s*/i
|
13
|
+
ARRAY_REGEX = /\s*\[#{VALUE_REGEX}(?:,#{VALUE_REGEX})*\]\s*/i
|
14
14
|
|
15
15
|
DECLARATION_REGEX = /
|
16
16
|
^\s*[a-z0-9_]+\.([a-z0-9_]+)\s*=#{VALUE_REGEX}$
|
17
|
-
/ix
|
17
|
+
/ix
|
18
18
|
|
19
19
|
LICENSE_REGEX = /
|
20
20
|
^\s*[a-z0-9_]+\.license\s*=#{VALUE_REGEX}$
|
21
|
-
/ix
|
21
|
+
/ix
|
22
22
|
|
23
23
|
LICENSE_ARRAY_REGEX = /
|
24
24
|
^\s*[a-z0-9_]+\.licenses\s*=#{ARRAY_REGEX}$
|
25
|
-
/ix
|
25
|
+
/ix
|
26
26
|
|
27
27
|
private
|
28
28
|
|
@@ -7,14 +7,14 @@ module Licensee
|
|
7
7
|
# Moar parsing moar problems.
|
8
8
|
LICENSE_REGEX = %r{
|
9
9
|
<license\s*type\s*=\s*["']expression["']\s*>([a-z\-0-9. +()]+)</license\s*>
|
10
|
-
}ix
|
10
|
+
}ix
|
11
11
|
|
12
|
-
LICENSE_URL_REGEX = %r{<licenseUrl>\s*(.*)\s*</licenseUrl>}i
|
12
|
+
LICENSE_URL_REGEX = %r{<licenseUrl>\s*(.*)\s*</licenseUrl>}i
|
13
13
|
|
14
|
-
NUGET_REGEX = %r{https?://licenses.nuget.org/(.*)}i
|
15
|
-
OPENSOURCE_REGEX = %r{https?://(?:www\.)?opensource.org/licenses/(.*)}i
|
16
|
-
SPDX_REGEX = %r{https?://(?:www\.)?spdx.org/licenses/(.*?)(?:\.html|\.txt)?$}i
|
17
|
-
APACHE_REGEX = %r{https?://(?:www\.)?apache.org/licenses/(.*?)(?:\.html|\.txt)?$}i
|
14
|
+
NUGET_REGEX = %r{https?://licenses.nuget.org/(.*)}i
|
15
|
+
OPENSOURCE_REGEX = %r{https?://(?:www\.)?opensource.org/licenses/(.*)}i
|
16
|
+
SPDX_REGEX = %r{https?://(?:www\.)?spdx.org/licenses/(.*?)(?:\.html|\.txt)?$}i
|
17
|
+
APACHE_REGEX = %r{https?://(?:www\.)?apache.org/licenses/(.*?)(?:\.html|\.txt)?$}i
|
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
|
8
|
+
LICENSE_REGEX = /PackageLicenseDeclared:\s*([a-z\-0-9. +()]+)\s*/i
|
9
9
|
|
10
10
|
private
|
11
11
|
|
@@ -7,29 +7,29 @@ module Licensee
|
|
7
7
|
|
8
8
|
# List of extensions to give preference to
|
9
9
|
PREFERRED_EXT = %w[md markdown txt html].freeze
|
10
|
-
PREFERRED_EXT_REGEX = /\.#{Regexp.union(PREFERRED_EXT)}\z
|
10
|
+
PREFERRED_EXT_REGEX = /\.#{Regexp.union(PREFERRED_EXT)}\z/
|
11
11
|
|
12
12
|
# Regex to match any extension except .spdx or .header
|
13
|
-
LICENSE_EXT_REGEX = %r{\.(?!spdx|header)[^./]+\z}i
|
13
|
+
LICENSE_EXT_REGEX = %r{\.(?!spdx|header)[^./]+\z}i
|
14
14
|
|
15
15
|
# Regex to match any extension except a few unlikely as license
|
16
16
|
# texts with complex filenames
|
17
|
-
OTHER_EXT_REGEX = %r{\.(?!xml|go|gemspec)[^./]+\z}i
|
17
|
+
OTHER_EXT_REGEX = %r{\.(?!xml|go|gemspec)[^./]+\z}i
|
18
18
|
|
19
19
|
# Regex to match any extension
|
20
|
-
ANY_EXT_REGEX = %r{\.[^./]+\z}i
|
20
|
+
ANY_EXT_REGEX = %r{\.[^./]+\z}i
|
21
21
|
|
22
22
|
# Regex to match, LICENSE, LICENCE, unlicense, etc.
|
23
|
-
LICENSE_REGEX = /(un)?licen[sc]e/i
|
23
|
+
LICENSE_REGEX = /(un)?licen[sc]e/i
|
24
24
|
|
25
25
|
# Regex to match COPYING, COPYRIGHT, etc.
|
26
|
-
COPYING_REGEX = /copy(ing|right)/i
|
26
|
+
COPYING_REGEX = /copy(ing|right)/i
|
27
27
|
|
28
28
|
# Regex to match OFL.
|
29
|
-
OFL_REGEX = /ofl/i
|
29
|
+
OFL_REGEX = /ofl/i
|
30
30
|
|
31
31
|
# BSD + PATENTS patent file
|
32
|
-
PATENTS_REGEX = /patents/i
|
32
|
+
PATENTS_REGEX = /patents/i
|
33
33
|
|
34
34
|
# Hash of Regex => score with which to score potential license files
|
35
35
|
FILENAME_REGEXES = {
|
@@ -55,7 +55,7 @@ module Licensee
|
|
55
55
|
# detected as CC-BY or CC-BY-SA which are 98%+ similar
|
56
56
|
CC_FALSE_POSITIVE_REGEX = /
|
57
57
|
^(creative\ commons\ )?Attribution-(NonCommercial|NoDerivatives)
|
58
|
-
/xi
|
58
|
+
/xi
|
59
59
|
|
60
60
|
def possible_matchers
|
61
61
|
[Matchers::Copyright, Matchers::Exact, Matchers::Dice]
|
@@ -9,8 +9,8 @@ module Licensee
|
|
9
9
|
/\AREADME\.(#{Regexp.union(EXTENSIONS).source})\z/i => 0.9
|
10
10
|
}.freeze
|
11
11
|
|
12
|
-
TITLE_REGEX = /licen[sc]e:?/i
|
13
|
-
UNDERLINE_REGEX = /\n[-=]+/m
|
12
|
+
TITLE_REGEX = /licen[sc]e:?/i
|
13
|
+
UNDERLINE_REGEX = /\n[-=]+/m
|
14
14
|
CONTENT_REGEX = /^
|
15
15
|
(?: # Header lookbehind
|
16
16
|
[\#=]+\s#{TITLE_REGEX}\s*[\#=]* # Start of hashes or rdoc header
|
@@ -27,7 +27,7 @@ module Licensee
|
|
27
27
|
|
|
28
28
|
\z # End of file
|
29
29
|
)
|
30
|
-
/mix
|
30
|
+
/mix
|
31
31
|
|
32
32
|
def possible_matchers
|
33
33
|
super.push(Matchers::Reference)
|
@@ -34,11 +34,11 @@ module Licensee
|
|
34
34
|
def files
|
35
35
|
@files ||= search_directories.flat_map do |dir|
|
36
36
|
relative_dir = Pathname.new(dir).relative_path_from(dir_path).to_s
|
37
|
-
Dir.glob(::File.join(dir, @pattern).tr('\\', '/')).
|
37
|
+
Dir.glob(::File.join(dir, @pattern).tr('\\', '/')).filter_map do |file|
|
38
38
|
next unless ::File.file?(file)
|
39
39
|
|
40
40
|
{ name: ::File.basename(file), dir: relative_dir }
|
41
|
-
end
|
41
|
+
end
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
@@ -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)|[^/]+)).*}
|
18
|
+
%r{https://github.com/([^/]+/([^/]+(?=\.git)|[^/]+)).*}
|
19
19
|
|
20
20
|
class RepoNotFound < StandardError; end
|
21
21
|
|
data/lib/licensee/rule.rb
CHANGED
data/lib/licensee/version.rb
CHANGED
data/spec/fixtures/detect.json
CHANGED
@@ -93,7 +93,7 @@
|
|
93
93
|
},
|
94
94
|
{
|
95
95
|
"filename": "licensee.gemspec",
|
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 gem.metadata['rubygems_mfa_required'] = 'true'\n\n gem.bindir = 'bin'\n gem.executables << 'licensee'\n\n gem.add_dependency('dotenv', '~> 2.0')\n gem.add_dependency('octokit', '>= 4.20', '<
|
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 gem.metadata['rubygems_mfa_required'] = 'true'\n\n gem.bindir = 'bin'\n gem.executables << 'licensee'\n\n gem.add_dependency('dotenv', '~> 2.0')\n gem.add_dependency('octokit', '>= 4.20', '< 9.0')\n gem.add_dependency('reverse_markdown', '>= 1', '< 3')\n gem.add_dependency('rugged', '>= 0.24', '<2.0')\n gem.add_dependency('thor', '>= 0.19', '< 2.0')\n\n gem.add_development_dependency('gem-release', '~> 2.0')\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', '~> 1.0')\n gem.add_development_dependency('rubocop-performance', '~> 1.5')\n gem.add_development_dependency('rubocop-rspec', '~> 2.0')\n gem.add_development_dependency('simplecov', '~> 0.16')\n gem.add_development_dependency('webmock', '~> 3.1')\n\n gem.required_ruby_version = '>= 3.0'\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",
|
97
97
|
"content_hash": null,
|
98
98
|
"content_normalized": null,
|
99
99
|
"matcher": {
|
@@ -2,7 +2,8 @@
|
|
2
2
|
|
3
3
|
RSpec.describe 'license-path command' do
|
4
4
|
let(:command) { ['bundle', 'exec', 'bin/licensee', 'license-path'] }
|
5
|
-
let(:
|
5
|
+
let(:project_path) { fixture_path('mit_markdown') }
|
6
|
+
let(:arguments) { [project_path] }
|
6
7
|
let(:output) do
|
7
8
|
Dir.chdir project_root do
|
8
9
|
Open3.capture3(*[command, arguments].flatten)
|
@@ -14,7 +15,7 @@ RSpec.describe 'license-path command' do
|
|
14
15
|
let(:status) { output[2] }
|
15
16
|
|
16
17
|
it 'returns the license path' do
|
17
|
-
expect(stdout).to match(File.join(
|
18
|
+
expect(stdout).to match(File.join(project_path, 'LICENSE.md'))
|
18
19
|
end
|
19
20
|
|
20
21
|
it 'Returns a zero exit code' do
|
@@ -111,7 +111,7 @@ RSpec.describe Licensee::ContentHelper do
|
|
111
111
|
comment_markup: "/*\n* The MIT License\n* Foo\n*/",
|
112
112
|
copyright_title: "Copyright 2019 Ben Balter\nMIT License\nFoo"
|
113
113
|
}.each do |field, fixture|
|
114
|
-
|
114
|
+
describe "#strip_#{field}" do
|
115
115
|
let(:content) { fixture }
|
116
116
|
|
117
117
|
it "strips #{field}" do
|
@@ -28,11 +28,11 @@ RSpec.describe Licensee::LicenseMeta do
|
|
28
28
|
described_class::PREDICATE_FIELDS.each do |field|
|
29
29
|
context "the #{field}? method" do
|
30
30
|
it 'responds' do
|
31
|
-
expect(subject).to respond_to("#{field}?"
|
31
|
+
expect(subject).to respond_to(:"#{field}?")
|
32
32
|
end
|
33
33
|
|
34
34
|
it 'is boolean' do
|
35
|
-
expect(subject.send("#{field}?"
|
35
|
+
expect(subject.send(:"#{field}?")).to be(true).or be(false)
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
@@ -4,8 +4,6 @@ RSpec.describe Licensee::Matchers::Cran do
|
|
4
4
|
subject { described_class.new(file) }
|
5
5
|
|
6
6
|
let(:mit) { Licensee::License.find('mit') }
|
7
|
-
let(:gpl2) { Licensee::License.find('gpl-2.0') }
|
8
|
-
let(:gpl3) { Licensee::License.find('gpl-3.0') }
|
9
7
|
let(:content) { "License: MIT + file LICENSE\nPackage: test" }
|
10
8
|
let(:file) { Licensee::ProjectFiles::LicenseFile.new(content, 'DESCRIPTION') }
|
11
9
|
|
data/spec/spec_helper.rb
CHANGED
@@ -109,7 +109,7 @@ end
|
|
109
109
|
def meta_fields
|
110
110
|
path = 'vendor/choosealicense.com/_data/meta.yml'
|
111
111
|
path = File.expand_path(path, project_root)
|
112
|
-
YAML.
|
112
|
+
YAML.safe_load_file(path)
|
113
113
|
end
|
114
114
|
|
115
115
|
RSpec::Matchers.define :be_an_existing_file do
|
@@ -2,7 +2,7 @@
|
|
2
2
|
title: Creative Commons Attribution Share Alike 4.0 International
|
3
3
|
spdx-id: CC-BY-SA-4.0
|
4
4
|
|
5
|
-
description: Similar to <a href='/licenses/cc-by-4.0/'>CC-BY-4.0</a> but requires derivatives be distributed under the same or a similar, <a href="https://creativecommons.org/compatiblelicenses
|
5
|
+
description: Similar to <a href='/licenses/cc-by-4.0/'>CC-BY-4.0</a> but requires derivatives be distributed under the same or a similar, <a href="https://creativecommons.org/compatiblelicenses">compatible</a> license. Frequently used for media assets and educational materials. A previous version is the default license for Wikipedia and other Wikimedia projects. Not recommended for software.
|
6
6
|
|
7
7
|
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. It is also acceptable to solely supply a link to a copy of the license, usually to the <a href='https://creativecommons.org/licenses/by-sa/4.0/'>canonical URL for the license</a>.
|
8
8
|
|
@@ -7,7 +7,7 @@ description: This commercially-friendly copyleft license provides the ability to
|
|
7
7
|
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.
|
8
8
|
|
9
9
|
using:
|
10
|
-
|
10
|
+
ClojureScript: https://github.com/clojure/clojurescript/blob/master/LICENSE
|
11
11
|
JUnit: https://github.com/junit-team/junit4/blob/main/LICENSE-junit.txt
|
12
12
|
Quil: https://github.com/quil/quil/blob/master/LICENSE
|
13
13
|
|
@@ -9,9 +9,9 @@ description: This commercially-friendly copyleft license provides the ability to
|
|
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 license into the file.
|
10
10
|
|
11
11
|
using:
|
12
|
-
|
13
|
-
openHAB: https://github.com/openhab/openhab-distro/blob/
|
14
|
-
SUMO: https://github.com/eclipse/sumo/blob/
|
12
|
+
hawkBit: https://github.com/eclipse/hawkbit/blob/master/LICENSE
|
13
|
+
openHAB: https://github.com/openhab/openhab-distro/blob/main/LICENSE
|
14
|
+
SUMO: https://github.com/eclipse-sumo/sumo/blob/main/LICENSE
|
15
15
|
|
16
16
|
permissions:
|
17
17
|
- commercial-use
|
@@ -10,7 +10,7 @@ how: Create a text file (typically named LICENSE or LICENSE.txt) in the root of
|
|
10
10
|
using:
|
11
11
|
World Countries: https://github.com/mledoze/countries/blob/master/LICENSE
|
12
12
|
OpenFlights: https://github.com/jpatokal/openflights/blob/master/data/LICENSE
|
13
|
-
Public Zone Database: https://github.com/zonedb/zonedb/blob/main/LICENSE.md
|
13
|
+
Public Zone Database: https://github.com/zonedb/zonedb/blob/main/LICENSE-DATA.md
|
14
14
|
|
15
15
|
permissions:
|
16
16
|
- commercial-use
|
@@ -9,8 +9,8 @@ how: Insert the license or a link to it along with a copyright notice into your
|
|
9
9
|
note: It is recommended to add a link to the license and copyright notice at the top of each source file, example text can be found at https://oss.oracle.com/licenses/upl/.
|
10
10
|
|
11
11
|
using:
|
12
|
-
|
13
|
-
|
12
|
+
graaljs: https://github.com/oracle/graaljs/blob/master/LICENSE
|
13
|
+
Roc: https://github.com/roc-lang/roc/blob/main/LICENSE
|
14
14
|
Soufflé: https://github.com/souffle-lang/souffle/blob/master/LICENSE
|
15
15
|
|
16
16
|
permissions:
|
@@ -43,7 +43,7 @@ Works (as defined below), to deal in both
|
|
43
43
|
|
44
44
|
(a) the Software, and
|
45
45
|
(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if
|
46
|
-
one is included with the Software (each a
|
46
|
+
one is included with the Software (each a "Larger Work" to which the Software
|
47
47
|
is contributed by such licensors),
|
48
48
|
|
49
49
|
without restriction, including without limitation the rights to copy, create
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<SPDXLicenseCollection xmlns="http://www.spdx.org/license">
|
3
3
|
<license licenseId="AGPL-3.0" isOsiApproved="true"
|
4
4
|
name="GNU Affero General Public License v3.0"
|
5
|
-
|
5
|
+
deprecatedVersion="3.0">
|
6
6
|
<obsoletedBys>
|
7
7
|
<obsoletedBy>AGPL-3.0-only</obsoletedBy>
|
8
8
|
<obsoletedBy expression="AGPL-3.0+">AGPL-3.0-or-later</obsoletedBy>
|
@@ -21,7 +21,7 @@
|
|
21
21
|
PURPOSE. See the GNU Affero General Public License for more details.
|
22
22
|
You should have received a copy of the GNU Affero General Public License
|
23
23
|
along with this program. If not, see
|
24
|
-
<https://www.gnu.org/licenses/>
|
24
|
+
<https://www.gnu.org/licenses/>.
|
25
25
|
</standardLicenseHeader>
|
26
26
|
<text>
|
27
27
|
<titleText>
|
@@ -138,13 +138,13 @@
|
|
138
138
|
License. You may add Your own attribution notices within Derivative Works that You
|
139
139
|
distribute, alongside or as an addendum to the NOTICE text from the Work, provided that
|
140
140
|
such additional attribution notices cannot be construed as modifying the License.
|
141
|
+
</item>
|
142
|
+
</list>
|
141
143
|
<p>You may add Your own copyright statement to Your modifications and may provide additional or
|
142
144
|
different license terms and conditions for use, reproduction, or distribution of Your
|
143
145
|
modifications, or for any such Derivative Works as a whole, provided Your use,
|
144
146
|
reproduction, and distribution of the Work otherwise complies with the conditions stated
|
145
147
|
in this License.</p>
|
146
|
-
</item>
|
147
|
-
</list>
|
148
148
|
</item>
|
149
149
|
<item>
|
150
150
|
<bullet>5.</bullet>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
distribution.
|
27
27
|
</item>
|
28
28
|
</list>
|
29
|
-
<p>THIS SOFTWARE IS PROVIDED BY
|
29
|
+
<p>THIS <optional>SOFTWARE</optional> IS PROVIDED BY
|
30
30
|
<alt match=".+" name="copyrightHolderAsIs">THE COPYRIGHT HOLDERS AND CONTRIBUTORS</alt> "AS IS" AND ANY
|
31
31
|
<alt match="EXPRESS(ED)?" name="express">EXPRESS</alt> OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
32
32
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
@@ -34,7 +34,7 @@
|
|
34
34
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
35
35
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
36
36
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
37
|
-
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE
|
37
|
+
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS <optional spacing="before">SOFTWARE</optional>, EVEN IF
|
38
38
|
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
39
39
|
</p>
|
40
40
|
</text>
|
@@ -6,35 +6,35 @@
|
|
6
6
|
<crossRef>https://opensource.org/licenses/BSD-3-Clause</crossRef>
|
7
7
|
<crossRef>https://www.eclipse.org/org/documents/edl-v10.php</crossRef>
|
8
8
|
</crossRefs>
|
9
|
-
<notes>Note that the Eclipse Distribution License - v 1.0 (EDL 1.0) is a match to BSD-3-Clause, even though it uses a different name.</notes>
|
9
|
+
<notes>Note for matching purposes, this license contains a number of equivalent variations, particularly in the third clause. See the XML file for more details. Also note that the Eclipse Distribution License - v 1.0 (EDL 1.0) is a match to BSD-3-Clause, even though it uses a different name.</notes>
|
10
10
|
<text>
|
11
11
|
<copyrightText>
|
12
12
|
<p>Copyright (c) <year> <owner>. </p>
|
13
13
|
</copyrightText>
|
14
|
-
|
15
|
-
|
14
|
+
<p>Redistribution and use in source and binary forms<alt match="()|( of the theme)" name="theme" spacing="none"></alt>,
|
15
|
+
with or without modification, <alt match="are|is" name="tobe">are</alt> permitted provided
|
16
16
|
that the following conditions are met:</p>
|
17
17
|
<list>
|
18
18
|
<item>
|
19
19
|
<bullet>1.</bullet>
|
20
|
-
|
20
|
+
Redistributions of <alt match="source code|works" name="code">source code</alt> must retain the <alt match="above|original" name="above">above</alt> copyright notice, this list of conditions
|
21
21
|
and the following disclaimer.
|
22
22
|
</item>
|
23
23
|
<item>
|
24
24
|
<bullet>2.</bullet>
|
25
|
-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions
|
25
|
+
Redistributions in binary form must reproduce the <alt match="above|original" name="above2">above</alt> copyright notice, this list of conditions
|
26
26
|
and the following disclaimer in the documentation and/or other materials provided with the
|
27
27
|
distribution.
|
28
28
|
</item>
|
29
29
|
<item>
|
30
30
|
<bullet>3.</bullet>
|
31
|
-
<alt match="(The name of.+may not)|(Neither the name of.+nor the names of its contributors may)" name="organizationClause3">
|
31
|
+
<alt match="(The name of.+may not)|(Neither the names? of.+nor the names of its contributors may)|( Neither the name of.+nor the names of its authors and contributors may)|(Neither the name of.+nor the names of contributors may)|(Neither the name.+nor the names of contributors may)|(The names of its contributors may not)|(The names of any contributors may not)|(The names of the contributors may not)|(None of the names of.+and any contributors may)|(Neither my name .+ nor the names of contributors to this code may)" name="organizationClause3">
|
32
32
|
Neither the name of the copyright holder nor the names of its contributors may</alt>
|
33
33
|
be used to endorse or promote products derived from this
|
34
|
-
|
34
|
+
<alt match="software|work" name="software">software</alt> without specific prior written permission.
|
35
35
|
</item>
|
36
36
|
</list>
|
37
|
-
<p>THIS SOFTWARE IS PROVIDED
|
37
|
+
<p>THIS <alt match="(SOFTWARE)|(THEME)" name="software2">SOFTWARE</alt> IS PROVIDED <alt match=".*" name="copyrightHolderAsIs">BY THE COPYRIGHT HOLDERS AND
|
38
38
|
CONTRIBUTORS</alt> "AS IS" AND ANY <alt match="EXPRESS(ED)?" name="express">EXPRESS</alt> OR IMPLIED
|
39
39
|
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
40
40
|
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <alt match=".+" name="copyrightHolderLiability">THE
|
@@ -42,7 +42,7 @@
|
|
42
42
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
43
43
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
44
44
|
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
45
|
-
OUT OF THE USE OF THIS SOFTWARE
|
45
|
+
OUT OF THE USE OF THIS <alt match="(SOFTWARE)|(THEME)" name="software3">SOFTWARE</alt>, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>
|
46
46
|
</text>
|
47
47
|
</license>
|
48
48
|
</SPDXLicenseCollection>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<SPDXLicenseCollection xmlns="http://www.spdx.org/license">
|
3
3
|
<license licenseId="GFDL-1.3" isOsiApproved="false"
|
4
4
|
name="GNU Free Documentation License v1.3"
|
5
|
-
|
5
|
+
deprecatedVersion="3.0">
|
6
6
|
<obsoletedBys>
|
7
7
|
<obsoletedBy>GFDL-1.3-only</obsoletedBy>
|
8
8
|
<obsoletedBy expression="GFDL-1.3+">GFDL-1.3-or-later</obsoletedBy>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<SPDXLicenseCollection xmlns="http://www.spdx.org/license">
|
3
3
|
<license licenseId="GPL-2.0" isOsiApproved="true"
|
4
4
|
name="GNU General Public License v2.0 only"
|
5
|
-
|
5
|
+
deprecatedVersion="3.0">
|
6
6
|
<obsoletedBys>
|
7
7
|
<obsoletedBy>GPL-2.0-only</obsoletedBy>
|
8
8
|
<obsoletedBy expression="GPL-2.0+">GPL-2.0-or-later</obsoletedBy>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<SPDXLicenseCollection xmlns="http://www.spdx.org/license">
|
3
3
|
<license licenseId="GPL-3.0" isOsiApproved="true"
|
4
4
|
name="GNU General Public License v3.0 only"
|
5
|
-
|
5
|
+
deprecatedVersion="3.0">
|
6
6
|
<obsoletedBys>
|
7
7
|
<obsoletedBy>GPL-3.0-only</obsoletedBy>
|
8
8
|
<obsoletedBy expression="GPL-3.0+">GPL-3.0-or-later</obsoletedBy>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<SPDXLicenseCollection xmlns="http://www.spdx.org/license">
|
3
3
|
<license licenseId="LGPL-2.1" isOsiApproved="true"
|
4
4
|
name="GNU Lesser General Public License v2.1 only"
|
5
|
-
|
5
|
+
deprecatedVersion="3.0">
|
6
6
|
<obsoletedBys>
|
7
7
|
<obsoletedBy>LGPL-2.1-only</obsoletedBy>
|
8
8
|
<obsoletedBy expression="LGPL-2.1+">LGPL-2.1-or-later</obsoletedBy>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<SPDXLicenseCollection xmlns="http://www.spdx.org/license">
|
3
3
|
<license licenseId="LGPL-3.0" isOsiApproved="true"
|
4
4
|
name="GNU Lesser General Public License v3.0 only"
|
5
|
-
|
5
|
+
deprecatedVersion="3.0">
|
6
6
|
<obsoletedBys>
|
7
7
|
<obsoletedBy>LGPL-3.0-only</obsoletedBy>
|
8
8
|
<obsoletedBy expression="LGPL-3.0+">LGPL-3.0-or-later</obsoletedBy>
|
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.16.
|
4
|
+
version: 9.16.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Balter
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-12-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: '4.20'
|
34
34
|
- - "<"
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: '
|
36
|
+
version: '9.0'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '4.20'
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
46
|
+
version: '9.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: reverse_markdown
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -285,7 +285,6 @@ files:
|
|
285
285
|
- lib/licensee/projects/project.rb
|
286
286
|
- lib/licensee/rule.rb
|
287
287
|
- lib/licensee/version.rb
|
288
|
-
- licensee.gemspec
|
289
288
|
- spec/bin_spec.rb
|
290
289
|
- spec/fixture_spec.rb
|
291
290
|
- spec/fixtures/agpl-3.0_markdown/LICENSE.md
|
@@ -386,12 +385,12 @@ files:
|
|
386
385
|
- spec/licensee/matchers/reference_matcher_spec.rb
|
387
386
|
- spec/licensee/matchers/spdx_matcher_spec.rb
|
388
387
|
- spec/licensee/project_files/license_file_spec.rb
|
389
|
-
- spec/licensee/project_files/
|
388
|
+
- spec/licensee/project_files/package_manager_file_spec.rb
|
390
389
|
- spec/licensee/project_files/project_file_spec.rb
|
391
390
|
- spec/licensee/project_files/readme_file_spec.rb
|
392
391
|
- spec/licensee/project_spec.rb
|
392
|
+
- spec/licensee/projects/git_hub_project_spec.rb
|
393
393
|
- spec/licensee/projects/git_project_spec.rb
|
394
|
-
- spec/licensee/projects/github_project_spec.rb
|
395
394
|
- spec/licensee/rule_spec.rb
|
396
395
|
- spec/licensee_spec.rb
|
397
396
|
- spec/spec_helper.rb
|
@@ -494,7 +493,7 @@ licenses:
|
|
494
493
|
- MIT
|
495
494
|
metadata:
|
496
495
|
rubygems_mfa_required: 'true'
|
497
|
-
post_install_message:
|
496
|
+
post_install_message:
|
498
497
|
rdoc_options: []
|
499
498
|
require_paths:
|
500
499
|
- lib
|
@@ -502,15 +501,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
502
501
|
requirements:
|
503
502
|
- - ">="
|
504
503
|
- !ruby/object:Gem::Version
|
505
|
-
version: '
|
504
|
+
version: '3.0'
|
506
505
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
507
506
|
requirements:
|
508
507
|
- - ">="
|
509
508
|
- !ruby/object:Gem::Version
|
510
509
|
version: '0'
|
511
510
|
requirements: []
|
512
|
-
rubygems_version: 3.
|
513
|
-
signing_key:
|
511
|
+
rubygems_version: 3.4.10
|
512
|
+
signing_key:
|
514
513
|
specification_version: 4
|
515
514
|
summary: A Ruby Gem to detect open source project licenses
|
516
515
|
test_files: []
|
data/licensee.gemspec
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require File.expand_path('lib/licensee/version', __dir__)
|
4
|
-
|
5
|
-
Gem::Specification.new do |gem|
|
6
|
-
gem.name = 'licensee'
|
7
|
-
gem.version = Licensee::VERSION
|
8
|
-
|
9
|
-
gem.summary = 'A Ruby Gem to detect open source project licenses'
|
10
|
-
gem.description = <<-DESC
|
11
|
-
Licensee automates the process of reading LICENSE files and
|
12
|
-
compares their contents to known licenses using a fancy maths.
|
13
|
-
DESC
|
14
|
-
|
15
|
-
gem.authors = ['Ben Balter']
|
16
|
-
gem.email = 'ben.balter@github.com'
|
17
|
-
gem.homepage = 'https://github.com/benbalter/licensee'
|
18
|
-
gem.license = 'MIT'
|
19
|
-
gem.metadata['rubygems_mfa_required'] = 'true'
|
20
|
-
|
21
|
-
gem.bindir = 'bin'
|
22
|
-
gem.executables << 'licensee'
|
23
|
-
|
24
|
-
gem.add_dependency('dotenv', '~> 2.0')
|
25
|
-
gem.add_dependency('octokit', '>= 4.20', '< 7.0')
|
26
|
-
gem.add_dependency('reverse_markdown', '>= 1', '< 3')
|
27
|
-
gem.add_dependency('rugged', '>= 0.24', '<2.0')
|
28
|
-
gem.add_dependency('thor', '>= 0.19', '< 2.0')
|
29
|
-
|
30
|
-
gem.add_development_dependency('gem-release', '~> 2.0')
|
31
|
-
gem.add_development_dependency('mustache', '>= 0.9', '< 2.0')
|
32
|
-
gem.add_development_dependency('pry', '~> 0.9')
|
33
|
-
gem.add_development_dependency('rspec', '~> 3.5')
|
34
|
-
gem.add_development_dependency('rubocop', '~> 1.0')
|
35
|
-
gem.add_development_dependency('rubocop-performance', '~> 1.5')
|
36
|
-
gem.add_development_dependency('rubocop-rspec', '~> 2.0')
|
37
|
-
gem.add_development_dependency('simplecov', '~> 0.16')
|
38
|
-
gem.add_development_dependency('webmock', '~> 3.1')
|
39
|
-
|
40
|
-
gem.required_ruby_version = '>= 2.6'
|
41
|
-
|
42
|
-
# ensure the gem is built out of versioned files
|
43
|
-
gem.files = Dir[
|
44
|
-
'{bin,lib,man,test,vendor,spec}/**/*',
|
45
|
-
'README*', 'LICENSE*'
|
46
|
-
] & `git ls-files -z`.split("\0")
|
47
|
-
end
|
File without changes
|
File without changes
|