license_finder 4.0.2 → 5.0.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 +4 -2
- data/CHANGELOG.md +16 -1
- data/CONTRIBUTING.md +23 -5
- data/Gemfile +0 -1
- data/README.md +6 -1
- data/Rakefile +2 -2
- data/ci/pipelines/pipeline.yml.erb +1 -1
- data/ci/pipelines/release.yml +14 -23
- data/ci/scripts/pushscript.sh +1 -2
- data/ci/scripts/run-rubocop.sh +1 -1
- data/ci/scripts/updateChangelog.sh +77 -0
- data/ci/tasks/build.yml +1 -1
- data/ci/tasks/update-changelog.yml +15 -0
- data/lib/license_finder/cli/base.rb +19 -13
- data/lib/license_finder/cli/main.rb +54 -37
- data/lib/license_finder/cli/makes_decisions.rb +3 -2
- data/lib/license_finder/configuration.rb +68 -15
- data/lib/license_finder/core.rb +17 -7
- data/lib/license_finder/decisions_factory.rb +11 -0
- data/lib/license_finder/license/templates/SimplifiedBSD.txt +1 -1
- data/lib/license_finder/license_aggregator.rb +11 -6
- data/lib/license_finder/logger.rb +2 -2
- data/lib/license_finder/package.rb +18 -16
- data/lib/license_finder/package_manager.rb +40 -47
- data/lib/license_finder/package_managers/bower.rb +8 -4
- data/lib/license_finder/package_managers/bundler.rb +8 -5
- data/lib/license_finder/package_managers/carthage.rb +4 -4
- data/lib/license_finder/package_managers/cocoa_pods.rb +2 -2
- data/lib/license_finder/package_managers/conan.rb +1 -1
- data/lib/license_finder/package_managers/gradle.rb +1 -1
- data/lib/license_finder/package_managers/maven.rb +1 -3
- data/lib/license_finder/package_managers/mix.rb +8 -4
- data/lib/license_finder/package_managers/npm.rb +5 -1
- data/lib/license_finder/package_managers/pip.rb +2 -2
- data/lib/license_finder/package_managers/rebar.rb +4 -4
- data/lib/license_finder/package_managers/yarn.rb +2 -2
- data/lib/license_finder/{packages → package_utils}/activation.rb +0 -0
- data/lib/license_finder/{package_managers → package_utils}/conan_info_parser.rb +1 -1
- data/lib/license_finder/{package_managers → package_utils}/gradle_dependency_finder.rb +0 -0
- data/lib/license_finder/{packages → package_utils}/license_files.rb +1 -1
- data/lib/license_finder/{packages → package_utils}/licensing.rb +1 -1
- data/lib/license_finder/{package_managers → package_utils}/maven_dependency_finder.rb +0 -0
- data/lib/license_finder/{packages → package_utils}/possible_license_file.rb +0 -0
- data/lib/license_finder/{package_managers → packages}/bower_package.rb +0 -0
- data/lib/license_finder/{package_managers → packages}/bundler_package.rb +0 -0
- data/lib/license_finder/{package_managers → packages}/carthage_package.rb +0 -0
- data/lib/license_finder/{package_managers → packages}/cocoa_pods_package.rb +0 -0
- data/lib/license_finder/{package_managers → packages}/conan_package.rb +0 -0
- data/lib/license_finder/{package_managers → packages}/go_package.rb +0 -0
- data/lib/license_finder/{package_managers → packages}/gradle_package.rb +0 -0
- data/lib/license_finder/{package_managers → packages}/maven_package.rb +0 -0
- data/lib/license_finder/packages/merged_package.rb +42 -0
- data/lib/license_finder/{package_managers → packages}/mix_package.rb +0 -0
- data/lib/license_finder/{package_managers → packages}/npm_package.rb +0 -0
- data/lib/license_finder/{package_managers → packages}/nuget_package.rb +0 -0
- data/lib/license_finder/{package_managers → packages}/pip_package.rb +0 -0
- data/lib/license_finder/{package_managers → packages}/rebar_package.rb +0 -0
- data/lib/license_finder/packages/yarn_package.rb +7 -0
- data/lib/license_finder/project_finder.rb +1 -1
- data/lib/license_finder/reports/csv_report.rb +1 -0
- data/lib/license_finder/reports/merged_report.rb +2 -0
- data/lib/license_finder/reports/templates/html_report.erb +8 -0
- data/lib/license_finder/reports/templates/markdown_report.erb +7 -0
- data/lib/license_finder/scanner.rb +38 -0
- data/lib/license_finder/version.rb +1 -1
- data/license_finder.gemspec +9 -2
- metadata +37 -101
- data/ci/tasks/get-version-and-tag.yml +0 -20
- data/features/features/cli/cli_spec.rb +0 -63
- data/features/features/configure/add_dependencies_spec.rb +0 -54
- data/features/features/configure/approve_dependencies_spec.rb +0 -61
- data/features/features/configure/assign_licenses_spec.rb +0 -35
- data/features/features/configure/blacklist_licenses_spec.rb +0 -30
- data/features/features/configure/ignore_dependencies_spec.rb +0 -35
- data/features/features/configure/ignore_groups_spec.rb +0 -46
- data/features/features/configure/name_project_spec.rb +0 -33
- data/features/features/configure/set_project_path_spec.rb +0 -17
- data/features/features/configure/whitelist_licenses_spec.rb +0 -38
- data/features/features/package_managers/bower_spec.rb +0 -14
- data/features/features/package_managers/carthage_spec.rb +0 -14
- data/features/features/package_managers/cocoapods_spec.rb +0 -14
- data/features/features/package_managers/conan_spec.rb +0 -11
- data/features/features/package_managers/dep_spec.rb +0 -15
- data/features/features/package_managers/glide_spec.rb +0 -26
- data/features/features/package_managers/godep_spec.rb +0 -17
- data/features/features/package_managers/govendor_spec.rb +0 -15
- data/features/features/package_managers/gradle_spec.rb +0 -34
- data/features/features/package_managers/gvt_spec.rb +0 -14
- data/features/features/package_managers/maven_spec.rb +0 -22
- data/features/features/package_managers/mix_spec.rb +0 -16
- data/features/features/package_managers/npm_spec.rb +0 -14
- data/features/features/package_managers/nuget_spec.rb +0 -14
- data/features/features/package_managers/pip_spec.rb +0 -14
- data/features/features/package_managers/rebar_spec.rb +0 -14
- data/features/features/package_managers/yarn_spec.rb +0 -14
- data/features/features/report/composite_spec.rb +0 -28
- data/features/features/report/csv_spec.rb +0 -18
- data/features/features/report/diff_spec.rb +0 -203
- data/features/features/report/html_spec.rb +0 -51
- data/features/features/report/java_groups_spec.rb +0 -11
- data/features/features/report/subproject_spec.rb +0 -63
- data/features/fixtures/Cartfile +0 -1
- data/features/fixtures/Podfile +0 -3
- data/features/fixtures/alternate-build-file-gradle/build-alt.gradle +0 -16
- data/features/fixtures/alternate-build-file-gradle/settings.gradle +0 -1
- data/features/fixtures/build.gradle +0 -16
- data/features/fixtures/conanfile.txt +0 -11
- data/features/fixtures/file-based-libs-gradle/build.gradle +0 -16
- data/features/fixtures/file-based-libs-gradle/libs/data.json-0.2.3.jar +0 -0
- data/features/fixtures/gopath/src/github.com/pivotal/foo/Godeps/Godeps.json +0 -16
- data/features/fixtures/gopath/src/github.com/pivotal/foo/Godeps/Readme +0 -5
- data/features/fixtures/gopath/src/github.com/pivotal/foo/foo.go +0 -6
- data/features/fixtures/gopath_dep/src/foo-dep/Gopkg.lock +0 -14
- data/features/fixtures/gopath_dep/src/foo-dep/Gopkg.toml +0 -7
- data/features/fixtures/gopath_dep/src/foo-dep/bar/bar.go +0 -10
- data/features/fixtures/gopath_dep/src/foo-dep/foo.go +0 -7
- data/features/fixtures/gopath_dep/src/foo-dep/vendor/a/b/LICENSE +0 -1
- data/features/fixtures/gopath_glide/src/glide.lock +0 -9
- data/features/fixtures/gopath_glide/src/glide.yaml +0 -6
- data/features/fixtures/gopath_glide_without_src/glide.lock +0 -9
- data/features/fixtures/gopath_glide_without_src/glide.yaml +0 -6
- data/features/fixtures/gopath_govendor/src/vendor/vendor.json +0 -19
- data/features/fixtures/gopath_gvt/src/vendor/manifest +0 -22
- data/features/fixtures/gradle-wrapper/build.gradle +0 -16
- data/features/fixtures/gradle-wrapper/gradlew +0 -8
- data/features/fixtures/gradle-wrapper/gradlew.bat +0 -9
- data/features/fixtures/maven-wrapper/mvnw +0 -3
- data/features/fixtures/maven-wrapper/mvnw.cmd +0 -7
- data/features/fixtures/maven-wrapper/pom.xml +0 -37
- data/features/fixtures/mix.exs +0 -22
- data/features/fixtures/multi-module-gradle/build.gradle +0 -12
- data/features/fixtures/multi-module-gradle/module1/build.gradle +0 -3
- data/features/fixtures/multi-module-gradle/module2/build.gradle +0 -3
- data/features/fixtures/multi-module-gradle/settings.gradle +0 -1
- data/features/fixtures/nuget/.nuget/.keep +0 -0
- data/features/fixtures/nuget/Fun.Test/packages.config +0 -4
- data/features/fixtures/nuget/Fun/packages.config +0 -5
- data/features/fixtures/pom.xml +0 -19
- data/features/fixtures/rebar.config +0 -12
- data/features/fixtures/single-module-gradle/build.gradle +0 -16
- data/features/support/feature_helper.rb +0 -15
- data/features/support/testing_dsl.rb +0 -564
- data/lib/license_finder/package_managers/merged_package.rb +0 -95
- data/license_finder-2.1.2.gem +0 -0
@@ -1,35 +0,0 @@
|
|
1
|
-
require_relative '../../support/feature_helper'
|
2
|
-
|
3
|
-
describe 'Manually Assigned Licenses' do
|
4
|
-
# As a developer
|
5
|
-
# I want to be able to override the licenses which license_finder finds
|
6
|
-
# So that my dependencies all have the correct licenses
|
7
|
-
|
8
|
-
let(:developer) { LicenseFinder::TestingDSL::User.new }
|
9
|
-
|
10
|
-
specify 'are shown in cli after being added, and default license is not shown' do
|
11
|
-
project = developer.create_ruby_app
|
12
|
-
gem = developer.create_gem 'mislicensed_dep', license: 'Unknown'
|
13
|
-
project.depend_on gem
|
14
|
-
developer.execute_command 'license_finder licenses add mislicensed_dep Known'
|
15
|
-
|
16
|
-
developer.run_license_finder
|
17
|
-
expect(developer).not_to be_seeing_something_like /mislicensed_dep.*Unknown/
|
18
|
-
expect(developer).to be_seeing_something_like /mislicensed_dep.*Known/
|
19
|
-
end
|
20
|
-
|
21
|
-
specify 'can be removed, revealing the default license for a dependency' do
|
22
|
-
project = developer.create_ruby_app
|
23
|
-
gem = developer.create_gem 'mislicensed_dep', license: 'Default'
|
24
|
-
project.depend_on gem
|
25
|
-
developer.execute_command 'license_finder licenses add mislicensed_dep Manual_license'
|
26
|
-
|
27
|
-
developer.run_license_finder
|
28
|
-
expect(developer).to be_seeing_something_like /mislicensed_dep.*Manual_license/
|
29
|
-
|
30
|
-
developer.execute_command 'license_finder licenses remove mislicensed_dep Manual_license'
|
31
|
-
|
32
|
-
developer.run_license_finder
|
33
|
-
expect(developer).to be_seeing_something_like /mislicensed_dep.*Default/
|
34
|
-
end
|
35
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
require_relative '../../support/feature_helper'
|
2
|
-
|
3
|
-
describe 'Blacklisted licenses' do
|
4
|
-
# As a lawyer
|
5
|
-
# I want to blacklist certain licenses
|
6
|
-
# So that any dependencies with only these licenses cannot be approved
|
7
|
-
|
8
|
-
let(:developer) { LicenseFinder::TestingDSL::User.new }
|
9
|
-
let(:lawyer) { LicenseFinder::TestingDSL::User.new }
|
10
|
-
|
11
|
-
before do
|
12
|
-
developer.create_empty_project
|
13
|
-
lawyer.execute_command 'license_finder blacklist add BSD'
|
14
|
-
developer.execute_command 'license_finder dependencies add blacklisted_dep BSD'
|
15
|
-
end
|
16
|
-
|
17
|
-
specify 'prevent packages from being approved' do
|
18
|
-
developer.execute_command 'license_finder approval add blacklisted_dep'
|
19
|
-
|
20
|
-
lawyer.run_license_finder
|
21
|
-
expect(lawyer).to be_seeing 'blacklisted_dep'
|
22
|
-
end
|
23
|
-
|
24
|
-
specify 'override the whitelist' do
|
25
|
-
developer.execute_command 'license_finder whitelist add BSD'
|
26
|
-
|
27
|
-
lawyer.run_license_finder
|
28
|
-
expect(lawyer).to be_seeing 'blacklisted_dep'
|
29
|
-
end
|
30
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
require_relative '../../support/feature_helper'
|
2
|
-
|
3
|
-
describe 'Ignored Dependencies' do
|
4
|
-
# As a developer
|
5
|
-
# I want to ignore certain dependencies
|
6
|
-
# To avoid frequently changing reports about dependencies I know will always be approved
|
7
|
-
|
8
|
-
let(:developer) { LicenseFinder::TestingDSL::User.new }
|
9
|
-
|
10
|
-
before do
|
11
|
-
developer.create_empty_project
|
12
|
-
developer.execute_command 'license_finder dependencies add ignored_dep Whatever'
|
13
|
-
end
|
14
|
-
|
15
|
-
specify 'are excluded from reports' do
|
16
|
-
developer.execute_command 'license_finder ignored_dependencies add ignored_dep'
|
17
|
-
|
18
|
-
developer.run_license_finder
|
19
|
-
expect(developer).to_not be_seeing 'ignored_dep'
|
20
|
-
developer.execute_command('license_finder report')
|
21
|
-
expect(developer).to_not be_seeing 'ignored_dep'
|
22
|
-
end
|
23
|
-
|
24
|
-
specify 'appear in the CLI' do
|
25
|
-
developer.execute_command 'license_finder ignored_dependencies add ignored_dep'
|
26
|
-
expect(developer).to be_seeing 'ignored_dep'
|
27
|
-
|
28
|
-
developer.execute_command 'license_finder ignored_dependencies list'
|
29
|
-
expect(developer).to be_seeing 'ignored_dep'
|
30
|
-
|
31
|
-
developer.execute_command 'license_finder ignored_dependencies remove ignored_dep'
|
32
|
-
developer.execute_command 'license_finder ignored_dependencies list'
|
33
|
-
expect(developer).to_not be_seeing 'ignored_dep'
|
34
|
-
end
|
35
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
require_relative '../../support/feature_helper'
|
2
|
-
require 'bundler'
|
3
|
-
|
4
|
-
describe 'Ignored Groups' do
|
5
|
-
# As a developer
|
6
|
-
# I want to ignore certain groups
|
7
|
-
# So that license_finder skips any gems I use in development, or for testing
|
8
|
-
|
9
|
-
let(:developer) { LicenseFinder::TestingDSL::User.new }
|
10
|
-
|
11
|
-
specify 'are excluded from reports' do
|
12
|
-
project = developer.create_ruby_app
|
13
|
-
gem = developer.create_gem 'dev_gem', license: 'GPL'
|
14
|
-
project.depend_on gem, groups: ['dev']
|
15
|
-
developer.execute_command 'license_finder ignored_group add dev'
|
16
|
-
|
17
|
-
developer.run_license_finder
|
18
|
-
expect(developer).to_not be_seeing 'dev_gem'
|
19
|
-
end
|
20
|
-
|
21
|
-
specify 'and their dependencies are excluded from reports' do
|
22
|
-
project = developer.create_ruby_app
|
23
|
-
gem = developer.create_gem 'dev_gem', license: 'GPL', dependencies: 'jwt'
|
24
|
-
|
25
|
-
# with_clean_env allows jwt to be installed, despite the fact
|
26
|
-
# that it isn't one of license_finder's own dependencies
|
27
|
-
::Bundler.with_clean_env do
|
28
|
-
project.depend_on gem, groups: ['dev']
|
29
|
-
developer.execute_command 'license_finder ignored_group add dev'
|
30
|
-
developer.run_license_finder
|
31
|
-
expect(developer).to_not be_seeing 'jwt'
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
specify 'appear in the CLI' do
|
36
|
-
developer.create_empty_project
|
37
|
-
developer.execute_command 'license_finder ignored_group add dev'
|
38
|
-
expect(developer).to be_seeing 'dev'
|
39
|
-
developer.execute_command 'license_finder ignored_group list'
|
40
|
-
expect(developer).to be_seeing 'dev'
|
41
|
-
|
42
|
-
developer.execute_command 'license_finder ignored_group remove dev'
|
43
|
-
developer.execute_command 'license_finder ignored_group list'
|
44
|
-
expect(developer).to_not be_seeing 'dev'
|
45
|
-
end
|
46
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
require_relative '../../support/feature_helper'
|
2
|
-
|
3
|
-
describe 'Project name' do
|
4
|
-
# As a developer
|
5
|
-
# I want to assign a name for my project
|
6
|
-
# So that product owners see it in the reports
|
7
|
-
|
8
|
-
let(:developer) { LicenseFinder::TestingDSL::User.new }
|
9
|
-
let(:product_owner) { LicenseFinder::TestingDSL::User.new }
|
10
|
-
|
11
|
-
before { developer.create_empty_project }
|
12
|
-
|
13
|
-
specify 'appears in the HTML report' do
|
14
|
-
developer.execute_command 'license_finder project_name add changed_name'
|
15
|
-
|
16
|
-
expect(product_owner.view_html).to be_titled 'changed_name'
|
17
|
-
end
|
18
|
-
|
19
|
-
specify 'defaults to the directory name' do
|
20
|
-
expect(product_owner.view_html).to be_titled 'my_app'
|
21
|
-
end
|
22
|
-
|
23
|
-
specify 'appears in the CLI' do
|
24
|
-
developer.execute_command 'license_finder project_name add my_proj'
|
25
|
-
expect(developer).to be_seeing 'my_proj'
|
26
|
-
developer.execute_command 'license_finder project_name show'
|
27
|
-
expect(developer).to be_seeing 'my_proj'
|
28
|
-
|
29
|
-
developer.execute_command 'license_finder project_name remove'
|
30
|
-
developer.execute_command 'license_finder project_name show'
|
31
|
-
expect(developer).to_not be_seeing 'my_proj'
|
32
|
-
end
|
33
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
require_relative '../../support/feature_helper'
|
2
|
-
|
3
|
-
describe 'Project path' do
|
4
|
-
# As a developer
|
5
|
-
# I want to set a project path
|
6
|
-
# So that I can run license finder in a different Bundle environment to the project.
|
7
|
-
|
8
|
-
let(:developer) { LicenseFinder::TestingDSL::User.new }
|
9
|
-
|
10
|
-
specify 'can be overridden on the command line' do
|
11
|
-
project = developer.create_ruby_app
|
12
|
-
gem = developer.create_gem 'mitlicensed_dep', license: 'MIT', version: '1.2.3'
|
13
|
-
project.depend_on gem
|
14
|
-
developer.execute_command_outside_project("license_finder --quiet --project_path #{project.project_dir}")
|
15
|
-
expect(developer).to be_seeing 'mitlicensed_dep, 1.2.3, MIT'
|
16
|
-
end
|
17
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
require_relative '../../support/feature_helper'
|
2
|
-
|
3
|
-
describe 'Whitelisted licenses' do
|
4
|
-
# As a developer
|
5
|
-
# I want to whitelist certain licenses that my business has pre-approved
|
6
|
-
# So that any dependencies with those licenses do not show up as action items
|
7
|
-
|
8
|
-
let(:developer) { LicenseFinder::TestingDSL::User.new }
|
9
|
-
|
10
|
-
before { developer.create_empty_project }
|
11
|
-
|
12
|
-
specify 'approve dependencies with those licenses' do
|
13
|
-
developer.execute_command 'license_finder dependencies add bsd_gem BSD'
|
14
|
-
developer.execute_command 'license_finder whitelist add BSD'
|
15
|
-
|
16
|
-
developer.run_license_finder
|
17
|
-
expect(developer).to_not be_seeing 'bsd_gem'
|
18
|
-
end
|
19
|
-
|
20
|
-
specify 'approve dependencies with any of those licenses' do
|
21
|
-
developer.execute_command 'license_finder dependencies add dep_with_many_licenses GPL'
|
22
|
-
developer.execute_command 'license_finder licenses add dep_with_many_licenses MIT'
|
23
|
-
developer.execute_command 'license_finder whitelist add GPL'
|
24
|
-
|
25
|
-
developer.run_license_finder
|
26
|
-
expect(developer).not_to be_seeing 'dep_with_many_licenses'
|
27
|
-
end
|
28
|
-
|
29
|
-
specify 'are shown in the CLI' do
|
30
|
-
developer.execute_command 'license_finder whitelist add Expat'
|
31
|
-
developer.execute_command 'license_finder whitelist list'
|
32
|
-
expect(developer).to be_seeing 'MIT'
|
33
|
-
|
34
|
-
developer.execute_command 'license_finder whitelist remove Expat'
|
35
|
-
developer.execute_command 'license_finder whitelist list'
|
36
|
-
expect(developer).to_not be_seeing 'MIT'
|
37
|
-
end
|
38
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
require_relative '../../support/feature_helper'
|
2
|
-
|
3
|
-
describe 'Bower Dependencies' do
|
4
|
-
# As a JS developer
|
5
|
-
# I want to be able to manage Bower dependencies
|
6
|
-
|
7
|
-
let(:js_developer) { LicenseFinder::TestingDSL::User.new }
|
8
|
-
|
9
|
-
specify 'are shown in reports' do
|
10
|
-
LicenseFinder::TestingDSL::BowerProject.create
|
11
|
-
js_developer.run_license_finder
|
12
|
-
expect(js_developer).to be_seeing_line 'gmaps, 0.2.30, MIT'
|
13
|
-
end
|
14
|
-
end
|
@@ -1,14 +0,0 @@
|
|
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 +0,0 @@
|
|
1
|
-
require_relative '../../support/feature_helper'
|
2
|
-
|
3
|
-
describe 'CocoaPods Dependencies', ios: true do
|
4
|
-
# As a Cocoa developer
|
5
|
-
# I want to be able to manage CocoaPods dependencies
|
6
|
-
|
7
|
-
let(:cocoa_developer) { LicenseFinder::TestingDSL::User.new }
|
8
|
-
|
9
|
-
specify 'are shown in reports' do
|
10
|
-
LicenseFinder::TestingDSL::CocoaPodsProject.create
|
11
|
-
cocoa_developer.run_license_finder
|
12
|
-
expect(cocoa_developer).to be_seeing_line 'ABTest, 0.0.5, MIT'
|
13
|
-
end
|
14
|
-
end
|
@@ -1,11 +0,0 @@
|
|
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
|
@@ -1,15 +0,0 @@
|
|
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
|
@@ -1,26 +0,0 @@
|
|
1
|
-
require_relative '../../support/feature_helper'
|
2
|
-
|
3
|
-
describe 'Glide Dependencies' do
|
4
|
-
let(:go_developer) { LicenseFinder::TestingDSL::User.new }
|
5
|
-
|
6
|
-
context 'when project is in src directory' do
|
7
|
-
specify 'are shown in reports for a project' do
|
8
|
-
project = LicenseFinder::TestingDSL::GlideProject.create
|
9
|
-
ENV['GOPATH'] = "#{project.project_dir}/gopath_glide"
|
10
|
-
|
11
|
-
go_developer.run_license_finder('gopath_glide')
|
12
|
-
expect(go_developer).to be_seeing_line 'github.com/Masterminds/semver, 517734cc7d6470c0d07130e40fd40bdeb9bcd3fd, MIT'
|
13
|
-
expect(go_developer).to be_seeing_line 'github.com/Masterminds/cookoo, 78aa11ce75e257c51be7ea945edb84cf19c4a6de, MIT'
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
context 'when projecy is not in src directory' do
|
18
|
-
specify 'are shown in reports for a project' do
|
19
|
-
LicenseFinder::TestingDSL::GlideProjectWithoutSrc.create
|
20
|
-
|
21
|
-
go_developer.run_license_finder('gopath_glide_without_src')
|
22
|
-
expect(go_developer).to be_seeing_line 'github.com/Masterminds/semver, 517734cc7d6470c0d07130e40fd40bdeb9bcd3fd, MIT'
|
23
|
-
expect(go_developer).to be_seeing_line 'github.com/Masterminds/cookoo, 78aa11ce75e257c51be7ea945edb84cf19c4a6de, MIT'
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
require_relative '../../support/feature_helper'
|
2
|
-
|
3
|
-
describe 'Godep Dependencies' do
|
4
|
-
# As a Go developer
|
5
|
-
# I want to be able to manage Godep dependencies
|
6
|
-
|
7
|
-
let(:go_developer) { LicenseFinder::TestingDSL::User.new }
|
8
|
-
|
9
|
-
specify 'are shown in reports for a project' do
|
10
|
-
project = LicenseFinder::TestingDSL::GoProject.create
|
11
|
-
ENV['GOPATH'] = "#{project.project_dir}/gopath"
|
12
|
-
|
13
|
-
go_developer.run_license_finder('gopath/src/github.com/pivotal/foo')
|
14
|
-
expect(go_developer).to be_seeing_line 'github.com/onsi/ginkgo, d981d36, MIT'
|
15
|
-
expect(go_developer).to be_seeing_line 'github.com/onsi/gomega, d6c945f, MIT'
|
16
|
-
end
|
17
|
-
end
|
@@ -1,15 +0,0 @@
|
|
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
|
@@ -1,34 +0,0 @@
|
|
1
|
-
require_relative '../../support/feature_helper'
|
2
|
-
|
3
|
-
describe 'Gradle Dependencies' do
|
4
|
-
# As a Java developer
|
5
|
-
# I want to be able to manage Gradle dependencies
|
6
|
-
|
7
|
-
let(:java_developer) { LicenseFinder::TestingDSL::User.new }
|
8
|
-
|
9
|
-
specify 'are shown in reports for a single-module project' do
|
10
|
-
LicenseFinder::TestingDSL::GradleProject.create
|
11
|
-
java_developer.run_license_finder('single-module-gradle')
|
12
|
-
expect(java_developer).to be_seeing_line 'junit, 4.11, "Common Public License Version 1.0"'
|
13
|
-
end
|
14
|
-
|
15
|
-
specify 'are shown in reports for a multi-module project' do
|
16
|
-
LicenseFinder::TestingDSL::GradleProject::MultiModule.create
|
17
|
-
java_developer.run_license_finder('multi-module-gradle')
|
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, MIT'
|
20
|
-
end
|
21
|
-
|
22
|
-
specify 'show both file-based jars and downloaded dependencies' do
|
23
|
-
LicenseFinder::TestingDSL::GradleProject::FileBasedLibs.create
|
24
|
-
java_developer.run_license_finder('file-based-libs-gradle')
|
25
|
-
expect(java_developer).to be_seeing_line 'data.json-0.2.3.jar, unknown, unknown'
|
26
|
-
expect(java_developer).to be_seeing_line 'guava, 18.0, "Apache 2.0"'
|
27
|
-
end
|
28
|
-
|
29
|
-
specify 'are shown in reports for a project with an alternate build.gradle file' do
|
30
|
-
LicenseFinder::TestingDSL::AlternateBuildFileGradleProject.create
|
31
|
-
java_developer.run_license_finder('alternate-build-file-gradle')
|
32
|
-
expect(java_developer).to be_seeing_line 'junit, 4.11, "Common Public License Version 1.0"'
|
33
|
-
end
|
34
|
-
end
|
@@ -1,14 +0,0 @@
|
|
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,22 +0,0 @@
|
|
1
|
-
require_relative '../../support/feature_helper'
|
2
|
-
|
3
|
-
describe 'Maven Dependencies' do
|
4
|
-
# As a Java developer
|
5
|
-
# I want to be able to manage Maven dependencies
|
6
|
-
|
7
|
-
let(:java_developer) { LicenseFinder::TestingDSL::User.new }
|
8
|
-
|
9
|
-
specify 'are shown in reports' do
|
10
|
-
LicenseFinder::TestingDSL::MavenProject.create
|
11
|
-
java_developer.run_license_finder
|
12
|
-
expect(java_developer).to be_seeing_line 'junit, 4.11, "Common Public License Version 1.0"'
|
13
|
-
end
|
14
|
-
|
15
|
-
context 'when using --maven_include_groups flag' do
|
16
|
-
it 'shows the groupid' do
|
17
|
-
LicenseFinder::TestingDSL::MavenProject.create
|
18
|
-
java_developer.run_license_finder nil, '--maven_include_groups'
|
19
|
-
expect(java_developer).to be_seeing_line 'junit:junit, 4.11, "Common Public License Version 1.0"'
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|