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
@@ -1,6 +1,6 @@
|
|
1
1
|
require_relative '../../support/feature_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe 'Ignored Dependencies' do
|
4
4
|
# As a developer
|
5
5
|
# I want to ignore certain dependencies
|
6
6
|
# To avoid frequently changing reports about dependencies I know will always be approved
|
@@ -12,7 +12,7 @@ describe "Ignored Dependencies" do
|
|
12
12
|
developer.execute_command 'license_finder dependencies add ignored_dep Whatever'
|
13
13
|
end
|
14
14
|
|
15
|
-
specify
|
15
|
+
specify 'are excluded from reports' do
|
16
16
|
developer.execute_command 'license_finder ignored_dependencies add ignored_dep'
|
17
17
|
|
18
18
|
developer.run_license_finder
|
@@ -21,7 +21,7 @@ describe "Ignored Dependencies" do
|
|
21
21
|
expect(developer).to_not be_seeing 'ignored_dep'
|
22
22
|
end
|
23
23
|
|
24
|
-
specify
|
24
|
+
specify 'appear in the CLI' do
|
25
25
|
developer.execute_command 'license_finder ignored_dependencies add ignored_dep'
|
26
26
|
expect(developer).to be_seeing 'ignored_dep'
|
27
27
|
|
@@ -1,14 +1,14 @@
|
|
1
1
|
require_relative '../../support/feature_helper'
|
2
2
|
require 'bundler'
|
3
3
|
|
4
|
-
describe
|
4
|
+
describe 'Ignored Groups' do
|
5
5
|
# As a developer
|
6
6
|
# I want to ignore certain groups
|
7
7
|
# So that license_finder skips any gems I use in development, or for testing
|
8
8
|
|
9
9
|
let(:developer) { LicenseFinder::TestingDSL::User.new }
|
10
10
|
|
11
|
-
specify
|
11
|
+
specify 'are excluded from reports' do
|
12
12
|
project = developer.create_ruby_app
|
13
13
|
gem = developer.create_gem 'dev_gem', license: 'GPL'
|
14
14
|
project.depend_on gem, groups: ['dev']
|
@@ -18,7 +18,7 @@ describe "Ignored Groups" do
|
|
18
18
|
expect(developer).to_not be_seeing 'dev_gem'
|
19
19
|
end
|
20
20
|
|
21
|
-
specify
|
21
|
+
specify 'and their dependencies are excluded from reports' do
|
22
22
|
project = developer.create_ruby_app
|
23
23
|
gem = developer.create_gem 'dev_gem', license: 'GPL', dependencies: 'jwt'
|
24
24
|
|
@@ -32,7 +32,7 @@ describe "Ignored Groups" do
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
-
specify
|
35
|
+
specify 'appear in the CLI' do
|
36
36
|
developer.create_empty_project
|
37
37
|
developer.execute_command 'license_finder ignored_group add dev'
|
38
38
|
expect(developer).to be_seeing 'dev'
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require_relative '../../support/feature_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe 'Project name' do
|
4
4
|
# As a developer
|
5
5
|
# I want to assign a name for my project
|
6
6
|
# So that product owners see it in the reports
|
@@ -10,17 +10,17 @@ describe "Project name" do
|
|
10
10
|
|
11
11
|
before { developer.create_empty_project }
|
12
12
|
|
13
|
-
specify
|
13
|
+
specify 'appears in the HTML report' do
|
14
14
|
developer.execute_command 'license_finder project_name add changed_name'
|
15
15
|
|
16
16
|
expect(product_owner.view_html).to be_titled 'changed_name'
|
17
17
|
end
|
18
18
|
|
19
|
-
specify
|
19
|
+
specify 'defaults to the directory name' do
|
20
20
|
expect(product_owner.view_html).to be_titled 'my_app'
|
21
21
|
end
|
22
22
|
|
23
|
-
specify
|
23
|
+
specify 'appears in the CLI' do
|
24
24
|
developer.execute_command 'license_finder project_name add my_proj'
|
25
25
|
expect(developer).to be_seeing 'my_proj'
|
26
26
|
developer.execute_command 'license_finder project_name show'
|
@@ -1,13 +1,13 @@
|
|
1
1
|
require_relative '../../support/feature_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe 'Project path' do
|
4
4
|
# As a developer
|
5
5
|
# I want to set a project path
|
6
6
|
# So that I can run license finder in a different Bundle environment to the project.
|
7
7
|
|
8
8
|
let(:developer) { LicenseFinder::TestingDSL::User.new }
|
9
9
|
|
10
|
-
specify
|
10
|
+
specify 'can be overridden on the command line' do
|
11
11
|
project = developer.create_ruby_app
|
12
12
|
gem = developer.create_gem 'mitlicensed_dep', license: 'MIT', version: '1.2.3'
|
13
13
|
project.depend_on gem
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require_relative '../../support/feature_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe 'Whitelisted licenses' do
|
4
4
|
# As a developer
|
5
5
|
# I want to whitelist certain licenses that my business has pre-approved
|
6
6
|
# So that any dependencies with those licenses do not show up as action items
|
@@ -9,7 +9,7 @@ describe "Whitelisted licenses" do
|
|
9
9
|
|
10
10
|
before { developer.create_empty_project }
|
11
11
|
|
12
|
-
specify
|
12
|
+
specify 'approve dependencies with those licenses' do
|
13
13
|
developer.execute_command 'license_finder dependencies add bsd_gem BSD'
|
14
14
|
developer.execute_command 'license_finder whitelist add BSD'
|
15
15
|
|
@@ -17,7 +17,7 @@ describe "Whitelisted licenses" do
|
|
17
17
|
expect(developer).to_not be_seeing 'bsd_gem'
|
18
18
|
end
|
19
19
|
|
20
|
-
specify
|
20
|
+
specify 'approve dependencies with any of those licenses' do
|
21
21
|
developer.execute_command 'license_finder dependencies add dep_with_many_licenses GPL'
|
22
22
|
developer.execute_command 'license_finder licenses add dep_with_many_licenses MIT'
|
23
23
|
developer.execute_command 'license_finder whitelist add GPL'
|
@@ -26,7 +26,7 @@ describe "Whitelisted licenses" do
|
|
26
26
|
expect(developer).not_to be_seeing 'dep_with_many_licenses'
|
27
27
|
end
|
28
28
|
|
29
|
-
specify
|
29
|
+
specify 'are shown in the CLI' do
|
30
30
|
developer.execute_command 'license_finder whitelist add Expat'
|
31
31
|
developer.execute_command 'license_finder whitelist list'
|
32
32
|
expect(developer).to be_seeing 'MIT'
|
@@ -1,14 +1,14 @@
|
|
1
1
|
require_relative '../../support/feature_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe 'Bower Dependencies' do
|
4
4
|
# As a JS developer
|
5
5
|
# I want to be able to manage Bower dependencies
|
6
6
|
|
7
7
|
let(:js_developer) { LicenseFinder::TestingDSL::User.new }
|
8
8
|
|
9
|
-
specify
|
9
|
+
specify 'are shown in reports' do
|
10
10
|
LicenseFinder::TestingDSL::BowerProject.create
|
11
11
|
js_developer.run_license_finder
|
12
|
-
expect(js_developer).to be_seeing_line
|
12
|
+
expect(js_developer).to be_seeing_line 'gmaps, 0.2.30, MIT'
|
13
13
|
end
|
14
14
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require_relative '../../support/feature_helper'
|
2
|
+
|
3
|
+
describe 'Carthage Dependencies', ios: true do
|
4
|
+
# As a developer on Apple platforms
|
5
|
+
# I want to be able to manage Carthage dependencies
|
6
|
+
|
7
|
+
let(:apple_platform_developer) { LicenseFinder::TestingDSL::User.new }
|
8
|
+
|
9
|
+
specify 'are shown in reports' do
|
10
|
+
LicenseFinder::TestingDSL::CarthageProject.create
|
11
|
+
apple_platform_developer.run_license_finder
|
12
|
+
expect(apple_platform_developer).to be_seeing_line 'DSWaveformImage, 1.1.2, MIT'
|
13
|
+
end
|
14
|
+
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
require_relative '../../support/feature_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe 'CocoaPods Dependencies', ios: true do
|
4
4
|
# As a Cocoa developer
|
5
5
|
# I want to be able to manage CocoaPods dependencies
|
6
6
|
|
7
7
|
let(:cocoa_developer) { LicenseFinder::TestingDSL::User.new }
|
8
8
|
|
9
|
-
specify
|
9
|
+
specify 'are shown in reports' do
|
10
10
|
LicenseFinder::TestingDSL::CocoaPodsProject.create
|
11
11
|
cocoa_developer.run_license_finder
|
12
|
-
expect(cocoa_developer).to be_seeing_line
|
12
|
+
expect(cocoa_developer).to be_seeing_line 'ABTest, 0.0.5, MIT'
|
13
13
|
end
|
14
14
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require_relative '../../support/feature_helper'
|
2
|
+
|
3
|
+
describe 'Conan Dependencies' do
|
4
|
+
let(:conan_developer) { LicenseFinder::TestingDSL::User.new }
|
5
|
+
|
6
|
+
specify 'are shown in reports for a project' do
|
7
|
+
LicenseFinder::TestingDSL::ConanProject.create
|
8
|
+
conan_developer.run_license_finder
|
9
|
+
expect(conan_developer).to be_seeing_line 'range-v3, 0.3.0, MIT'
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require_relative '../../support/feature_helper'
|
2
|
+
|
3
|
+
describe 'Dep Dependencies' do
|
4
|
+
let(:go_developer) { LicenseFinder::TestingDSL::User.new }
|
5
|
+
|
6
|
+
specify 'are shown in reports for a project' do
|
7
|
+
project = LicenseFinder::TestingDSL::DepProject.create
|
8
|
+
ENV['GOPATH'] = "#{project.project_dir}/gopath_dep"
|
9
|
+
|
10
|
+
go_developer.run_license_finder('gopath_dep/src/foo-dep')
|
11
|
+
|
12
|
+
expect(go_developer).to be_seeing_line 'github.com/Bowery/prompt, 0f1139e9a1c74b57ccce6bdb3cd2f7cd04dd3449, MIT'
|
13
|
+
expect(go_developer).to be_seeing_line 'github.com/dchest/safefile, 855e8d98f1852d48dde521e0522408d1fe7e836a, unknown'
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require_relative '../../support/feature_helper'
|
2
|
+
|
3
|
+
describe 'Glide Dependencies' do
|
4
|
+
let(:go_developer) { LicenseFinder::TestingDSL::User.new }
|
5
|
+
|
6
|
+
specify 'are shown in reports for a project' do
|
7
|
+
project = LicenseFinder::TestingDSL::GlideProject.create
|
8
|
+
ENV['GOPATH'] = "#{project.project_dir}/gopath_glide"
|
9
|
+
|
10
|
+
go_developer.run_license_finder('gopath_glide')
|
11
|
+
expect(go_developer).to be_seeing_line 'github.com/Masterminds/semver, 517734cc7d6470c0d07130e40fd40bdeb9bcd3fd, MIT'
|
12
|
+
expect(go_developer).to be_seeing_line 'github.com/Masterminds/cookoo, 78aa11ce75e257c51be7ea945edb84cf19c4a6de, MIT'
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require_relative '../../support/feature_helper'
|
2
|
+
|
3
|
+
describe 'Govendor Dependencies' do
|
4
|
+
let(:go_developer) { LicenseFinder::TestingDSL::User.new }
|
5
|
+
|
6
|
+
specify 'are shown in reports for a project' do
|
7
|
+
project = LicenseFinder::TestingDSL::GovendorProject.create
|
8
|
+
ENV['GOPATH'] = "#{project.project_dir}/gopath_govendor"
|
9
|
+
|
10
|
+
go_developer.run_license_finder('gopath_govendor/src')
|
11
|
+
|
12
|
+
expect(go_developer).to be_seeing_line 'github.com/Bowery/prompt, 0f1139e9a1c74b57ccce6bdb3cd2f7cd04dd3449, MIT'
|
13
|
+
expect(go_developer).to be_seeing_line 'github.com/dchest/safefile, 855e8d98f1852d48dde521e0522408d1fe7e836a, unknown'
|
14
|
+
end
|
15
|
+
end
|
@@ -16,7 +16,7 @@ describe 'Gradle Dependencies' do
|
|
16
16
|
LicenseFinder::TestingDSL::GradleProject::MultiModule.create
|
17
17
|
java_developer.run_license_finder('multi-module-gradle')
|
18
18
|
expect(java_developer).to be_seeing_line 'junit, 4.12, "Eclipse Public License 1.0"'
|
19
|
-
expect(java_developer).to be_seeing_line 'mockito-core, 1.9.5,
|
19
|
+
expect(java_developer).to be_seeing_line 'mockito-core, 1.9.5, MIT'
|
20
20
|
end
|
21
21
|
|
22
22
|
specify 'show both file-based jars and downloaded dependencies' do
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require_relative '../../support/feature_helper'
|
2
|
+
|
3
|
+
describe 'Gvt Dependencies' do
|
4
|
+
let(:go_developer) { LicenseFinder::TestingDSL::User.new }
|
5
|
+
|
6
|
+
specify 'are shown in reports for a project' do
|
7
|
+
project = LicenseFinder::TestingDSL::GvtProject.create
|
8
|
+
ENV['GOPATH'] = "#{project.project_dir}/gopath_gvt"
|
9
|
+
|
10
|
+
go_developer.run_license_finder('gopath_gvt')
|
11
|
+
expect(go_developer).to be_seeing_line 'github.com/aws/aws-sdk-go, ea4ed6c6aec305f9c990547f16141b3591493516, "Apache 2.0"'
|
12
|
+
expect(go_developer).to be_seeing_line 'github.com/golang/protobuf/proto, 8ee79997227bf9b34611aee7946ae64735e6fd93, "New BSD"'
|
13
|
+
end
|
14
|
+
end
|
@@ -1,19 +1,18 @@
|
|
1
1
|
require_relative '../../support/feature_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe 'Maven Dependencies' do
|
4
4
|
# As a Java developer
|
5
5
|
# I want to be able to manage Maven dependencies
|
6
6
|
|
7
7
|
let(:java_developer) { LicenseFinder::TestingDSL::User.new }
|
8
8
|
|
9
|
-
specify
|
9
|
+
specify 'are shown in reports' do
|
10
10
|
LicenseFinder::TestingDSL::MavenProject.create
|
11
11
|
java_developer.run_license_finder
|
12
12
|
expect(java_developer).to be_seeing_line 'junit, 4.11, "Common Public License Version 1.0"'
|
13
13
|
end
|
14
14
|
|
15
15
|
context 'when using --maven_include_groups flag' do
|
16
|
-
|
17
16
|
it 'shows the groupid' do
|
18
17
|
LicenseFinder::TestingDSL::MavenProject.create
|
19
18
|
java_developer.run_license_finder nil, '--maven_include_groups'
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require_relative '../../support/feature_helper'
|
2
|
+
|
3
|
+
describe 'Mix Dependencies' do
|
4
|
+
# As an Elixir developer
|
5
|
+
# I want to be able to manage Mix dependencies
|
6
|
+
|
7
|
+
let(:elixir_developer) { LicenseFinder::TestingDSL::User.new }
|
8
|
+
|
9
|
+
specify 'are shown in reports' do
|
10
|
+
LicenseFinder::TestingDSL::MixProject.create
|
11
|
+
puts 'mix project created'
|
12
|
+
elixir_developer.run_license_finder
|
13
|
+
expect(elixir_developer).to be_seeing_line 'fs, 0.9.1, ISC'
|
14
|
+
expect(elixir_developer).to be_seeing_line 'uuid, 1.1.5, "Apache 2.0"'
|
15
|
+
end
|
16
|
+
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
require_relative '../../support/feature_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe 'NPM Dependencies' do
|
4
4
|
# As a Node developer
|
5
5
|
# I want to be able to manage NPM dependencies
|
6
6
|
|
7
7
|
let(:node_developer) { LicenseFinder::TestingDSL::User.new }
|
8
8
|
|
9
|
-
specify
|
9
|
+
specify 'are shown in reports' do
|
10
10
|
LicenseFinder::TestingDSL::NpmProject.create
|
11
11
|
node_developer.run_license_finder
|
12
|
-
expect(node_developer).to be_seeing_line
|
12
|
+
expect(node_developer).to be_seeing_line 'http-server, 0.6.1, MIT'
|
13
13
|
end
|
14
14
|
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
require_relative '../../support/feature_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe 'Nuget Dependencies' do
|
4
4
|
# As a .NET developer
|
5
5
|
# I want to be able to manage Nuget dependencies
|
6
6
|
|
7
7
|
let(:dotnet_developer) { LicenseFinder::TestingDSL::User.new }
|
8
8
|
|
9
|
-
specify
|
9
|
+
specify 'are shown in reports' do
|
10
10
|
LicenseFinder::TestingDSL::NugetProject.create
|
11
|
-
dotnet_developer.run_license_finder
|
12
|
-
expect(dotnet_developer).to be_seeing_line
|
11
|
+
dotnet_developer.run_license_finder 'nuget'
|
12
|
+
expect(dotnet_developer).to be_seeing_line 'NUnit, 2.6.4, unknown'
|
13
13
|
end
|
14
14
|
end
|
@@ -1,12 +1,12 @@
|
|
1
1
|
require_relative '../../support/feature_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe 'Pip Dependencies' do
|
4
4
|
# As a Python developer
|
5
5
|
# I want to be able to manage Pip dependencies
|
6
6
|
|
7
7
|
let(:python_developer) { LicenseFinder::TestingDSL::User.new }
|
8
8
|
|
9
|
-
specify
|
9
|
+
specify 'are shown in reports' do
|
10
10
|
LicenseFinder::TestingDSL::PipProject.create
|
11
11
|
python_developer.run_license_finder
|
12
12
|
expect(python_developer).to be_seeing_line 'rsa, 3.1.4, "ASL 2"'
|
@@ -1,14 +1,14 @@
|
|
1
1
|
require_relative '../../support/feature_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe 'Rebar Dependencies' do
|
4
4
|
# As an Erlang developer
|
5
5
|
# I want to be able to manage rebar dependencies
|
6
6
|
|
7
7
|
let(:erlang_developer) { LicenseFinder::TestingDSL::User.new }
|
8
8
|
|
9
|
-
specify
|
9
|
+
specify 'are shown in reports' do
|
10
10
|
LicenseFinder::TestingDSL::RebarProject.create
|
11
11
|
erlang_developer.run_license_finder
|
12
|
-
expect(erlang_developer).to be_seeing_line
|
12
|
+
expect(erlang_developer).to be_seeing_line 'envy, "BRANCH: master", "Apache 2.0"'
|
13
13
|
end
|
14
14
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require_relative '../../support/feature_helper'
|
2
|
+
|
3
|
+
describe 'Yarn Dependencies' do
|
4
|
+
# As a Javascript developer
|
5
|
+
# I want to be able to manage Yarn dependencies
|
6
|
+
|
7
|
+
let(:yarn_developer) { LicenseFinder::TestingDSL::User.new }
|
8
|
+
|
9
|
+
specify 'are shown in reports' do
|
10
|
+
LicenseFinder::TestingDSL::YarnProject.create
|
11
|
+
yarn_developer.run_license_finder
|
12
|
+
expect(yarn_developer).to be_seeing_line 'http-server, 0.6.1, MIT'
|
13
|
+
end
|
14
|
+
end
|
@@ -23,6 +23,6 @@ describe 'Composite project' do
|
|
23
23
|
project = LicenseFinder::TestingDSL::BundlerProject.create
|
24
24
|
project.install
|
25
25
|
developer.execute_command('license_finder report --recursive --format csv --columns name version install_path licenses')
|
26
|
-
expect(developer).to be_seeing_something_like(
|
26
|
+
expect(developer).to be_seeing_something_like(%r{multi_xml,0.\d+.\d+,.*\/gems\/multi_xml-0.\d+.\d+,MIT})
|
27
27
|
end
|
28
28
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require_relative '../../support/feature_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe 'CSV report' do
|
4
4
|
# As a non-technical product owner
|
5
5
|
# I want a csv report
|
6
6
|
# So that I can easily review my application's dependencies and licenses
|
@@ -8,11 +8,11 @@ describe "CSV report" do
|
|
8
8
|
let(:developer) { LicenseFinder::TestingDSL::User.new }
|
9
9
|
let(:product_owner) { LicenseFinder::TestingDSL::User.new }
|
10
10
|
|
11
|
-
specify
|
11
|
+
specify 'shows dependency data in CSV form' do
|
12
12
|
developer.create_empty_project
|
13
13
|
developer.execute_command 'license_finder dependencies add info_gem BSD 1.1.1'
|
14
14
|
|
15
15
|
product_owner.execute_command('license_finder report --format csv --columns approved name version licenses')
|
16
|
-
expect(product_owner).to be_seeing
|
16
|
+
expect(product_owner).to be_seeing 'Not approved,info_gem,1.1.1,BSD'
|
17
17
|
end
|
18
18
|
end
|