license_finder 6.1.0 → 6.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +6 -0
- data/CHANGELOG.md +64 -0
- data/Dockerfile +23 -15
- data/README.md +2 -2
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/bin/license_finder_pip.py +7 -1
- data/ci/pipelines/release.yml.erb +8 -19
- data/ci/scripts/pushscript.sh +1 -1
- data/ci/scripts/updateChangelog.sh +8 -1
- data/ci/tasks/build-and-push-gem.yml +2 -2
- data/ci/tasks/rubocop.yml +1 -1
- data/ci/tasks/update-changelog.yml +2 -2
- data/lib/license_finder/cli.rb +1 -0
- data/lib/license_finder/cli/base.rb +1 -0
- data/lib/license_finder/cli/inherited_decisions.rb +32 -0
- data/lib/license_finder/cli/main.rb +3 -1
- data/lib/license_finder/configuration.rb +4 -0
- data/lib/license_finder/decision_applier.rb +8 -4
- data/lib/license_finder/decisions.rb +63 -20
- data/lib/license_finder/license/definitions.rb +26 -1
- data/lib/license_finder/license/templates/OFL.txt +91 -0
- data/lib/license_finder/license/templates/SimplifiedBSD.txt +0 -4
- data/lib/license_finder/license/templates/WTFPL.txt +14 -0
- data/lib/license_finder/license/text.rb +24 -2
- data/lib/license_finder/package.rb +2 -1
- data/lib/license_finder/package_managers/bundler.rb +5 -3
- data/lib/license_finder/package_managers/cargo.rb +2 -1
- data/lib/license_finder/package_managers/composer.rb +5 -1
- data/lib/license_finder/package_managers/dep.rb +2 -2
- data/lib/license_finder/package_managers/glide.rb +2 -7
- data/lib/license_finder/package_managers/go_15vendorexperiment.rb +1 -1
- data/lib/license_finder/package_managers/go_modules.rb +11 -4
- data/lib/license_finder/package_managers/go_workspace.rb +5 -1
- data/lib/license_finder/package_managers/gradle.rb +1 -1
- data/lib/license_finder/package_managers/maven.rb +2 -2
- data/lib/license_finder/package_managers/nuget.rb +15 -3
- data/lib/license_finder/package_managers/sbt.rb +3 -1
- data/lib/license_finder/package_managers/yarn.rb +16 -2
- data/lib/license_finder/package_utils/license_files.rb +2 -2
- data/lib/license_finder/packages/bower_package.rb +7 -0
- data/lib/license_finder/packages/bundler_package.rb +4 -0
- data/lib/license_finder/packages/cargo_package.rb +4 -0
- data/lib/license_finder/packages/cocoa_pods_package.rb +4 -0
- data/lib/license_finder/packages/composer_package.rb +4 -0
- data/lib/license_finder/packages/conan_package.rb +4 -0
- data/lib/license_finder/packages/go_package.rb +5 -1
- data/lib/license_finder/packages/gradle_package.rb +4 -0
- data/lib/license_finder/packages/maven_package.rb +6 -1
- data/lib/license_finder/packages/merged_package.rb +1 -1
- data/lib/license_finder/packages/mix_package.rb +4 -0
- data/lib/license_finder/packages/npm_package.rb +4 -0
- data/lib/license_finder/packages/nuget_package.rb +4 -0
- data/lib/license_finder/packages/pip_package.rb +4 -0
- data/lib/license_finder/packages/rebar_package.rb +4 -0
- data/lib/license_finder/packages/yarn_package.rb +4 -0
- data/lib/license_finder/reports/csv_report.rb +7 -3
- data/lib/license_finder/reports/json_report.rb +2 -0
- data/license_finder.gemspec +6 -6
- metadata +23 -26
@@ -3,6 +3,7 @@ require 'csv'
|
|
3
3
|
module LicenseFinder
|
4
4
|
class CsvReport < Report
|
5
5
|
COMMA_SEP = ','.freeze
|
6
|
+
NEWLINE_SEP = '\@NL'.freeze
|
6
7
|
AVAILABLE_COLUMNS = %w[name version authors licenses license_links approved summary description homepage install_path package_manager groups texts notice].freeze
|
7
8
|
MISSING_DEPENDENCY_TEXT = 'This package is not installed. Please install to determine licenses.'.freeze
|
8
9
|
|
@@ -10,10 +11,11 @@ module LicenseFinder
|
|
10
11
|
super
|
11
12
|
options[:columns] ||= %w[name version licenses]
|
12
13
|
@columns = Array(options[:columns]) & self.class::AVAILABLE_COLUMNS
|
14
|
+
@write_headers = options[:write_headers] || false
|
13
15
|
end
|
14
16
|
|
15
17
|
def to_s
|
16
|
-
CSV.generate(col_sep: self.class::COMMA_SEP) do |csv|
|
18
|
+
CSV.generate(col_sep: self.class::COMMA_SEP, headers: @columns, write_headers: @write_headers) do |csv|
|
17
19
|
sorted_dependencies.each do |s|
|
18
20
|
csv << format_dependency(s)
|
19
21
|
end
|
@@ -29,11 +31,13 @@ module LicenseFinder
|
|
29
31
|
end
|
30
32
|
|
31
33
|
def format_texts(dep)
|
32
|
-
dep.license_files.map { |file| file.text.split(/[\n\r]+/).join(
|
34
|
+
dep.license_files.map { |file| file.text.split(/[\n\r]+/).join(self.class::NEWLINE_SEP) }
|
35
|
+
.join(self.class::NEWLINE_SEP).force_encoding("ISO-8859-1").encode("UTF-8")
|
33
36
|
end
|
34
37
|
|
35
38
|
def format_notice(dep)
|
36
|
-
dep.notice_files.map { |file| file.text.split(/[\n\r]+/).join(
|
39
|
+
dep.notice_files.map { |file| file.text.split(/[\n\r]+/).join(self.class::NEWLINE_SEP) }
|
40
|
+
.join(self.class::NEWLINE_SEP).force_encoding("ISO-8859-1").encode("UTF-8")
|
37
41
|
end
|
38
42
|
|
39
43
|
def format_name(dep)
|
data/license_finder.gemspec
CHANGED
@@ -43,27 +43,27 @@ Gem::Specification.new do |s|
|
|
43
43
|
|
44
44
|
s.license = 'MIT'
|
45
45
|
|
46
|
-
s.add_dependency 'bundler'
|
46
|
+
s.add_dependency 'bundler'
|
47
47
|
s.add_dependency 'rubyzip', '>=1', '<3'
|
48
48
|
s.add_dependency 'thor', '~> 1.0.1'
|
49
|
-
s.add_dependency '
|
49
|
+
s.add_dependency 'tomlrb', '~> 1.3.0'
|
50
50
|
s.add_dependency 'with_env', '1.1.0'
|
51
51
|
s.add_dependency 'xml-simple', '~> 1.1.5'
|
52
52
|
|
53
53
|
s.add_development_dependency 'addressable', '2.7.0'
|
54
54
|
s.add_development_dependency 'capybara', '~> 3.15.0'
|
55
55
|
s.add_development_dependency 'cocoapods', '>= 1.0.0' if RUBY_PLATFORM =~ /darwin/
|
56
|
-
s.add_development_dependency 'fakefs', '~> 1.
|
56
|
+
s.add_development_dependency 'fakefs', '~> 1.2.0'
|
57
57
|
s.add_development_dependency 'mime-types', '3.3.1'
|
58
|
-
s.add_development_dependency 'pry', '~> 0.
|
58
|
+
s.add_development_dependency 'pry', '~> 0.13.0'
|
59
59
|
s.add_development_dependency 'rake', '~> 13.0.1'
|
60
60
|
s.add_development_dependency 'rspec', '~> 3'
|
61
61
|
s.add_development_dependency 'rspec-its', '~> 1.3.0'
|
62
|
-
s.add_development_dependency 'rubocop', '~> 0.
|
62
|
+
s.add_development_dependency 'rubocop', '~> 0.81.0'
|
63
63
|
s.add_development_dependency 'rubocop-performance', '~> 1.5.0'
|
64
64
|
s.add_development_dependency 'webmock', '~> 3.5'
|
65
65
|
|
66
|
-
s.add_development_dependency 'rack', '~> 2.
|
66
|
+
s.add_development_dependency 'rack', '~> 2.2.2'
|
67
67
|
s.add_development_dependency 'rack-test', '~> 1.1.0', '> 0.7'
|
68
68
|
|
69
69
|
s.files = `git ls-files`.split("\n").reject { |f| f.start_with?('spec', 'features') }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: license_finder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Collins
|
@@ -27,22 +27,22 @@ authors:
|
|
27
27
|
autorequire:
|
28
28
|
bindir: bin
|
29
29
|
cert_chain: []
|
30
|
-
date: 2020-
|
30
|
+
date: 2020-06-01 00:00:00.000000000 Z
|
31
31
|
dependencies:
|
32
32
|
- !ruby/object:Gem::Dependency
|
33
33
|
name: bundler
|
34
34
|
requirement: !ruby/object:Gem::Requirement
|
35
35
|
requirements:
|
36
|
-
- - "
|
36
|
+
- - ">="
|
37
37
|
- !ruby/object:Gem::Version
|
38
|
-
version:
|
38
|
+
version: '0'
|
39
39
|
type: :runtime
|
40
40
|
prerelease: false
|
41
41
|
version_requirements: !ruby/object:Gem::Requirement
|
42
42
|
requirements:
|
43
|
-
- - "
|
43
|
+
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
45
|
+
version: '0'
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: rubyzip
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,19 +78,19 @@ dependencies:
|
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: 1.0.1
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
|
-
name:
|
81
|
+
name: tomlrb
|
82
82
|
requirement: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
|
-
- -
|
84
|
+
- - "~>"
|
85
85
|
- !ruby/object:Gem::Version
|
86
|
-
version:
|
86
|
+
version: 1.3.0
|
87
87
|
type: :runtime
|
88
88
|
prerelease: false
|
89
89
|
version_requirements: !ruby/object:Gem::Requirement
|
90
90
|
requirements:
|
91
|
-
- -
|
91
|
+
- - "~>"
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version:
|
93
|
+
version: 1.3.0
|
94
94
|
- !ruby/object:Gem::Dependency
|
95
95
|
name: with_env
|
96
96
|
requirement: !ruby/object:Gem::Requirement
|
@@ -153,14 +153,14 @@ dependencies:
|
|
153
153
|
requirements:
|
154
154
|
- - "~>"
|
155
155
|
- !ruby/object:Gem::Version
|
156
|
-
version: 1.
|
156
|
+
version: 1.2.0
|
157
157
|
type: :development
|
158
158
|
prerelease: false
|
159
159
|
version_requirements: !ruby/object:Gem::Requirement
|
160
160
|
requirements:
|
161
161
|
- - "~>"
|
162
162
|
- !ruby/object:Gem::Version
|
163
|
-
version: 1.
|
163
|
+
version: 1.2.0
|
164
164
|
- !ruby/object:Gem::Dependency
|
165
165
|
name: mime-types
|
166
166
|
requirement: !ruby/object:Gem::Requirement
|
@@ -181,14 +181,14 @@ dependencies:
|
|
181
181
|
requirements:
|
182
182
|
- - "~>"
|
183
183
|
- !ruby/object:Gem::Version
|
184
|
-
version: 0.
|
184
|
+
version: 0.13.0
|
185
185
|
type: :development
|
186
186
|
prerelease: false
|
187
187
|
version_requirements: !ruby/object:Gem::Requirement
|
188
188
|
requirements:
|
189
189
|
- - "~>"
|
190
190
|
- !ruby/object:Gem::Version
|
191
|
-
version: 0.
|
191
|
+
version: 0.13.0
|
192
192
|
- !ruby/object:Gem::Dependency
|
193
193
|
name: rake
|
194
194
|
requirement: !ruby/object:Gem::Requirement
|
@@ -237,14 +237,14 @@ dependencies:
|
|
237
237
|
requirements:
|
238
238
|
- - "~>"
|
239
239
|
- !ruby/object:Gem::Version
|
240
|
-
version: 0.
|
240
|
+
version: 0.81.0
|
241
241
|
type: :development
|
242
242
|
prerelease: false
|
243
243
|
version_requirements: !ruby/object:Gem::Requirement
|
244
244
|
requirements:
|
245
245
|
- - "~>"
|
246
246
|
- !ruby/object:Gem::Version
|
247
|
-
version: 0.
|
247
|
+
version: 0.81.0
|
248
248
|
- !ruby/object:Gem::Dependency
|
249
249
|
name: rubocop-performance
|
250
250
|
requirement: !ruby/object:Gem::Requirement
|
@@ -279,20 +279,14 @@ dependencies:
|
|
279
279
|
requirements:
|
280
280
|
- - "~>"
|
281
281
|
- !ruby/object:Gem::Version
|
282
|
-
version: 2.
|
283
|
-
- - ">"
|
284
|
-
- !ruby/object:Gem::Version
|
285
|
-
version: '1.6'
|
282
|
+
version: 2.2.2
|
286
283
|
type: :development
|
287
284
|
prerelease: false
|
288
285
|
version_requirements: !ruby/object:Gem::Requirement
|
289
286
|
requirements:
|
290
287
|
- - "~>"
|
291
288
|
- !ruby/object:Gem::Version
|
292
|
-
version: 2.
|
293
|
-
- - ">"
|
294
|
-
- !ruby/object:Gem::Version
|
295
|
-
version: '1.6'
|
289
|
+
version: 2.2.2
|
296
290
|
- !ruby/object:Gem::Dependency
|
297
291
|
name: rack-test
|
298
292
|
requirement: !ruby/object:Gem::Requirement
|
@@ -364,6 +358,7 @@ files:
|
|
364
358
|
- lib/license_finder/cli/dependencies.rb
|
365
359
|
- lib/license_finder/cli/ignored_dependencies.rb
|
366
360
|
- lib/license_finder/cli/ignored_groups.rb
|
361
|
+
- lib/license_finder/cli/inherited_decisions.rb
|
367
362
|
- lib/license_finder/cli/licenses.rb
|
368
363
|
- lib/license_finder/cli/main.rb
|
369
364
|
- lib/license_finder/cli/makes_decisions.rb
|
@@ -398,9 +393,11 @@ files:
|
|
398
393
|
- lib/license_finder/license/templates/MIT.txt
|
399
394
|
- lib/license_finder/license/templates/MPL2.txt
|
400
395
|
- lib/license_finder/license/templates/NewBSD.txt
|
396
|
+
- lib/license_finder/license/templates/OFL.txt
|
401
397
|
- lib/license_finder/license/templates/Python.txt
|
402
398
|
- lib/license_finder/license/templates/Ruby.txt
|
403
399
|
- lib/license_finder/license/templates/SimplifiedBSD.txt
|
400
|
+
- lib/license_finder/license/templates/WTFPL.txt
|
404
401
|
- lib/license_finder/license/text.rb
|
405
402
|
- lib/license_finder/license_aggregator.rb
|
406
403
|
- lib/license_finder/logger.rb
|
@@ -504,7 +501,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
504
501
|
- !ruby/object:Gem::Version
|
505
502
|
version: '0'
|
506
503
|
requirements: []
|
507
|
-
rubygems_version: 3.1.
|
504
|
+
rubygems_version: 3.1.3
|
508
505
|
signing_key:
|
509
506
|
specification_version: 4
|
510
507
|
summary: Audit the OSS licenses of your application's dependencies.
|