license_finder 6.8.2 → 6.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/CONTRIBUTING.md +5 -4
  4. data/Dockerfile +20 -5
  5. data/README.md +26 -11
  6. data/Rakefile +1 -1
  7. data/VERSION +1 -1
  8. data/ci/pipelines/pull-request.yml.erb +2 -0
  9. data/ci/pipelines/release.yml.erb +3 -1
  10. data/ci/tasks/rubocop.yml +2 -0
  11. data/ci/tasks/update-changelog.yml +2 -0
  12. data/examples/Gemfile +4 -0
  13. data/examples/custom_erb_template.rb +24 -0
  14. data/examples/extract_license_data.rb +63 -0
  15. data/examples/sample_template.erb +7 -0
  16. data/lib/license_finder/cli/base.rb +8 -1
  17. data/lib/license_finder/cli/main.rb +5 -1
  18. data/lib/license_finder/configuration.rb +12 -0
  19. data/lib/license_finder/core.rb +5 -2
  20. data/lib/license_finder/decisions.rb +16 -4
  21. data/lib/license_finder/license.rb +11 -4
  22. data/lib/license_finder/package.rb +1 -0
  23. data/lib/license_finder/package_manager.rb +10 -5
  24. data/lib/license_finder/package_managers/composer.rb +8 -4
  25. data/lib/license_finder/package_managers/conda.rb +131 -0
  26. data/lib/license_finder/package_managers/dep.rb +6 -1
  27. data/lib/license_finder/package_managers/go_15vendorexperiment.rb +6 -1
  28. data/lib/license_finder/package_managers/go_dep.rb +15 -8
  29. data/lib/license_finder/package_managers/go_modules.rb +9 -2
  30. data/lib/license_finder/package_managers/npm.rb +1 -1
  31. data/lib/license_finder/package_managers/trash.rb +6 -1
  32. data/lib/license_finder/package_managers/yarn.rb +1 -1
  33. data/lib/license_finder/packages/conda_package.rb +74 -0
  34. data/lib/license_finder/report.rb +1 -0
  35. data/lib/license_finder/reports/junit_report.rb +19 -0
  36. data/lib/license_finder/reports/templates/junit_report.erb +41 -0
  37. data/lib/license_finder/scanner.rb +25 -2
  38. data/license_finder.gemspec +3 -2
  39. metadata +37 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6280c04b3b05215777ec6e3db87cdff9766dfb6d53a699142710817c09b41335
4
- data.tar.gz: 3643643ad824644d608e4e6015a34c0de2892c217efe603d7fa66ec937bdeff9
3
+ metadata.gz: 31f62a57c61b8458c29a79cd89f1a3bbabc43ae91d97a2cdb9587b7fecc4f8c0
4
+ data.tar.gz: ad37f722e0d798fe005e2e27adae55e9b85c85077387deb4320c30f976ce7bae
5
5
  SHA512:
6
- metadata.gz: fc5928a7331d5012b13a87d0fb218fe8141c561e63ba8230e453a65bd206339d9cb593724e810ecd46f7dce231ab16d466df44a119bae1a4d64f00c0518dddaa
7
- data.tar.gz: 28fbde267804e39d141ad54cd71df26693b2857870be8a5d37a84a04202f25db6398e4e8f216f302e17ecf52daf5810f3db7682712c7a9a1249fb93544ff06a3
6
+ metadata.gz: 05df4438e2faf5c8dfaa6b0b8c9019e40122ac73acb07fcfb2a18902698b03a1d81c100bf3bbf8b9ec7bca6356cffd1b089d6e3cc179ec7311cd9399d67c1cf5
7
+ data.tar.gz: 3cc7fa8bba6784884708a23725852bc1305c505bd279f4da6433e06f0da861d165bc6b77a228487c277cbec6904d36f155cda889ed8bedde2535b5ee3ed7e102
data/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ # [6.12.0] / 2021-03-05
2
+
3
+ ### Added
4
+ * Provide homepage information for GoDep and Go15Vendor package managers - [bae1bda9](https://github.com/pivotal/LicenseFinder/commit/bae1bda9d76cb922405d7efca9c67e2583db70d4) - Jeff Jun
5
+
6
+ # [6.11.0] / 2021-03-04
7
+
8
+ ### Added
9
+ * Add homepage for go_modules package manager - [912394a8](https://github.com/pivotal/LicenseFinder/commit/912394a8a6ab4c31b6918a21da9f37d5b368ed6b)
10
+
11
+ # [6.10.1] / 2021-01-08
12
+
13
+ # [6.10.0] / 2020-11-27
14
+
15
+ # [6.9.0] / 2020-10-05
16
+
17
+ ### Changed
18
+ * to recognize permitted licenses with AND in the name [#173997648] - [eab14250](https://github.com/pivotal/LicenseFinder/commit/eab14250d188153f8c2b0b5c0191fec19bcddf55) - Raymond Lee
19
+
1
20
  # [6.8.2] / 2020-09-08
2
21
 
3
22
  # [6.8.1] / 2020-08-13
@@ -915,3 +934,8 @@ Bugfixes:
915
934
  [6.8.0]: https://github.com/pivotal/LicenseFinder/compare/v6.7.0...v6.8.0
916
935
  [6.8.1]: https://github.com/pivotal/LicenseFinder/compare/v6.8.0...v6.8.1
917
936
  [6.8.2]: https://github.com/pivotal/LicenseFinder/compare/v6.8.1...v6.8.2
937
+ [6.9.0]: https://github.com/pivotal/LicenseFinder/compare/v6.8.2...v6.9.0
938
+ [6.10.0]: https://github.com/pivotal/LicenseFinder/compare/v6.9.0...v6.10.0
939
+ [6.10.1]: https://github.com/pivotal/LicenseFinder/compare/v6.10.0...v6.10.1
940
+ [6.11.0]: https://github.com/pivotal/LicenseFinder/compare/v6.10.1...v6.11.0
941
+ [6.12.0]: https://github.com/pivotal/LicenseFinder/compare/v6.11.0...v6.12.0
data/CONTRIBUTING.md CHANGED
@@ -24,8 +24,8 @@ will use the gem version installed inside the docker image.
24
24
 
25
25
  ## Useful Tips
26
26
 
27
- To build the docker image simply call `docker build .` or explicitly pass the `Dockerfile`. Prebuilt versions of the
28
- dockerfile can also be found on [Dockerhub](https://hub.docker.com/r/licensefinder/license_finder/tags/).
27
+ To build the docker image simply call `docker build .` or explicitly pass the `Dockerfile`. Prebuilt versions of the
28
+ dockerfile can also be found on [Dockerhub](https://hub.docker.com/r/licensefinder/license_finder/tags/).
29
29
 
30
30
  To launch the docker image and interact with it via bash:
31
31
  ```
@@ -60,13 +60,13 @@ submitting a pull request which adds new columns to
60
60
  `lib/license_finder/reports/csv_report.rb`.
61
61
 
62
62
  It is also possible to generate a custom report from an ERB template. Use this
63
- [example](https://gist.github.com/mainej/b190d2f138c2b9e2e20a) as a starting
63
+ [example](https://github.com/pivotal/LicenseFinder/blob/master/examples/custom_erb_template.rb) as a starting
64
64
  point. These reports will have access to the helpers in
65
65
  [`LicenseFinder::ErbReport`](https://github.com/pivotal/LicenseFinder/blob/master/lib/license_finder/reports/erb_report.rb).
66
66
 
67
67
  If you need a report with more detailed data or in a different format, we
68
68
  recommend writing a custom ruby script. This
69
- [example](https://gist.github.com/mainej/48ac616844505d50f510) will get you
69
+ [example](https://github.com/pivotal/LicenseFinder/blob/master/examples/extract_license_data.rb) will get you
70
70
  started.
71
71
 
72
72
  If you come up with something useful, consider posting it to the Google Group
@@ -91,6 +91,7 @@ To successfully run the test suite, you will need the following installed:
91
91
  - Conan
92
92
  - NuGet
93
93
  - dotnet
94
+ - Conda (requires python)
94
95
 
95
96
  The [LicenseFinder docker image](https://hub.docker.com/r/licensefinder/license_finder/) already contains these dependencies.
96
97
 
data/Dockerfile CHANGED
@@ -2,7 +2,7 @@ FROM ubuntu:xenial
2
2
 
3
3
  # Versioning
4
4
  ENV PIP_INSTALL_VERSION 19.0.2
5
- ENV PIP3_INSTALL_VERSION 8.1.1
5
+ ENV PIP3_INSTALL_VERSION 20.0.2
6
6
  ENV GO_LANG_VERSION 1.14.3
7
7
  ENV MAVEN_VERSION 3.6.0
8
8
  ENV SBT_VERSION 1.3.3
@@ -25,7 +25,7 @@ RUN apt-get update && apt-get install -y \
25
25
  RUN add-apt-repository ppa:git-core/ppa && apt-get update && apt-get install -y git
26
26
 
27
27
  # nodejs seems to be required for the one of the gems
28
- RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
28
+ RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
29
29
  apt-get -y install nodejs
30
30
 
31
31
  # install yarn
@@ -55,8 +55,8 @@ RUN curl -o rebar3 https://s3.amazonaws.com/rebar3/rebar3 && \
55
55
 
56
56
  # install and update python and python-pip
57
57
  RUN apt-get install -y python python-pip python3-pip && \
58
- pip2 install --no-cache-dir --upgrade pip==$PIP_INSTALL_VERSION && \
59
- pip3 install --no-cache-dir --upgrade pip==$PIP3_INSTALL_VERSION
58
+ python3 -m pip install pip==$PIP3_INSTALL_VERSION --upgrade && \
59
+ python -m pip install pip==$PIP_INSTALL_VERSION --upgrade --force
60
60
 
61
61
  # install maven
62
62
  RUN curl -O https://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz && \
@@ -154,16 +154,31 @@ RUN wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsof
154
154
  sudo apt-get update &&\
155
155
  sudo apt-get install -y dotnet-runtime-2.1 dotnet-sdk-2.1 dotnet-sdk-2.2 dotnet-sdk-3.0 dotnet-sdk-3.1
156
156
 
157
+ # install Composer
157
158
  RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 4F4EA0AAE5267A6C &&\
158
159
  echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/php.list &&\
159
160
  apt-get update &&\
160
161
  apt-get install -y php7.4-cli &&\
162
+ EXPECTED_COMPOSER_INSTALLER_CHECKSUM="$(curl --silent https://composer.github.io/installer.sig)" &&\
161
163
  php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" &&\
162
- php -r "if (hash_file('sha384', 'composer-setup.php') === '8a6138e2a05a8c28539c9f0fb361159823655d7ad2deecb371b04a83966c61223adc522b0189079e3e9e277cd72b8897') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" &&\
164
+ ACTUAL_COMPOSER_INSTALLER_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" &&\
165
+ test "${ACTUAL_COMPOSER_INSTALLER_CHECKSUM}" = "${EXPECTED_COMPOSER_INSTALLER_CHECKSUM}" || (echo "ERROR: Invalid installer checksum" >&2; false) &&\
163
166
  php composer-setup.php &&\
164
167
  php -r "unlink('composer-setup.php');" &&\
165
168
  mv composer.phar /usr/bin/composer
166
169
 
170
+ # install miniconda
171
+ # See https://docs.conda.io/en/latest/miniconda_hashes.html
172
+ # for latest versions and SHAs.
173
+ WORKDIR /tmp
174
+ RUN \
175
+ conda_installer=Miniconda3-py38_4.9.2-Linux-x86_64.sh &&\
176
+ ref='1314b90489f154602fd794accfc90446111514a5a72fe1f71ab83e07de9504a7' &&\
177
+ wget -q https://repo.anaconda.com/miniconda/${conda_installer} &&\
178
+ sha=`openssl sha256 "${conda_installer}" | cut -d' ' -f2` &&\
179
+ ([ "$sha" = "${ref}" ] || (echo "Verification failed: ${sha} != ${ref}"; false)) &&\
180
+ (echo; echo "yes") | sh "${conda_installer}"
181
+
167
182
  # install license_finder
168
183
  COPY . /LicenseFinder
169
184
  RUN bash -lc "cd /LicenseFinder && bundle config set no-cache 'true' && bundle install -j4 && rake install"
data/README.md CHANGED
@@ -54,6 +54,7 @@ and give you an actionable exception report.
54
54
  * Rust (via `cargo`)
55
55
  * Go Modules (via `go mod`)
56
56
  * PHP (via `composer`)
57
+ * Python (via Conda [Conda 4.8.3, Python 3.7, Bash; requires an `environment.yml` or `environment.yaml`])
57
58
 
58
59
  ## Installation
59
60
 
@@ -121,9 +122,9 @@ be useful when you need to track down an unexpected package or
121
122
  license.
122
123
 
123
124
  If you do not want to manually run an individual package manager's prepare
124
- command (ex: `bundle install`, `npm install`, etc) to ensure your project
125
+ command (ex: `bundle install`, `npm install`, etc) to ensure your project
125
126
  is fully prepared to be scanned, use the `--prepare` or `-p` option which will run
126
- each active package manager's prepare command for you. If you would like to continue
127
+ each active package manager's prepare command for you. If you would like to continue
127
128
  running `license_finder` even if there is an issue with a prepare step, use the
128
129
  `--prepare-no-fail` option which prepares but carries on despite any potential failures.
129
130
 
@@ -135,7 +136,7 @@ command.
135
136
 
136
137
  If you have docker installed, try using the included `dlf` script (potentially
137
138
  symlinked to be in your path via `ln -s LicenseFinder/dlf /usr/local/bin` or
138
- whatever method you prefer). This will run any commmands passed to it inside a
139
+ whatever method you prefer). This will run any commands passed to it inside a
139
140
  pre-provisioned Docker container to maintain consistent versions of all the
140
141
  package managers. For example,
141
142
 
@@ -156,10 +157,10 @@ You can better understand the way this script works by looking at its source, bu
156
157
  reference it will mount your current directory at the path `/scan` and run any commands
157
158
  passed to it from that directory.
158
159
 
159
- Note that the docker image will run the gem which is installed within it.
160
+ Note that the docker image will run the gem which is installed within it.
160
161
  So the docker image tagged `4.0.2` will run *License Finder Version 4.0.2*
161
162
 
162
- See the [contibuting guide](https://github.com/pivotal/LicenseFinder/blob/master/CONTRIBUTING.md) for information on development.
163
+ See the [contributing guide](https://github.com/pivotal/LicenseFinder/blob/master/CONTRIBUTING.md) for information on development.
163
164
 
164
165
  ### Activation
165
166
 
@@ -310,7 +311,7 @@ be approved. The project name at the top of the report can be set with
310
311
  `license_finder project_name add`.
311
312
 
312
313
  ### Note:
313
- When using the yarn package manager, when a node_module's package.json doesn't
314
+ When using the yarn package manager, when a node_module's package.json doesn't
314
315
  explicitly declare a license, yarn indicates that it has inferred the license based
315
316
  on some keywords in other files by appending an asterisk to the license name. If you
316
317
  see a * at the end of the license name, this is intended.
@@ -332,7 +333,7 @@ $ license_finder licenses add my_unknown_dependency MIT --homepage="www.unknown-
332
333
  ```
333
334
 
334
335
  This command would assign the MIT license to the dependency
335
- `my_unknown_dependency`. It will also set its homepage to `wwww.unknown-code.org`.
336
+ `my_unknown_dependency`. It will also set its homepage to `www.unknown-code.org`.
336
337
 
337
338
 
338
339
  ### Adding Hidden Dependencies
@@ -420,6 +421,15 @@ If you store rebar dependencies in a custom directory (by setting `deps_dir` in
420
421
  You can also invoke a custom Mix script `remix` with `--mix_command remix` and
421
422
  set `--mix_deps_dir` to fetch Mix dependencies from a custom directory.
422
423
 
424
+ ### Narrow down Package Manager
425
+
426
+ By default, license_finder will check for all supported package managers,
427
+ but you can narrow it down to use only those you pass to `--enabled-package-managers`.
428
+ For example,
429
+
430
+ ```
431
+ $ license_finder --enabled-package-managers bundler npm
432
+ ```
423
433
 
424
434
  ### Saving Configuration
425
435
 
@@ -437,6 +447,11 @@ rebar_command: './rebarw'
437
447
  rebar_deps_dir: './rebar_deps'
438
448
  mix_command: './mixw'
439
449
  mix_deps_dir: './mix_deps'
450
+ enabled_package_managers:
451
+ - bundler
452
+ - gradle
453
+ - rebar
454
+ - mix
440
455
  ```
441
456
 
442
457
  ### Gradle Projects
@@ -461,9 +476,9 @@ downloadLicenses {
461
476
  ### Conan Projects
462
477
 
463
478
  `license_finder` supports Conan. You need to have the following lines in your conanfile.txt for `license_finder` to retrieve dependencies' licenses.
464
- Ensure that `conan install` does not generate an error.
479
+ Ensure that `conan install` does not generate an error.
465
480
 
466
- ```
481
+ ```
467
482
  [imports]
468
483
  ., license* -> ./licenses @ folder=True, ignore_case=True
469
484
  ```
@@ -517,9 +532,9 @@ And save a `LICENSE` file which contains your license text in your repo.
517
532
 
518
533
  * Bundler
519
534
  * When using `--project-path`, Bundler cannot find the Gemfile.
520
-
535
+
521
536
  * Yarn
522
- * A module that is incompatible with the platform on which
537
+ * A module that is incompatible with the platform on which
523
538
  license_finder is run will always be reported to have a license type
524
539
  of "unknown". ([#456](https://github.com/pivotal/LicenseFinder/issues/456))
525
540
 
data/Rakefile CHANGED
@@ -54,7 +54,7 @@ task :update_pipeline, [:slack_url, :slack_channel] do |_, args|
54
54
  puts 'Warning: You should provide slack channel and url to receive slack notifications on build failures'
55
55
  end
56
56
 
57
- ruby_versions = %w[2.7.1 2.6.5 2.5.7 2.4.9 2.3.8 jruby-9.2.9.0]
57
+ ruby_versions = %w[2.7.1 2.6.5 2.5.7 2.4.9 2.3.8 jruby-9.2.14.0]
58
58
 
59
59
  params = []
60
60
  params << "ruby_versions=#{ruby_versions.join(',')}"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 6.8.2
1
+ 6.12.0
@@ -13,6 +13,8 @@ resource_types:
13
13
  source:
14
14
  repository: cfcommunity/slack-notification-resource
15
15
  tag: latest
16
+ username: ((LicenseFinderDocker.username))
17
+ password: ((LicenseFinderDocker.password))
16
18
  <% end %>
17
19
 
18
20
  resources:
@@ -8,6 +8,8 @@ resource_types:
8
8
  source:
9
9
  repository: cfcommunity/slack-notification-resource
10
10
  tag: latest
11
+ username: ((LicenseFinderDocker.username))
12
+ password: ((LicenseFinderDocker.password))
11
13
  <% end %>
12
14
 
13
15
  resources:
@@ -154,7 +156,7 @@ jobs:
154
156
  plan:
155
157
  - get: lf-git
156
158
  tags: ["private-worker"]
157
- passed: [<%= "#{ruby_versions.map{ |version| "ruby-#{version}"}.join(', ')}, rubocop" %>]
159
+ passed: [<%= "#{ruby_versions.map{ |version| "ruby-#{version}" unless version == "jruby-9.2.14.0" }.compact.join(', ') }, rubocop" %>]
158
160
  - get: semver-version
159
161
  tags: ["private-worker"]
160
162
  trigger: true
data/ci/tasks/rubocop.yml CHANGED
@@ -5,6 +5,8 @@ image_resource:
5
5
  source:
6
6
  repository: ruby
7
7
  tag: 2.7.1
8
+ username: ((LicenseFinderDocker.username))
9
+ password: ((LicenseFinderDocker.password))
8
10
 
9
11
  inputs:
10
12
  - name: LicenseFinder
@@ -4,6 +4,8 @@ image_resource:
4
4
  source:
5
5
  repository: brenix/alpine-bash-git-ssh
6
6
  tag: latest
7
+ username: ((LicenseFinderDocker.username))
8
+ password: ((LicenseFinderDocker.password))
7
9
  platform: linux
8
10
  inputs:
9
11
  - name: lf-git
data/examples/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+ gem 'license_finder', path: '..'
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # frozen_string_literal: true
4
+
5
+ require 'rubygems'
6
+ require 'bundler/setup'
7
+
8
+ # This is an example of how to programatically generate a report using a custom
9
+ # ERB template. Run with
10
+ # > bundle install
11
+ # > ./custom_erb_template.rb
12
+
13
+ require 'license_finder'
14
+
15
+ # See lib/license_finder/core.rb for more configuration options.
16
+ # A quiet logger is required when running reports...
17
+ lf = LicenseFinder::Core.new(LicenseFinder::Configuration.with_optional_saved_config(logger: :quiet))
18
+
19
+ # Find many more examples of complex ERB templates in
20
+ # lib/license_finder/reports/templates/
21
+ template = Pathname.new('./sample_template.erb')
22
+ print LicenseFinder::ErbReport
23
+ .new(lf.acknowledged, project_name: lf.project_name)
24
+ .to_s(template)
@@ -0,0 +1,63 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # frozen_string_literal: true
4
+
5
+ require 'rubygems'
6
+ require 'bundler/setup'
7
+
8
+ # This is an example of how to programatically extract the information that
9
+ # LicenseFinder has about packages and their licenses.
10
+ # > bundle install
11
+ # > ./extract_license_data.rb
12
+
13
+ require 'license_finder'
14
+
15
+ # See lib/license_finder/core.rb for more configuration options.
16
+ # A quiet logger is required when running reports...
17
+ lf = LicenseFinder::Core.new(LicenseFinder::Configuration.with_optional_saved_config(logger: :quiet))
18
+
19
+ # Groups of packages
20
+ lf.acknowledged # All (non-ignored) packages license_finder is tracking
21
+ lf.unapproved # The packages which have not been approved or permitted
22
+ lf.restricted # The packages which have been restricted
23
+
24
+ # Package details
25
+ lf.acknowledged.each do |package|
26
+ # Approvals
27
+ package.approved? # Whether the package has been approved manually or permitted
28
+ package.approved_manually?
29
+ package.permitted?
30
+ package.restricted?
31
+
32
+ # Licensing
33
+ # The set of licenses, each of which has a name and url, which
34
+ # license_finder will report for this package.
35
+ package.licenses
36
+ # Additional information about how these licenses were chosen
37
+ # (from decision, from spec, from files, or none-found). See
38
+ # LicenseFinder::Licensing and LicenseFinder::Activation
39
+ package.activations
40
+ # The files that look like licenses, found in the package's
41
+ # directory. Caveat: if a package's licenses were specified by a decision or
42
+ # by the package's spec, the license_files will be ignored. That means,
43
+ # package.licenses may report different licenses than those found in
44
+ # license_files.
45
+ package.license_files
46
+ package.license_files.each do |file|
47
+ # The license found in this file.
48
+ file.license
49
+ # The text of the file. Sometimes this will be an entire README file,
50
+ # because license_finder has found the phrase "is released under the
51
+ # MIT license" in it.
52
+ file.text
53
+ end
54
+ package.licensing.activations_from_decisions # If license_finder only knew about decisions, what licenses would it report?
55
+ package.licensing.activations_from_spec # If license_finder only knew about package specs, what licenses would it report?
56
+ package.licensing.activations_from_files # If license_finder only knew about package files, what licenses would it report?
57
+ package.licensing.activations_from_files.each do |activation|
58
+ # Each activation groups together all files that point to the same license.
59
+ # Each file contains its #license and #text.
60
+ activation.license
61
+ activation.files
62
+ end
63
+ end
@@ -0,0 +1,7 @@
1
+ Licenses
2
+
3
+ <%= dependencies.size %> total
4
+
5
+ <% grouped_dependencies.each do |license_name, group| -%>
6
+ * <%= group.size %> <%= license_name %>
7
+ <% end %>
@@ -11,6 +11,10 @@ module LicenseFinder
11
11
  desc: 'Where decisions are saved. Defaults to doc/dependency_decisions.yml.'
12
12
  class_option :log_directory,
13
13
  desc: 'Where logs are saved. Defaults to ./lf_logs/$PROJECT/prepare_$PACKAGE_MANAGER.log'
14
+ class_option :enabled_package_managers,
15
+ desc: 'List of package managers to be enabled. Defaults to all supported package managers.',
16
+ type: :array,
17
+ enum: LicenseFinder::Scanner.supported_package_manager_ids
14
18
 
15
19
  no_commands do
16
20
  def decisions
@@ -32,6 +36,7 @@ module LicenseFinder
32
36
  extract_options(
33
37
  :project_path,
34
38
  :decisions_file,
39
+ :enabled_package_managers,
35
40
  :go_full_version,
36
41
  :gradle_command,
37
42
  :gradle_include_groups,
@@ -53,7 +58,9 @@ module LicenseFinder
53
58
  :columns,
54
59
  :aggregate_paths,
55
60
  :recursive,
56
- :sbt_include_groups
61
+ :sbt_include_groups,
62
+ :conda_bash_setup_script,
63
+ :composer_check_require_only
57
64
  ).merge(
58
65
  logger: logger_mode
59
66
  )