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.
Files changed (145) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +4 -2
  3. data/CHANGELOG.md +16 -1
  4. data/CONTRIBUTING.md +23 -5
  5. data/Gemfile +0 -1
  6. data/README.md +6 -1
  7. data/Rakefile +2 -2
  8. data/ci/pipelines/pipeline.yml.erb +1 -1
  9. data/ci/pipelines/release.yml +14 -23
  10. data/ci/scripts/pushscript.sh +1 -2
  11. data/ci/scripts/run-rubocop.sh +1 -1
  12. data/ci/scripts/updateChangelog.sh +77 -0
  13. data/ci/tasks/build.yml +1 -1
  14. data/ci/tasks/update-changelog.yml +15 -0
  15. data/lib/license_finder/cli/base.rb +19 -13
  16. data/lib/license_finder/cli/main.rb +54 -37
  17. data/lib/license_finder/cli/makes_decisions.rb +3 -2
  18. data/lib/license_finder/configuration.rb +68 -15
  19. data/lib/license_finder/core.rb +17 -7
  20. data/lib/license_finder/decisions_factory.rb +11 -0
  21. data/lib/license_finder/license/templates/SimplifiedBSD.txt +1 -1
  22. data/lib/license_finder/license_aggregator.rb +11 -6
  23. data/lib/license_finder/logger.rb +2 -2
  24. data/lib/license_finder/package.rb +18 -16
  25. data/lib/license_finder/package_manager.rb +40 -47
  26. data/lib/license_finder/package_managers/bower.rb +8 -4
  27. data/lib/license_finder/package_managers/bundler.rb +8 -5
  28. data/lib/license_finder/package_managers/carthage.rb +4 -4
  29. data/lib/license_finder/package_managers/cocoa_pods.rb +2 -2
  30. data/lib/license_finder/package_managers/conan.rb +1 -1
  31. data/lib/license_finder/package_managers/gradle.rb +1 -1
  32. data/lib/license_finder/package_managers/maven.rb +1 -3
  33. data/lib/license_finder/package_managers/mix.rb +8 -4
  34. data/lib/license_finder/package_managers/npm.rb +5 -1
  35. data/lib/license_finder/package_managers/pip.rb +2 -2
  36. data/lib/license_finder/package_managers/rebar.rb +4 -4
  37. data/lib/license_finder/package_managers/yarn.rb +2 -2
  38. data/lib/license_finder/{packages → package_utils}/activation.rb +0 -0
  39. data/lib/license_finder/{package_managers → package_utils}/conan_info_parser.rb +1 -1
  40. data/lib/license_finder/{package_managers → package_utils}/gradle_dependency_finder.rb +0 -0
  41. data/lib/license_finder/{packages → package_utils}/license_files.rb +1 -1
  42. data/lib/license_finder/{packages → package_utils}/licensing.rb +1 -1
  43. data/lib/license_finder/{package_managers → package_utils}/maven_dependency_finder.rb +0 -0
  44. data/lib/license_finder/{packages → package_utils}/possible_license_file.rb +0 -0
  45. data/lib/license_finder/{package_managers → packages}/bower_package.rb +0 -0
  46. data/lib/license_finder/{package_managers → packages}/bundler_package.rb +0 -0
  47. data/lib/license_finder/{package_managers → packages}/carthage_package.rb +0 -0
  48. data/lib/license_finder/{package_managers → packages}/cocoa_pods_package.rb +0 -0
  49. data/lib/license_finder/{package_managers → packages}/conan_package.rb +0 -0
  50. data/lib/license_finder/{package_managers → packages}/go_package.rb +0 -0
  51. data/lib/license_finder/{package_managers → packages}/gradle_package.rb +0 -0
  52. data/lib/license_finder/{package_managers → packages}/maven_package.rb +0 -0
  53. data/lib/license_finder/packages/merged_package.rb +42 -0
  54. data/lib/license_finder/{package_managers → packages}/mix_package.rb +0 -0
  55. data/lib/license_finder/{package_managers → packages}/npm_package.rb +0 -0
  56. data/lib/license_finder/{package_managers → packages}/nuget_package.rb +0 -0
  57. data/lib/license_finder/{package_managers → packages}/pip_package.rb +0 -0
  58. data/lib/license_finder/{package_managers → packages}/rebar_package.rb +0 -0
  59. data/lib/license_finder/packages/yarn_package.rb +7 -0
  60. data/lib/license_finder/project_finder.rb +1 -1
  61. data/lib/license_finder/reports/csv_report.rb +1 -0
  62. data/lib/license_finder/reports/merged_report.rb +2 -0
  63. data/lib/license_finder/reports/templates/html_report.erb +8 -0
  64. data/lib/license_finder/reports/templates/markdown_report.erb +7 -0
  65. data/lib/license_finder/scanner.rb +38 -0
  66. data/lib/license_finder/version.rb +1 -1
  67. data/license_finder.gemspec +9 -2
  68. metadata +37 -101
  69. data/ci/tasks/get-version-and-tag.yml +0 -20
  70. data/features/features/cli/cli_spec.rb +0 -63
  71. data/features/features/configure/add_dependencies_spec.rb +0 -54
  72. data/features/features/configure/approve_dependencies_spec.rb +0 -61
  73. data/features/features/configure/assign_licenses_spec.rb +0 -35
  74. data/features/features/configure/blacklist_licenses_spec.rb +0 -30
  75. data/features/features/configure/ignore_dependencies_spec.rb +0 -35
  76. data/features/features/configure/ignore_groups_spec.rb +0 -46
  77. data/features/features/configure/name_project_spec.rb +0 -33
  78. data/features/features/configure/set_project_path_spec.rb +0 -17
  79. data/features/features/configure/whitelist_licenses_spec.rb +0 -38
  80. data/features/features/package_managers/bower_spec.rb +0 -14
  81. data/features/features/package_managers/carthage_spec.rb +0 -14
  82. data/features/features/package_managers/cocoapods_spec.rb +0 -14
  83. data/features/features/package_managers/conan_spec.rb +0 -11
  84. data/features/features/package_managers/dep_spec.rb +0 -15
  85. data/features/features/package_managers/glide_spec.rb +0 -26
  86. data/features/features/package_managers/godep_spec.rb +0 -17
  87. data/features/features/package_managers/govendor_spec.rb +0 -15
  88. data/features/features/package_managers/gradle_spec.rb +0 -34
  89. data/features/features/package_managers/gvt_spec.rb +0 -14
  90. data/features/features/package_managers/maven_spec.rb +0 -22
  91. data/features/features/package_managers/mix_spec.rb +0 -16
  92. data/features/features/package_managers/npm_spec.rb +0 -14
  93. data/features/features/package_managers/nuget_spec.rb +0 -14
  94. data/features/features/package_managers/pip_spec.rb +0 -14
  95. data/features/features/package_managers/rebar_spec.rb +0 -14
  96. data/features/features/package_managers/yarn_spec.rb +0 -14
  97. data/features/features/report/composite_spec.rb +0 -28
  98. data/features/features/report/csv_spec.rb +0 -18
  99. data/features/features/report/diff_spec.rb +0 -203
  100. data/features/features/report/html_spec.rb +0 -51
  101. data/features/features/report/java_groups_spec.rb +0 -11
  102. data/features/features/report/subproject_spec.rb +0 -63
  103. data/features/fixtures/Cartfile +0 -1
  104. data/features/fixtures/Podfile +0 -3
  105. data/features/fixtures/alternate-build-file-gradle/build-alt.gradle +0 -16
  106. data/features/fixtures/alternate-build-file-gradle/settings.gradle +0 -1
  107. data/features/fixtures/build.gradle +0 -16
  108. data/features/fixtures/conanfile.txt +0 -11
  109. data/features/fixtures/file-based-libs-gradle/build.gradle +0 -16
  110. data/features/fixtures/file-based-libs-gradle/libs/data.json-0.2.3.jar +0 -0
  111. data/features/fixtures/gopath/src/github.com/pivotal/foo/Godeps/Godeps.json +0 -16
  112. data/features/fixtures/gopath/src/github.com/pivotal/foo/Godeps/Readme +0 -5
  113. data/features/fixtures/gopath/src/github.com/pivotal/foo/foo.go +0 -6
  114. data/features/fixtures/gopath_dep/src/foo-dep/Gopkg.lock +0 -14
  115. data/features/fixtures/gopath_dep/src/foo-dep/Gopkg.toml +0 -7
  116. data/features/fixtures/gopath_dep/src/foo-dep/bar/bar.go +0 -10
  117. data/features/fixtures/gopath_dep/src/foo-dep/foo.go +0 -7
  118. data/features/fixtures/gopath_dep/src/foo-dep/vendor/a/b/LICENSE +0 -1
  119. data/features/fixtures/gopath_glide/src/glide.lock +0 -9
  120. data/features/fixtures/gopath_glide/src/glide.yaml +0 -6
  121. data/features/fixtures/gopath_glide_without_src/glide.lock +0 -9
  122. data/features/fixtures/gopath_glide_without_src/glide.yaml +0 -6
  123. data/features/fixtures/gopath_govendor/src/vendor/vendor.json +0 -19
  124. data/features/fixtures/gopath_gvt/src/vendor/manifest +0 -22
  125. data/features/fixtures/gradle-wrapper/build.gradle +0 -16
  126. data/features/fixtures/gradle-wrapper/gradlew +0 -8
  127. data/features/fixtures/gradle-wrapper/gradlew.bat +0 -9
  128. data/features/fixtures/maven-wrapper/mvnw +0 -3
  129. data/features/fixtures/maven-wrapper/mvnw.cmd +0 -7
  130. data/features/fixtures/maven-wrapper/pom.xml +0 -37
  131. data/features/fixtures/mix.exs +0 -22
  132. data/features/fixtures/multi-module-gradle/build.gradle +0 -12
  133. data/features/fixtures/multi-module-gradle/module1/build.gradle +0 -3
  134. data/features/fixtures/multi-module-gradle/module2/build.gradle +0 -3
  135. data/features/fixtures/multi-module-gradle/settings.gradle +0 -1
  136. data/features/fixtures/nuget/.nuget/.keep +0 -0
  137. data/features/fixtures/nuget/Fun.Test/packages.config +0 -4
  138. data/features/fixtures/nuget/Fun/packages.config +0 -5
  139. data/features/fixtures/pom.xml +0 -19
  140. data/features/fixtures/rebar.config +0 -12
  141. data/features/fixtures/single-module-gradle/build.gradle +0 -16
  142. data/features/support/feature_helper.rb +0 -15
  143. data/features/support/testing_dsl.rb +0 -564
  144. data/lib/license_finder/package_managers/merged_package.rb +0 -95
  145. data/license_finder-2.1.2.gem +0 -0
@@ -1,95 +0,0 @@
1
- module LicenseFinder
2
- class MergedPackage < Package
3
- attr_reader :dependency
4
-
5
- def initialize(package, aggregate_paths)
6
- @dependency = package
7
- @aggregate_paths = aggregate_paths.map { |p| Pathname(p) }
8
- super(package.name, package.version)
9
- end
10
-
11
- def name
12
- dependency.name
13
- end
14
-
15
- def version
16
- dependency.version
17
- end
18
-
19
- def licenses
20
- dependency.licenses
21
- end
22
-
23
- def install_path
24
- dependency.install_path
25
- end
26
-
27
- def authors
28
- dependency.authors
29
- end
30
-
31
- def homepage
32
- dependency.homepage
33
- end
34
-
35
- def summary
36
- dependency.summary
37
- end
38
-
39
- def description
40
- dependency.description
41
- end
42
-
43
- def approved_manually?
44
- dependency.approved_manually?
45
- end
46
-
47
- def approved?
48
- dependency.approved?
49
- end
50
-
51
- def whitelisted?
52
- dependency.whitelisted?
53
- end
54
-
55
- def blacklisted?
56
- dependency.blacklisted?
57
- end
58
-
59
- def groups
60
- dependency.groups
61
- end
62
-
63
- def package_manager
64
- dependency.package_manager
65
- end
66
-
67
- def aggregate_paths
68
- @aggregate_paths.map { |p| p.expand_path.to_s }
69
- end
70
-
71
- def <=>(other)
72
- dependency <=> other.dependency
73
- end
74
-
75
- def eql?(other)
76
- if other.instance_of? MergedPackage
77
- other.dependency.eql?(dependency)
78
- else
79
- dependency.eql?(other)
80
- end
81
- end
82
-
83
- def ==(other)
84
- dependency.eql?(other.dependency) && aggregate_paths.eql?(other.aggregate_paths)
85
- end
86
-
87
- def hash
88
- dependency.hash
89
- end
90
-
91
- def method_missing(_method_name)
92
- nil
93
- end
94
- end
95
- end
Binary file