license_finder 3.0.4 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +56 -0
- data/CHANGELOG.md +29 -2
- data/CONTRIBUTING.md +5 -1
- data/Dockerfile +33 -10
- data/Gemfile +2 -2
- data/README.md +27 -5
- data/Rakefile +15 -21
- data/ci/pipelines/pipeline.yml.erb +40 -6
- data/ci/pipelines/release.yml +11 -5
- data/ci/scripts/containerize-tests.sh +16 -0
- data/ci/scripts/run-rubocop.sh +8 -0
- data/ci/scripts/run-tests.sh +22 -0
- data/ci/scripts/test.ps1 +81 -0
- data/ci/tasks/build-windows.yml +6 -0
- data/ci/tasks/build.yml +2 -2
- data/ci/tasks/rubocop.yml +13 -0
- data/features/features/cli/cli_spec.rb +8 -8
- data/features/features/configure/add_dependencies_spec.rb +7 -7
- data/features/features/configure/approve_dependencies_spec.rb +15 -15
- data/features/features/configure/assign_licenses_spec.rb +4 -4
- data/features/features/configure/blacklist_licenses_spec.rb +3 -3
- data/features/features/configure/ignore_dependencies_spec.rb +3 -3
- data/features/features/configure/ignore_groups_spec.rb +4 -4
- data/features/features/configure/name_project_spec.rb +4 -4
- data/features/features/configure/set_project_path_spec.rb +2 -2
- data/features/features/configure/whitelist_licenses_spec.rb +4 -4
- data/features/features/package_managers/bower_spec.rb +3 -3
- data/features/features/package_managers/carthage_spec.rb +14 -0
- data/features/features/package_managers/cocoapods_spec.rb +3 -3
- data/features/features/package_managers/conan_spec.rb +11 -0
- data/features/features/package_managers/dep_spec.rb +15 -0
- data/features/features/package_managers/glide_spec.rb +14 -0
- data/features/features/package_managers/govendor_spec.rb +15 -0
- data/features/features/package_managers/gradle_spec.rb +1 -1
- data/features/features/package_managers/gvt_spec.rb +14 -0
- data/features/features/package_managers/maven_spec.rb +2 -3
- data/features/features/package_managers/mix_spec.rb +16 -0
- data/features/features/package_managers/npm_spec.rb +3 -3
- data/features/features/package_managers/nuget_spec.rb +4 -4
- data/features/features/package_managers/pip_spec.rb +2 -2
- data/features/features/package_managers/rebar_spec.rb +3 -3
- data/features/features/package_managers/yarn_spec.rb +14 -0
- data/features/features/report/composite_spec.rb +1 -1
- data/features/features/report/csv_spec.rb +3 -3
- data/features/features/report/diff_spec.rb +20 -10
- data/features/features/report/html_spec.rb +10 -10
- data/features/features/report/subproject_spec.rb +15 -4
- data/features/fixtures/Cartfile +1 -0
- data/features/fixtures/Podfile +1 -1
- data/features/fixtures/alternate-build-file-gradle/build-alt.gradle +5 -15
- data/features/fixtures/build.gradle +5 -15
- data/features/fixtures/conanfile.txt +11 -0
- data/features/fixtures/file-based-libs-gradle/build.gradle +5 -7
- data/features/fixtures/gopath_dep/src/foo-dep/Gopkg.lock +9 -0
- data/features/fixtures/gopath_dep/src/foo-dep/Gopkg.toml +7 -0
- data/features/fixtures/gopath_dep/src/foo-dep/bar/bar.go +10 -0
- data/features/fixtures/gopath_dep/src/foo-dep/foo.go +7 -0
- data/features/fixtures/gopath_glide/src/glide.lock +9 -0
- data/features/fixtures/gopath_glide/src/glide.yaml +6 -0
- data/features/fixtures/gopath_govendor/src/vendor/vendor.json +19 -0
- data/features/fixtures/gopath_gvt/src/vendor/manifest +22 -0
- data/features/fixtures/gradle-wrapper/build.gradle +5 -15
- data/features/fixtures/gradle-wrapper/gradlew +6 -1
- data/features/fixtures/gradle-wrapper/gradlew.bat +9 -1
- data/features/fixtures/mix.exs +22 -0
- data/features/fixtures/multi-module-gradle/build.gradle +7 -15
- data/features/fixtures/single-module-gradle/build.gradle +5 -15
- data/features/support/testing_dsl.rb +155 -43
- data/lib/license_finder.rb +4 -3
- data/lib/license_finder/cli.rb +0 -3
- data/lib/license_finder/cli/approvals.rb +3 -3
- data/lib/license_finder/cli/base.rb +11 -8
- data/lib/license_finder/cli/blacklist.rb +7 -7
- data/lib/license_finder/cli/dependencies.rb +8 -8
- data/lib/license_finder/cli/ignored_dependencies.rb +4 -4
- data/lib/license_finder/cli/ignored_groups.rb +4 -4
- data/lib/license_finder/cli/licenses.rb +2 -2
- data/lib/license_finder/cli/main.rb +59 -39
- data/lib/license_finder/cli/makes_decisions.rb +2 -2
- data/lib/license_finder/cli/patched_thor.rb +6 -7
- data/lib/license_finder/cli/project_name.rb +5 -6
- data/lib/license_finder/cli/whitelist.rb +7 -7
- data/lib/license_finder/configuration.rb +15 -4
- data/lib/license_finder/core.rb +20 -4
- data/lib/license_finder/decision_applier.rb +0 -1
- data/lib/license_finder/decisions.rb +12 -14
- data/lib/license_finder/diff.rb +33 -31
- data/lib/license_finder/license.rb +13 -9
- data/lib/license_finder/license/definitions.rb +55 -55
- data/lib/license_finder/license/none_matcher.rb +1 -1
- data/lib/license_finder/license/template.rb +1 -1
- data/lib/license_finder/license/text.rb +0 -1
- data/lib/license_finder/license_aggregator.rb +1 -0
- data/lib/license_finder/logger.rb +18 -61
- data/lib/license_finder/package.rb +25 -11
- data/lib/license_finder/package_delta.rb +3 -6
- data/lib/license_finder/package_manager.rb +77 -34
- data/lib/license_finder/package_managers/bower.rb +8 -8
- data/lib/license_finder/package_managers/bower_package.rb +12 -12
- data/lib/license_finder/package_managers/bundler.rb +21 -9
- data/lib/license_finder/package_managers/bundler_package.rb +1 -1
- data/lib/license_finder/package_managers/carthage.rb +66 -0
- data/lib/license_finder/package_managers/carthage_package.rb +16 -0
- data/lib/license_finder/package_managers/cocoa_pods.rb +13 -13
- data/lib/license_finder/package_managers/cocoa_pods_package.rb +1 -1
- data/lib/license_finder/package_managers/conan.rb +26 -0
- data/lib/license_finder/package_managers/conan_info_parser.rb +74 -0
- data/lib/license_finder/package_managers/conan_package.rb +17 -0
- data/lib/license_finder/package_managers/dep.rb +33 -0
- data/lib/license_finder/package_managers/glide.rb +30 -0
- data/lib/license_finder/package_managers/{go_vendor.rb → go_15vendorexperiment.rb} +19 -24
- data/lib/license_finder/package_managers/go_dep.rb +15 -12
- data/lib/license_finder/package_managers/go_package.rb +15 -13
- data/lib/license_finder/package_managers/go_workspace.rb +39 -34
- data/lib/license_finder/package_managers/govendor.rb +32 -0
- data/lib/license_finder/package_managers/gradle.rb +16 -16
- data/lib/license_finder/package_managers/gradle_package.rb +8 -8
- data/lib/license_finder/package_managers/gvt.rb +61 -0
- data/lib/license_finder/package_managers/maven.rb +17 -18
- data/lib/license_finder/package_managers/maven_package.rb +4 -6
- data/lib/license_finder/package_managers/merged_package.rb +25 -2
- data/lib/license_finder/package_managers/mix.rb +51 -0
- data/lib/license_finder/package_managers/mix_package.rb +7 -0
- data/lib/license_finder/package_managers/npm.rb +8 -32
- data/lib/license_finder/package_managers/npm_package.rb +51 -48
- data/lib/license_finder/package_managers/nuget.rb +30 -40
- data/lib/license_finder/package_managers/pip.rb +11 -11
- data/lib/license_finder/package_managers/pip_package.rb +8 -8
- data/lib/license_finder/package_managers/rebar.rb +11 -11
- data/lib/license_finder/package_managers/yarn.rb +62 -0
- data/lib/license_finder/packages/activation.rb +2 -2
- data/lib/license_finder/packages/license_files.rb +6 -6
- data/lib/license_finder/packages/licensing.rb +8 -10
- data/lib/license_finder/packages/manual_package.rb +2 -2
- data/lib/license_finder/project_finder.rb +6 -5
- data/lib/license_finder/report.rb +1 -0
- data/lib/license_finder/reports/csv_report.rb +4 -4
- data/lib/license_finder/reports/diff_report.rb +2 -2
- data/lib/license_finder/reports/erb_report.rb +2 -4
- data/lib/license_finder/reports/html_report.rb +2 -2
- data/lib/license_finder/reports/markdown_report.rb +1 -1
- data/lib/license_finder/reports/merged_report.rb +1 -1
- data/lib/license_finder/reports/text_report.rb +3 -5
- data/lib/license_finder/shared_helpers/cmd.rb +11 -0
- data/lib/license_finder/version.rb +1 -1
- data/license_finder-2.1.2.gem +0 -0
- data/license_finder.gemspec +38 -38
- metadata +84 -118
- data/ci/scripts/test.sh +0 -26
- data/ci/tasks/create-source-archives.yml +0 -23
- data/spec/dummy_app/Gemfile +0 -6
- data/spec/fixtures/all_pms/.envrc +0 -1
- data/spec/fixtures/all_pms/.nuget/.keep +0 -0
- data/spec/fixtures/all_pms/Gemfile +0 -0
- data/spec/fixtures/all_pms/Godeps/Godeps.json +0 -0
- data/spec/fixtures/all_pms/Podfile +0 -0
- data/spec/fixtures/all_pms/bower.json +0 -0
- data/spec/fixtures/all_pms/build.gradle +0 -0
- data/spec/fixtures/all_pms/package.json +0 -0
- data/spec/fixtures/all_pms/pom.xml +0 -0
- data/spec/fixtures/all_pms/rebar.config +0 -0
- data/spec/fixtures/all_pms/requirements.txt +0 -0
- data/spec/fixtures/all_pms/vendor/.gitkeep +0 -0
- data/spec/fixtures/composite/Gemfile +0 -0
- data/spec/fixtures/composite/nested_project/.envrc +0 -8
- data/spec/fixtures/composite/nested_project/src/github.com/pivotal/foo/Godeps/Godeps.json +0 -16
- data/spec/fixtures/composite/nested_project/src/github.com/pivotal/foo/Godeps/Readme +0 -5
- data/spec/fixtures/composite/nested_project/src/github.com/pivotal/foo/foo.go +0 -6
- data/spec/fixtures/composite/not_a_project/DONTREADME.md +0 -0
- data/spec/fixtures/composite/project1/Gemfile +0 -0
- data/spec/fixtures/composite/project2/package.json +0 -0
- data/spec/fixtures/config/license_finder.yml +0 -5
- data/spec/fixtures/license_directory/COPYING +0 -1
- data/spec/fixtures/license_directory/LICENSE/MIT.txt +0 -1
- data/spec/fixtures/license_directory/LICENSE/lib/unrelated.txt +0 -2
- data/spec/fixtures/license_names/COPYING.txt +0 -1
- data/spec/fixtures/license_names/LICENSE +0 -1
- data/spec/fixtures/license_names/Licence.rdoc +0 -1
- data/spec/fixtures/license_names/Mit-License +0 -1
- data/spec/fixtures/license_names/README.rdoc +0 -1
- data/spec/fixtures/nested_gem/vendor/LICENSE +0 -1
- data/spec/fixtures/npm-circular-dependencies/npm-list.json +0 -5339
- data/spec/fixtures/npm-circular-dependencies/package.json +0 -5
- data/spec/fixtures/npm-circular-licenses/npm-list.json +0 -7597
- data/spec/fixtures/npm-circular-licenses/package.json +0 -23
- data/spec/fixtures/npm-licenses-string/npm-list.json +0 -7597
- data/spec/fixtures/npm-licenses-string/package.json +0 -23
- data/spec/fixtures/npm-recursive-dependencies/npm-list.json +0 -5158
- data/spec/fixtures/npm-recursive-dependencies/package.json +0 -15
- data/spec/fixtures/npm-stack-too-deep/npm-list.json +0 -13464
- data/spec/fixtures/npm-stack-too-deep/package.json +0 -5
- data/spec/fixtures/utf8_gem/README +0 -210
- data/spec/lib/license_finder/cli/approvals_spec.rb +0 -71
- data/spec/lib/license_finder/cli/blacklist_spec.rb +0 -58
- data/spec/lib/license_finder/cli/dependencies_spec.rb +0 -73
- data/spec/lib/license_finder/cli/ignored_dependencies_spec.rb +0 -47
- data/spec/lib/license_finder/cli/ignored_groups_spec.rb +0 -40
- data/spec/lib/license_finder/cli/licenses_spec.rb +0 -60
- data/spec/lib/license_finder/cli/main_spec.rb +0 -243
- data/spec/lib/license_finder/cli/project_name_spec.rb +0 -40
- data/spec/lib/license_finder/cli/whitelist_spec.rb +0 -58
- data/spec/lib/license_finder/configuration_spec.rb +0 -115
- data/spec/lib/license_finder/core_spec.rb +0 -54
- data/spec/lib/license_finder/decision_applier_spec.rb +0 -219
- data/spec/lib/license_finder/decisions_spec.rb +0 -408
- data/spec/lib/license_finder/diff_spec.rb +0 -129
- data/spec/lib/license_finder/license/definitions_spec.rb +0 -177
- data/spec/lib/license_finder/license_aggregator_spec.rb +0 -61
- data/spec/lib/license_finder/license_spec.rb +0 -106
- data/spec/lib/license_finder/package_delta_spec.rb +0 -18
- data/spec/lib/license_finder/package_manager_spec.rb +0 -62
- data/spec/lib/license_finder/package_managers/bower_package_spec.rb +0 -71
- data/spec/lib/license_finder/package_managers/bower_spec.rb +0 -39
- data/spec/lib/license_finder/package_managers/bundler_package_spec.rb +0 -35
- data/spec/lib/license_finder/package_managers/bundler_spec.rb +0 -56
- data/spec/lib/license_finder/package_managers/cocoa_pods_package_spec.rb +0 -48
- data/spec/lib/license_finder/package_managers/cocoa_pods_spec.rb +0 -59
- data/spec/lib/license_finder/package_managers/go_dep_spec.rb +0 -126
- data/spec/lib/license_finder/package_managers/go_package_spec.rb +0 -33
- data/spec/lib/license_finder/package_managers/go_vendor_spec.rb +0 -144
- data/spec/lib/license_finder/package_managers/go_workspace_spec.rb +0 -286
- data/spec/lib/license_finder/package_managers/gradle_package_spec.rb +0 -80
- data/spec/lib/license_finder/package_managers/gradle_spec.rb +0 -180
- data/spec/lib/license_finder/package_managers/maven_package_spec.rb +0 -63
- data/spec/lib/license_finder/package_managers/maven_spec.rb +0 -128
- data/spec/lib/license_finder/package_managers/merged_package_spec.rb +0 -60
- data/spec/lib/license_finder/package_managers/npm_package_spec.rb +0 -57
- data/spec/lib/license_finder/package_managers/npm_spec.rb +0 -253
- data/spec/lib/license_finder/package_managers/nuget_package_spec.rb +0 -9
- data/spec/lib/license_finder/package_managers/nuget_spec.rb +0 -157
- data/spec/lib/license_finder/package_managers/pip_package_spec.rb +0 -87
- data/spec/lib/license_finder/package_managers/pip_spec.rb +0 -47
- data/spec/lib/license_finder/package_managers/rebar_package_spec.rb +0 -24
- data/spec/lib/license_finder/package_managers/rebar_spec.rb +0 -50
- data/spec/lib/license_finder/package_spec.rb +0 -179
- data/spec/lib/license_finder/packages/activation_spec.rb +0 -41
- data/spec/lib/license_finder/packages/license_files_spec.rb +0 -46
- data/spec/lib/license_finder/packages/licensing_spec.rb +0 -1
- data/spec/lib/license_finder/packages/possible_license_file_spec.rb +0 -38
- data/spec/lib/license_finder/project_finder_spec.rb +0 -33
- data/spec/lib/license_finder/reports/csv_report_spec.rb +0 -70
- data/spec/lib/license_finder/reports/diff_report_spec.rb +0 -56
- data/spec/lib/license_finder/reports/html_report_spec.rb +0 -101
- data/spec/lib/license_finder/reports/markdown_report_spec.rb +0 -45
- data/spec/lib/license_finder/reports/merged_report_spec.rb +0 -21
- data/spec/lib/license_finder/reports/text_report_spec.rb +0 -43
- data/spec/spec_helper.rb +0 -27
- data/spec/support/shared_examples_for_package_manager.rb +0 -52
- data/spec/support/stdout_helpers.rb +0 -31
- data/spec/support/test_fixtures.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 956d6a13cb2fb6bdcaa433ec77957db763a41d6b
|
4
|
+
data.tar.gz: 1f9a2da6f824d793b9dffb6a1e5903de465d8d13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2fb7013ff3482c23d1fba6c30aef68df057e1c61665f50907ed0f8e1151a0785430c4a233424d8c5d890f426e57234df435dec7c5e7ea70712eb21941271c17
|
7
|
+
data.tar.gz: 9805ab07f8d85a4b1d34d4a4e26b44c645e4477eef615b870692c9099233ecb072b9acc895917960ad2763c447825a059d7ee04e144a062e2231499b4006cc2a
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
#Layout Cops
|
2
|
+
IndentHeredoc:
|
3
|
+
Enabled: false
|
4
|
+
|
5
|
+
#Linting Cops
|
6
|
+
AmbiguousRegexpLiteral:
|
7
|
+
Enabled: false
|
8
|
+
|
9
|
+
# Metrics Cops
|
10
|
+
AbcSize:
|
11
|
+
Max: 30
|
12
|
+
BlockLength:
|
13
|
+
Enabled: false # TODO: enable and refactor long methods
|
14
|
+
# ExcludedMethods: ['describe', 'context', 'it', 'shared_examples'] # uncomment once enabled
|
15
|
+
ClassLength:
|
16
|
+
Enabled: false
|
17
|
+
CyclomaticComplexity:
|
18
|
+
Max: 10
|
19
|
+
PerceivedComplexity:
|
20
|
+
Max: 10
|
21
|
+
LineLength:
|
22
|
+
Max: 200
|
23
|
+
MethodLength:
|
24
|
+
Enabled: false
|
25
|
+
ModuleLength:
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
# Security Cops
|
29
|
+
YAMLLoad:
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
#Style Cops
|
33
|
+
DoubleNegation:
|
34
|
+
Enabled: false
|
35
|
+
Documentation:
|
36
|
+
Enabled: false
|
37
|
+
FileName:
|
38
|
+
Exclude:
|
39
|
+
- '**/Rakefile'
|
40
|
+
- '**/Gemfile'
|
41
|
+
- '**/Podfile'
|
42
|
+
MethodMissing:
|
43
|
+
Enabled: false
|
44
|
+
ModuleFunction:
|
45
|
+
Enabled: false
|
46
|
+
|
47
|
+
AllCops:
|
48
|
+
Include:
|
49
|
+
- 'bin/license_finder'
|
50
|
+
Exclude:
|
51
|
+
- 'lib/license_finder/reports/**/*'
|
52
|
+
- 'features/fixtures/**/*'
|
53
|
+
- 'releases/**/*'
|
54
|
+
- 'ci/**/*'
|
55
|
+
- 'tmp/**/*'
|
56
|
+
- 'Gemfile'
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,29 @@
|
|
1
|
-
# [3.0
|
1
|
+
# [3.1.0] / 2017-11-10
|
2
|
+
|
3
|
+
### Added
|
4
|
+
|
5
|
+
* Added support for [Carthage](https://github.com/Carthage/Carthage)
|
6
|
+
* Added support for [gvt](https://github.com/FiloSottile/gvt)
|
7
|
+
* Added support for [yarn](https://yarnpkg.com/en/)
|
8
|
+
* Added support for [glide](https://github.com/Masterminds/glide)
|
9
|
+
* Added support for [GoVendor](https://github.com/kardianos/govendor)
|
10
|
+
* Added support for [Dep](https://github.com/golang/dep)
|
11
|
+
* Added support for [Conan](https://conan.io/)
|
12
|
+
* Added `--prepare` option
|
13
|
+
* `--prepare`/`-p` is an option which can now be passed to the `action_items` or `report` task of `license_finder`
|
14
|
+
* `prepare` will indicate to License Finder that it should attempt to prepare the project before running in a License scan.
|
15
|
+
|
16
|
+
### Changed
|
17
|
+
|
18
|
+
* Upgrade `Gradle` in Dockerfile
|
19
|
+
* Clean up some CLI interaction and documentation
|
20
|
+
|
21
|
+
### Fixed
|
22
|
+
|
23
|
+
* `build-essential` was added back into the Dockerfile after accidentally being removed
|
24
|
+
* Ignore leading prefixes such as 'The' when looking for licenses
|
25
|
+
|
26
|
+
# [3.0.4] / 2017-09-14
|
2
27
|
|
3
28
|
### Added
|
4
29
|
* Added concourse pipeline file for Docker image process (#335, #337)
|
@@ -461,7 +486,9 @@ Bugfixes:
|
|
461
486
|
* Fix blow up if there's not `ignore_groups` setting in the config file.
|
462
487
|
|
463
488
|
|
464
|
-
[Unreleased]: https://github.com/pivotal/LicenseFinder/compare/v3.0.
|
489
|
+
[Unreleased]: https://github.com/pivotal/LicenseFinder/compare/v3.0.4...HEAD
|
490
|
+
[3.1.0]: https://github.com/pivotal/LicenseFinder/compare/v3.0.4...v3.1.0
|
491
|
+
[3.0.4]: https://github.com/pivotal/LicenseFinder/compare/v3.0.2...v3.0.4
|
465
492
|
[3.0.2]: https://github.com/pivotal/LicenseFinder/compare/v3.0.1...v3.0.2
|
466
493
|
[3.0.1]: https://github.com/pivotal/LicenseFinder/compare/v3.0.0...v3.0.1
|
467
494
|
[3.0.0]: https://github.com/pivotal/LicenseFinder/compare/v2.1.2...v3.0.0
|
data/CONTRIBUTING.md
CHANGED
@@ -59,14 +59,18 @@ If you come up with something useful, consider posting it to the Google Group
|
|
59
59
|
|
60
60
|
To successfully run the test suite, you will need the following installed:
|
61
61
|
- NPM (requires Node)
|
62
|
+
- Yarn (requires Node)
|
62
63
|
- Bower (requires Node and NPM)
|
63
64
|
- Maven (requires Java)
|
64
65
|
- Gradle (requires Java)
|
65
66
|
- Pip (requires python)
|
66
67
|
- Rebar (requires erlang)
|
67
|
-
- GoDep, GoWorkspace, and
|
68
|
+
- GoDep, GoWorkspace, govendor, Glide, Dep, and Gvt (requires golang)
|
68
69
|
- CocoaPods (requires ruby)
|
69
70
|
- Bundler (requires ruby)
|
71
|
+
- Carthage (requires homebrew)
|
72
|
+
- Mix (requires Elixir)
|
73
|
+
- Conan
|
70
74
|
|
71
75
|
The [LicenseFinder docker image](https://hub.docker.com/r/licensefinder/license_finder/) already contains these dependencies.
|
72
76
|
|
data/Dockerfile
CHANGED
@@ -1,10 +1,16 @@
|
|
1
1
|
FROM ubuntu:trusty
|
2
|
-
RUN apt-get update && apt-get install -y curl git-core wget unzip
|
2
|
+
RUN apt-get update && apt-get install -y curl git-core build-essential wget unzip
|
3
3
|
|
4
4
|
# nodejs seems to be required for the one of the gems
|
5
5
|
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
|
6
6
|
apt-get -y install nodejs
|
7
7
|
|
8
|
+
# install yarn
|
9
|
+
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - && \
|
10
|
+
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list && \
|
11
|
+
apt-get update && \
|
12
|
+
apt-get install yarn
|
13
|
+
|
8
14
|
# install bower
|
9
15
|
RUN npm install -g bower && \
|
10
16
|
echo '{ "allow_root": true }' > /root/.bowerrc
|
@@ -34,17 +40,17 @@ RUN apt-get install -y python-pip && \
|
|
34
40
|
pip install --upgrade pip
|
35
41
|
|
36
42
|
# install maven
|
37
|
-
RUN curl -O http://www-us.apache.org/dist/maven/maven-3/3.5.
|
38
|
-
tar -xf apache-maven-3.5.
|
39
|
-
mv apache-maven-3.5.
|
43
|
+
RUN curl -O http://www-us.apache.org/dist/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz && \
|
44
|
+
tar -xf apache-maven-3.5.2-bin.tar.gz; rm -rf apache-maven-3.5.2-bin.tar.gz && \
|
45
|
+
mv apache-maven-3.5.2 /usr/local/lib/maven && \
|
40
46
|
ln -s /usr/local/lib/maven/bin/mvn /usr/local/bin/mvn
|
41
47
|
|
42
48
|
# install gradle
|
43
49
|
WORKDIR /tmp
|
44
|
-
RUN curl -L -o gradle.zip http://services.gradle.org/distributions/gradle-2
|
50
|
+
RUN curl -L -o gradle.zip http://services.gradle.org/distributions/gradle-4.2-bin.zip && \
|
45
51
|
unzip -q gradle.zip && \
|
46
52
|
rm gradle.zip && \
|
47
|
-
mv gradle-2
|
53
|
+
mv gradle-4.2 /root/gradle
|
48
54
|
ENV PATH=/root/gradle/bin:$PATH
|
49
55
|
|
50
56
|
#install go
|
@@ -57,7 +63,12 @@ ENV PATH=$PATH:/go/bin
|
|
57
63
|
ENV GOROOT=/go
|
58
64
|
ENV GOPATH=/gopath
|
59
65
|
ENV PATH=$PATH:$GOPATH/bin
|
60
|
-
RUN mkdir /gopath &&
|
66
|
+
RUN mkdir /gopath && \
|
67
|
+
go get github.com/tools/godep && \
|
68
|
+
go get github.com/FiloSottile/gvt && \
|
69
|
+
go get github.com/Masterminds/glide && \
|
70
|
+
go get github.com/kardianos/govendor && \
|
71
|
+
go get github.com/golang/dep/cmd/dep
|
61
72
|
|
62
73
|
# Fix the locale
|
63
74
|
RUN locale-gen en_US.UTF-8
|
@@ -66,14 +77,26 @@ ENV LANGUAGE=en_US:en
|
|
66
77
|
ENV LC_ALL=en_US.UTF-8
|
67
78
|
|
68
79
|
#install rvm
|
69
|
-
RUN gpg --keyserver hkp://
|
80
|
+
RUN gpg --keyserver hkp://pgp.mit.edu --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 && \
|
70
81
|
curl -sSL https://raw.githubusercontent.com/wayneeseguin/rvm/stable/binscripts/rvm-installer | sudo bash -s stable --ruby=2.4.1
|
71
82
|
ENV PATH=/usr/local/rvm/bin:$PATH
|
72
83
|
|
84
|
+
#install mix
|
85
|
+
RUN wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && \
|
86
|
+
sudo dpkg -i erlang-solutions_1.0_all.deb && \
|
87
|
+
sudo apt-get update && \
|
88
|
+
sudo apt-get install -y esl-erlang && \
|
89
|
+
sudo apt-get install -y elixir
|
90
|
+
|
73
91
|
# install bundler
|
74
|
-
RUN bash -lc "
|
92
|
+
RUN bash -lc "gem update --system && gem install bundler"
|
93
|
+
|
94
|
+
# install conan
|
95
|
+
RUN apt-get install -y python-dev && \
|
96
|
+
pip install conan
|
75
97
|
|
76
98
|
# install license_finder
|
77
|
-
|
99
|
+
COPY . /LicenseFinder
|
100
|
+
RUN bash -lc "cd /LicenseFinder && bundle install -j4 && rake install"
|
78
101
|
|
79
102
|
WORKDIR /
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -37,12 +37,17 @@ report.
|
|
37
37
|
| Go workspace (via a `.envrc` file) | Go lang | 1.8.3 |
|
38
38
|
| Go submodules | Go lang | 1.8.3 |
|
39
39
|
| Java | maven | 3.5.0 |
|
40
|
-
| Java | gradle | 2
|
40
|
+
| Java | gradle | 4.2 |
|
41
41
|
|
42
42
|
### Experimental project types
|
43
43
|
|
44
44
|
* Erlang (via `rebar`)
|
45
|
+
* Objective-C, Swift (via Carthage or CocoaPods \[0.39 and below. See [CocoaPods Specs Repo Sharding](http://blog.cocoapods.org/Sharding/)\])
|
45
46
|
* Objective-C (+ CocoaPods 0.39 and below. See [CocoaPods Specs Repo Sharding](http://blog.cocoapods.org/Sharding/))
|
47
|
+
* Elixir (via `mix`)
|
48
|
+
* Golang (via `gvt`, `glide`,`dep`, and `govendor`)
|
49
|
+
* JavaScript (via `yarn`)
|
50
|
+
* C++/C (via `conan`)
|
46
51
|
|
47
52
|
## Installation
|
48
53
|
|
@@ -151,8 +156,16 @@ languages, as long as that language has a package definition in the project dire
|
|
151
156
|
* `settings.gradle` that specifies `rootProject.buildFileName` (for `gradle`)
|
152
157
|
* `bower.json` (for `bower`)
|
153
158
|
* `Podfile` (for CocoaPods)
|
159
|
+
* `Cartfile` (for Carthage)
|
154
160
|
* `rebar.config` (for `rebar`)
|
161
|
+
* `mix.exs` (for `mix`)
|
155
162
|
* `packages/` directory (for `Nuget`)
|
163
|
+
* `vendor/manifest` or `*/vendor/manifest` file (for `gvt`)
|
164
|
+
* `glide.lock` file (for `glide`)
|
165
|
+
* `vendor/vendor.json` file (for `govendor`)
|
166
|
+
* `Gopkg.lock` file (for `dep`)
|
167
|
+
* `yarn.lock` file (for `yarn`)
|
168
|
+
* `conanfile.txt` file (for `conan`)
|
156
169
|
|
157
170
|
|
158
171
|
### Continuous Integration
|
@@ -336,11 +349,14 @@ If you have a gradle project, you can invoke gradle with a custom script by
|
|
336
349
|
passing (for example) `--gradle_command gradlew` to `license_finder` or
|
337
350
|
`license_finder report`.
|
338
351
|
|
339
|
-
|
340
352
|
Similarly you can invoke a custom rebar script with `--rebar_command rebar2`.
|
341
353
|
If you store rebar dependencies in a custom directory (by setting `deps_dir` in
|
342
354
|
`rebar.config`), set `--rebar_deps_dir`.
|
343
355
|
|
356
|
+
You can also invoke a custom Mix script `remix` with `--mix_command remix` and
|
357
|
+
set `--mix_deps_dir` to fetch Mix dependencies from a custom directory.
|
358
|
+
|
359
|
+
|
344
360
|
### Saving Configuration
|
345
361
|
|
346
362
|
It may be difficult to remember to pass command line options to every command.
|
@@ -355,6 +371,8 @@ decisions_file: './some_path/decisions.yml'
|
|
355
371
|
gradle_command: './gradlew'
|
356
372
|
rebar_command: './rebarw'
|
357
373
|
rebar_deps_dir: './rebar_deps'
|
374
|
+
mix_command: './mixw'
|
375
|
+
mix_deps_dir: './mix_deps'
|
358
376
|
```
|
359
377
|
|
360
378
|
### Gradle Projects
|
@@ -376,11 +394,15 @@ downloadLicenses {
|
|
376
394
|
}
|
377
395
|
```
|
378
396
|
|
397
|
+
### Conan rojects
|
379
398
|
|
380
|
-
|
381
|
-
|
382
|
-
`license_finder` supports Maven.
|
399
|
+
`license_finder` supports Conan. You need to have the following lines in your conanfile.txt for `license_finder` to retrieve dependencies' licenses.
|
400
|
+
Ensure that `conan install` does not generate an error.
|
383
401
|
|
402
|
+
```
|
403
|
+
[imports]
|
404
|
+
., license* -> ./licenses @ folder=True, ignore_case=True
|
405
|
+
```
|
384
406
|
|
385
407
|
## Requirements
|
386
408
|
|
data/Rakefile
CHANGED
@@ -4,55 +4,50 @@ Bundler::GemHelper.install_tasks
|
|
4
4
|
require './lib/license_finder/platform'
|
5
5
|
require 'rspec/core/rake_task'
|
6
6
|
|
7
|
-
desc
|
7
|
+
desc 'Run all specs in spec/'
|
8
8
|
task :spec do
|
9
9
|
RSpec::Core::RakeTask.new(:spec) do |t|
|
10
10
|
t.fail_on_error = true
|
11
|
-
t.pattern =
|
11
|
+
t.pattern = './spec/**/*_spec.rb'
|
12
12
|
t.rspec_opts = %w[--color]
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
16
|
-
desc
|
17
|
-
RSpec::Core::RakeTask.new(
|
16
|
+
desc 'Only run cocoapods specs'
|
17
|
+
RSpec::Core::RakeTask.new('spec:cocoapods') do |t|
|
18
18
|
t.fail_on_error = true
|
19
|
-
t.pattern =
|
19
|
+
t.pattern = './spec/lib/license_finder/package_managers/cocoa_pods_*spec.rb'
|
20
20
|
t.rspec_opts = %w[--color]
|
21
21
|
end
|
22
22
|
|
23
|
-
desc
|
23
|
+
desc 'Run all specs in features/'
|
24
24
|
task :features do
|
25
25
|
RSpec::Core::RakeTask.new(:features) do |t|
|
26
26
|
t.fail_on_error = true
|
27
|
-
t.pattern =
|
27
|
+
t.pattern = './features/**/*_spec.rb'
|
28
28
|
opts = %w[--color --format d]
|
29
29
|
opts += LicenseFinder::Platform.darwin? ? [] : %w[--tag ~ios]
|
30
30
|
t.rspec_opts = opts
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
-
desc
|
34
|
+
desc 'Check for non-Ruby development dependencies.'
|
35
35
|
task :check_dependencies do
|
36
36
|
require './lib/license_finder'
|
37
37
|
satisfied = true
|
38
38
|
LicenseFinder::PackageManager.package_managers.each do |package_manager|
|
39
|
-
satisfied = false unless package_manager.installed?(LicenseFinder::Logger.new(debug:true))
|
39
|
+
satisfied = false unless package_manager.installed?(LicenseFinder::Logger.new(debug: true))
|
40
40
|
end
|
41
41
|
STDOUT.flush
|
42
42
|
exit 1 unless satisfied
|
43
43
|
end
|
44
44
|
|
45
|
-
desc
|
46
|
-
task :update_pipeline, [:slack_url, :slack_channel
|
47
|
-
access_token = args[:github_access_token]
|
45
|
+
desc 'Configure ci pipeline'
|
46
|
+
task :update_pipeline, [:slack_url, :slack_channel] do |_, args|
|
48
47
|
slack_url = args[:slack_url]
|
49
48
|
slack_channel = args[:slack_channel]
|
50
49
|
|
51
|
-
unless
|
52
|
-
puts 'Warning: You should provide a Github access token with repo:status permission if you want to avoid rate limiting'
|
53
|
-
end
|
54
|
-
|
55
|
-
if !(slack_url || slack_channel)
|
50
|
+
unless slack_url || slack_channel
|
56
51
|
puts 'Warning: skipping slack notifications setup'
|
57
52
|
puts 'Warning: You should provide slack channel and url to receive slack notifications on build failures'
|
58
53
|
end
|
@@ -60,7 +55,6 @@ task :update_pipeline, [:slack_url, :slack_channel, :github_access_token] do |_,
|
|
60
55
|
params = []
|
61
56
|
params << "slack_url=#{slack_url}" if slack_url
|
62
57
|
params << "slack_channel=#{slack_channel}" if slack_channel
|
63
|
-
params << "github_access_token=#{access_token}" if access_token
|
64
58
|
|
65
59
|
vars = params.join(' ')
|
66
60
|
cmd = "bash -c \"fly -t osl set-pipeline -n -p LicenseFinder --config <(erb #{vars} ci/pipelines/pipeline.yml.erb)\""
|
@@ -68,7 +62,7 @@ task :update_pipeline, [:slack_url, :slack_channel, :github_access_token] do |_,
|
|
68
62
|
system(cmd)
|
69
63
|
end
|
70
64
|
|
71
|
-
task :
|
72
|
-
task :
|
65
|
+
task spec: :check_dependencies
|
66
|
+
task features: :check_dependencies
|
73
67
|
|
74
|
-
task :
|
68
|
+
task default: %i[spec features]
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<% setup_slack = defined?(slack_url) && defined?(slack_channel) %>
|
2
|
+
<% ruby_versions = %w(2.4.1 2.3.0 2.2.0 2.1.5 jruby-9.0.4.0) %>
|
2
3
|
|
3
4
|
resource_types:
|
4
5
|
- name: pull-request
|
@@ -24,9 +25,8 @@ resources:
|
|
24
25
|
source:
|
25
26
|
repo: pivotal/LicenseFinder
|
26
27
|
base: master
|
27
|
-
|
28
|
-
|
29
|
-
<% end %>
|
28
|
+
access_token: ((GithubApiTokenLicenseFinder))
|
29
|
+
|
30
30
|
<% if setup_slack %>
|
31
31
|
- name: slack-alert
|
32
32
|
type: slack-notification
|
@@ -35,13 +35,14 @@ resources:
|
|
35
35
|
<% end %>
|
36
36
|
|
37
37
|
jobs:
|
38
|
-
<%
|
38
|
+
<% ruby_versions.each do |ruby_version| %>
|
39
39
|
- name: ruby-<%= ruby_version %>
|
40
40
|
public: true
|
41
41
|
plan:
|
42
42
|
- get: LicenseFinder
|
43
43
|
trigger: true
|
44
44
|
- task: ruby-<%= ruby_version %>
|
45
|
+
privileged: true
|
45
46
|
file: LicenseFinder/ci/tasks/build.yml
|
46
47
|
params:
|
47
48
|
RUBY_VERSION_UNDER_TEST: <%= ruby_version %>
|
@@ -55,14 +56,24 @@ jobs:
|
|
55
56
|
<% end %>
|
56
57
|
<% end %>
|
57
58
|
|
58
|
-
<%
|
59
|
-
|
59
|
+
<% if setup_slack %>
|
60
|
+
on_failure:
|
61
|
+
put: slack-alert
|
62
|
+
params:
|
63
|
+
channel: '<%= slack_channel %>'
|
64
|
+
icon_emoji: ':crying_cat_face:'
|
65
|
+
text: '<%= "License Finder build failed. Build: https://osl.ci.cf-app.com/teams/main/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME" %>'
|
66
|
+
<% end %>
|
67
|
+
|
68
|
+
<% ruby_versions.each do |ruby_version| %>
|
69
|
+
- name: PR-ruby-<%= ruby_version %>-linux
|
60
70
|
public: true
|
61
71
|
plan:
|
62
72
|
- get: pull-request
|
63
73
|
trigger: true
|
64
74
|
version: every
|
65
75
|
- task: ruby-<%= ruby_version %>
|
76
|
+
privileged: true
|
66
77
|
file: pull-request/ci/tasks/build.yml
|
67
78
|
params:
|
68
79
|
RUBY_VERSION_UNDER_TEST: <%= ruby_version %>
|
@@ -88,3 +99,26 @@ jobs:
|
|
88
99
|
text: '<%= "License Finder build failed. Build: https://osl.ci.cf-app.com/teams/main/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME" %>'
|
89
100
|
<% end %>
|
90
101
|
<% end %>
|
102
|
+
|
103
|
+
- name: PR-rubocop
|
104
|
+
public: true
|
105
|
+
plan:
|
106
|
+
- get: pull-request
|
107
|
+
trigger: true
|
108
|
+
version: every
|
109
|
+
- task: run-rubocop
|
110
|
+
privileged: true
|
111
|
+
file: pull-request/ci/tasks/rubocop.yml
|
112
|
+
input_mapping: { LicenseFinder: pull-request }
|
113
|
+
on_success:
|
114
|
+
put: pull-request
|
115
|
+
params:
|
116
|
+
path: pull-request
|
117
|
+
status: success
|
118
|
+
context: run-rubocop
|
119
|
+
on_failure:
|
120
|
+
put: pull-request
|
121
|
+
params:
|
122
|
+
path: pull-request
|
123
|
+
status: failure
|
124
|
+
context: run-rubocop
|