license_finder 6.0.0 → 6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -2
- data/Dockerfile +3 -3
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/ci/pipelines/release.yml.erb +10 -23
- data/ci/scripts/run-rubocop.sh +1 -0
- data/lib/license_finder/package_manager.rb +17 -17
- data/lib/license_finder/package_managers/bower.rb +2 -2
- data/lib/license_finder/package_managers/bundler.rb +1 -1
- data/lib/license_finder/package_managers/cargo.rb +2 -2
- data/lib/license_finder/package_managers/carthage.rb +1 -1
- data/lib/license_finder/package_managers/cocoa_pods.rb +1 -1
- data/lib/license_finder/package_managers/composer.rb +1 -1
- data/lib/license_finder/package_managers/dep.rb +1 -1
- data/lib/license_finder/package_managers/dotnet.rb +2 -2
- data/lib/license_finder/package_managers/glide.rb +1 -1
- data/lib/license_finder/package_managers/go_15vendorexperiment.rb +1 -1
- data/lib/license_finder/package_managers/go_dep.rb +1 -1
- data/lib/license_finder/package_managers/go_workspace.rb +1 -1
- data/lib/license_finder/package_managers/govendor.rb +1 -1
- data/lib/license_finder/package_managers/gvt.rb +1 -1
- data/lib/license_finder/package_managers/mix.rb +6 -6
- data/lib/license_finder/package_managers/npm.rb +2 -2
- data/lib/license_finder/package_managers/nuget.rb +6 -6
- data/lib/license_finder/package_managers/pip.rb +5 -7
- data/lib/license_finder/package_managers/rebar.rb +2 -2
- data/lib/license_finder/package_managers/yarn.rb +1 -1
- data/lib/license_finder/scanner.rb +1 -1
- data/license_finder.gemspec +10 -9
- metadata +39 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4322a68abdac0f37598d3a7e9329592a6aadc106d26dddab5228df56947161b4
|
4
|
+
data.tar.gz: 9cdde6b3fe4f113c7877a0bbb56ff74127155a4e00c1919dc2f40ea717fa2dc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09ed394388a18eeb7e60d6f8d685c77a00b3769a933b48f4a75a8bbdd224b9534696de6c8bec9db9bd7c8a8f3ac0176805123c2c36f445ca8cdb0cf3ae473144'
|
7
|
+
data.tar.gz: b8acbb67e9cb67facb22ba808e592fb8b14384aac588040fbe00524ad25d86cd958fbc001c8b8b069dc40de014ac9455017c302f04faf022f92d4f16eca78739
|
data/CHANGELOG.md
CHANGED
@@ -1,12 +1,22 @@
|
|
1
|
+
# [6.1.0] / 2020-02-21
|
2
|
+
|
3
|
+
### Fixed
|
4
|
+
* Testing dsl now correctly creates gem project - [6158d767](https://github.com/pivotal/LicenseFinder/commit/6158d76758f4232f3efd652729a83aa632a67dee) - Jeff Jun
|
5
|
+
|
6
|
+
### Changed
|
7
|
+
* Upgrade golang version to 1.13.3 - [51ecbcbc](https://github.com/pivotal/LicenseFinder/commit/51ecbcbc7992366c1baed2e8b805a7f820f70160)
|
8
|
+
* Uses correct package management command for pip based on options that are passed in - [3f4034ab](https://github.com/pivotal/LicenseFinder/commit/3f4034ab3479da23088174ad8cf56828b3cda9ad)
|
9
|
+
|
1
10
|
# [6.0.0] / 2020-01-22
|
2
11
|
|
3
12
|
### Added
|
4
13
|
* License Finder now recognizes pip requirement markers - [99fbc184](https://github.com/pivotal/LicenseFinder/commit/99fbc18463ef45f920ad506a72dc0b3a93d0f5bf) - Jason Smith
|
14
|
+
* Add ruby 2.7.0 and update to latest patch levels - [65efe96](https://github.com/pivotal/LicenseFinder/commit/65efe96aeef600a398f1465c01ed28b51bda456a) - mokhan
|
15
|
+
* Add support for Pipfile.lock - [566fb39c](https://github.com/pivotal/LicenseFinder/commit/566fb39c4077fb5271707a94894998a585cde8dd) - mokhan
|
5
16
|
|
6
17
|
### Fixed
|
7
18
|
* Bundler ignored groups failure - [bf2c03e3](https://github.com/pivotal/LicenseFinder/commit/bf2c03e375e91e8418967a593362313487f2f0d0)
|
8
19
|
* No longer crashes when python package requirement is missing - [80e4b360](https://github.com/pivotal/LicenseFinder/commit/80e4b360b95de126e7dc139c25de56c948a01f1e) - Jason Smith
|
9
|
-
|
10
20
|
* Longest common paths returning incorrect single directory [#169276334] - [f1d5423b](https://github.com/pivotal/LicenseFinder/commit/f1d5423b04f892d1d1e0595993c9bebb0a7c1b6d)
|
11
21
|
* python 2 projects using incorrect CLI command - [5655f60e](https://github.com/pivotal/LicenseFinder/commit/5655f60e671dc4c247bb05138ed35b05cda9cdc7)
|
12
22
|
|
@@ -16,8 +26,10 @@
|
|
16
26
|
* Bump to openjdk 11 - [499f8ab3](https://github.com/pivotal/LicenseFinder/commit/499f8ab3af7cd8ca37e429f2ed78323ad796d123) - Debbie Chen
|
17
27
|
* Bump to openjdk 12 - [09c781a7](https://github.com/pivotal/LicenseFinder/commit/09c781a70787d9461722d5d03d1bc624b644311a) - Debbie Chen
|
18
28
|
* Bundler prepare commands with now exclude dependencies in the ignored groups [#169611326] - [e58b2870](https://github.com/pivotal/LicenseFinder/commit/e58b2870b64d2c88be7027b152a423fdb921baca)
|
19
|
-
|
20
29
|
* Change version to be required for dependency add and updated cli options [#168705017] - [b10383d3](https://github.com/pivotal/LicenseFinder/commit/b10383d3d1990b6ad0d608044511352f13924be3) - Debbie Chen
|
30
|
+
* Ensure composer always installs the packages - [70b5e7a](https://github.com/pivotal/LicenseFinder/commit/70b5e7a42943c85bbd1d2825b2ffe94eec89020f) - kaystrobach
|
31
|
+
|
32
|
+
* **BREAKING:** Replaced whitelist/blacklist terminology with permitted_licenses/restricted_licenses - [a40b22f](https://github.com/pivotal/LicenseFinder/commit/a40b22fda11b3a0efbb3c0a021381534bc998dd9) - grantbdev
|
21
33
|
|
22
34
|
### Deprecated
|
23
35
|
* Remove support for jruby 9.1* [#169590215] - [81e75f8c](https://github.com/pivotal/LicenseFinder/commit/81e75f8cd61ca35e30562352dee2579b1b6c991e)
|
@@ -797,3 +809,4 @@ Bugfixes:
|
|
797
809
|
[5.11.0]: https://github.com/pivotal/LicenseFinder/compare/v5.10.2...v5.11.0
|
798
810
|
[5.11.1]: https://github.com/pivotal/LicenseFinder/compare/v5.11.0...v5.11.1
|
799
811
|
[6.0.0]: https://github.com/pivotal/LicenseFinder/compare/v5.11.1...v6.0.0
|
812
|
+
[6.1.0]: https://github.com/pivotal/LicenseFinder/compare/v6.0.0...v6.1.0
|
data/Dockerfile
CHANGED
@@ -3,7 +3,7 @@ FROM ubuntu:xenial
|
|
3
3
|
# Versioning
|
4
4
|
ENV PIP_INSTALL_VERSION 19.0.2
|
5
5
|
ENV PIP3_INSTALL_VERSION 8.1.1
|
6
|
-
ENV GO_LANG_VERSION 1.
|
6
|
+
ENV GO_LANG_VERSION 1.13.3
|
7
7
|
ENV MAVEN_VERSION 3.6.0
|
8
8
|
ENV SBT_VERSION 1.3.3
|
9
9
|
ENV GRADLE_VERSION 5.6.4
|
@@ -51,7 +51,7 @@ RUN apt-get install -y python rebar
|
|
51
51
|
|
52
52
|
# install and update python-pip
|
53
53
|
RUN apt-get install -y python-pip python3-pip && \
|
54
|
-
|
54
|
+
pip2 install --upgrade pip==$PIP_INSTALL_VERSION && \
|
55
55
|
pip3 install --upgrade pip==$PIP3_INSTALL_VERSION
|
56
56
|
|
57
57
|
# install maven
|
@@ -149,7 +149,7 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 4F4EA0AAE5
|
|
149
149
|
apt-get update &&\
|
150
150
|
apt-get install -y php7.1-cli &&\
|
151
151
|
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" &&\
|
152
|
-
php -r "if (hash_file('sha384', 'composer-setup.php') === '
|
152
|
+
php -r "if (hash_file('sha384', 'composer-setup.php') === 'e0012edf3e80b6978849f5eff0d4b4e4c79ff1609dd1e613307e16318854d24ae64f26d17af3ef0bf7cfb710ca74755a') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" &&\
|
153
153
|
php composer-setup.php &&\
|
154
154
|
php -r "unlink('composer-setup.php');" &&\
|
155
155
|
mv composer.phar /usr/bin/composer
|
data/README.md
CHANGED
@@ -31,7 +31,7 @@ and give you an actionable exception report.
|
|
31
31
|
| ------------ | --------------- | -------:|
|
32
32
|
| Ruby Gems | bundler | 1.16.6 |
|
33
33
|
| Python 2.7 Eggs | pip2 | 19.0.2 |
|
34
|
-
| Python 3.5 Eggs | pip3 |
|
34
|
+
| Python 3.5 Eggs | pip3 | 19.0.2 |
|
35
35
|
| Node.js | npm | 6.4.1 |
|
36
36
|
| Bower | bower | 1.8.4 |
|
37
37
|
| Nuget (without license discovery) | nuget | 4.7.1.5393 |
|
data/Rakefile
CHANGED
@@ -47,7 +47,7 @@ task :check_dependencies do
|
|
47
47
|
require './lib/license_finder'
|
48
48
|
satisfied = true
|
49
49
|
LicenseFinder::Scanner::PACKAGE_MANAGERS.each do |package_manager|
|
50
|
-
satisfied = false unless package_manager.installed?(LicenseFinder::Logger.new(LicenseFinder::Logger::MODE_INFO))
|
50
|
+
satisfied = false unless package_manager.new(project_path: Pathname.new('')).installed?(LicenseFinder::Logger.new(LicenseFinder::Logger::MODE_INFO))
|
51
51
|
end
|
52
52
|
STDOUT.flush
|
53
53
|
exit 1 unless satisfied
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
6.
|
1
|
+
6.1.0
|
@@ -17,7 +17,7 @@ resources:
|
|
17
17
|
uri: git@github.com:pivotal/LicenseFinder.git
|
18
18
|
private_key: ((CfOslBot.private_key))
|
19
19
|
branch: master
|
20
|
-
ignore_paths: [VERSION]
|
20
|
+
ignore_paths: [VERSION, CHANGELOG.md]
|
21
21
|
|
22
22
|
- name: lf-git-version
|
23
23
|
type: git
|
@@ -26,14 +26,6 @@ resources:
|
|
26
26
|
private_key: ((CfOslBot.private_key))
|
27
27
|
branch: master
|
28
28
|
|
29
|
-
- name: git-master-dockerfile
|
30
|
-
type: git
|
31
|
-
source:
|
32
|
-
uri: git@github.com:pivotal/LicenseFinder.git
|
33
|
-
private_key: ((CfOslBot.private_key))
|
34
|
-
branch: master
|
35
|
-
paths: [Dockerfile, Gemfile, license_finder.gemspec]
|
36
|
-
|
37
29
|
- name: semver-version
|
38
30
|
type: semver
|
39
31
|
source:
|
@@ -80,13 +72,13 @@ jobs:
|
|
80
72
|
- name: build-docker-image
|
81
73
|
public: true
|
82
74
|
plan:
|
83
|
-
- get: git
|
75
|
+
- get: lf-git
|
84
76
|
tags: ["private-worker"]
|
85
77
|
trigger: true
|
86
78
|
- put: dockerhub-edge
|
87
79
|
tags: ["private-worker"]
|
88
80
|
params:
|
89
|
-
build: git
|
81
|
+
build: lf-git
|
90
82
|
|
91
83
|
<% ruby_versions.each do |ruby_version| %>
|
92
84
|
- name: ruby-<%= ruby_version %>
|
@@ -99,7 +91,7 @@ jobs:
|
|
99
91
|
- get: LicenseFinder
|
100
92
|
tags: ["private-worker"]
|
101
93
|
resource: lf-git
|
102
|
-
|
94
|
+
passed: [build-docker-image]
|
103
95
|
version: every
|
104
96
|
- task: ruby-<%= ruby_version %>
|
105
97
|
tags: ["private-worker"]
|
@@ -108,6 +100,7 @@ jobs:
|
|
108
100
|
file: LicenseFinder/ci/tasks/run-tests.yml
|
109
101
|
params:
|
110
102
|
RUBY_VERSION_UNDER_TEST: <%= ruby_version %>
|
103
|
+
|
111
104
|
<% if setup_slack %>
|
112
105
|
on_failure:
|
113
106
|
put: slack-alert
|
@@ -129,8 +122,8 @@ jobs:
|
|
129
122
|
- get: LicenseFinder
|
130
123
|
tags: ["private-worker"]
|
131
124
|
resource: lf-git
|
132
|
-
trigger: true
|
133
125
|
version: every
|
126
|
+
passed: [build-docker-image]
|
134
127
|
- task: run-rubocop
|
135
128
|
tags: ["private-worker"]
|
136
129
|
privileged: true
|
@@ -139,39 +132,33 @@ jobs:
|
|
139
132
|
|
140
133
|
- name: bump-major
|
141
134
|
plan:
|
142
|
-
- get: lf-git
|
143
|
-
tags: ["private-worker"]
|
144
|
-
passed: [<%= ruby_versions.map{ |version| "ruby-#{version}"}.join(', ') %>]
|
145
135
|
- put: semver-version
|
146
136
|
tags: ["private-worker"]
|
147
137
|
params: {bump: major}
|
148
138
|
|
149
139
|
- name: bump-minor
|
150
140
|
plan:
|
151
|
-
- get: lf-git
|
152
|
-
tags: ["private-worker"]
|
153
|
-
passed: [<%= ruby_versions.map{ |version| "ruby-#{version}"}.join(', ') %>]
|
154
141
|
- put: semver-version
|
155
142
|
tags: ["private-worker"]
|
156
143
|
params: {bump: minor}
|
157
144
|
|
158
145
|
- name: bump-patch
|
159
146
|
plan:
|
160
|
-
- get: lf-git
|
161
|
-
tags: ["private-worker"]
|
162
|
-
passed: [<%= ruby_versions.map{ |version| "ruby-#{version}"}.join(', ') %>]
|
163
147
|
- put: semver-version
|
164
148
|
tags: ["private-worker"]
|
165
149
|
params: {bump: patch}
|
166
150
|
|
167
151
|
- name: release
|
152
|
+
disable_manual_trigger: true
|
168
153
|
plan:
|
154
|
+
- get: lf-git
|
155
|
+
tags: ["private-worker"]
|
156
|
+
passed: [<%= "#{ruby_versions.map{ |version| "ruby-#{version}"}.join(', ')}, rubocop" %>]
|
169
157
|
- get: lf-git-version
|
170
158
|
tags: ["private-worker"]
|
171
159
|
- get: semver-version
|
172
160
|
tags: ["private-worker"]
|
173
161
|
trigger: true
|
174
|
-
passed: [bump-major, bump-minor, bump-patch]
|
175
162
|
- get: dockerhub
|
176
163
|
tags: ["private-worker"]
|
177
164
|
params:
|
data/ci/scripts/run-rubocop.sh
CHANGED
@@ -22,24 +22,24 @@ module LicenseFinder
|
|
22
22
|
def takes_priority_over
|
23
23
|
nil
|
24
24
|
end
|
25
|
+
end
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
end
|
27
|
+
def installed?(logger = Core.default_logger)
|
28
|
+
if package_management_command.nil?
|
29
|
+
logger.debug self.class, 'no command defined' # TODO: comment me out
|
30
|
+
true
|
31
|
+
elsif command_exists?(package_management_command)
|
32
|
+
logger.debug self.class, 'is installed', color: :green
|
33
|
+
true
|
34
|
+
else
|
35
|
+
logger.info self.class, 'is not installed', color: :red
|
36
|
+
false
|
37
37
|
end
|
38
|
+
end
|
38
39
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
end
|
40
|
+
# see class description
|
41
|
+
def package_management_command
|
42
|
+
nil
|
43
43
|
end
|
44
44
|
|
45
45
|
# see class description
|
@@ -47,7 +47,7 @@ module LicenseFinder
|
|
47
47
|
nil
|
48
48
|
end
|
49
49
|
|
50
|
-
def
|
50
|
+
def command_exists?(command)
|
51
51
|
_stdout, _stderr, status =
|
52
52
|
if LicenseFinder::Platform.windows?
|
53
53
|
Cmd.run("where #{command}")
|
@@ -128,7 +128,7 @@ module LicenseFinder
|
|
128
128
|
FileUtils.mkdir_p @log_directory
|
129
129
|
|
130
130
|
# replace whitespace with underscores and remove slashes
|
131
|
-
log_file_name =
|
131
|
+
log_file_name = package_management_command&.gsub(/\s/, '_')&.gsub(%r{/}, '')
|
132
132
|
log_file = File.join(@log_directory, "prepare_#{log_file_name || 'errors'}.log")
|
133
133
|
|
134
134
|
File.open(log_file, 'w') do |f|
|
@@ -10,7 +10,7 @@ module LicenseFinder
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
def
|
13
|
+
def package_management_command
|
14
14
|
'bower'
|
15
15
|
end
|
16
16
|
|
@@ -25,7 +25,7 @@ module LicenseFinder
|
|
25
25
|
private
|
26
26
|
|
27
27
|
def bower_output
|
28
|
-
command = "#{
|
28
|
+
command = "#{package_management_command} list --json -l action --allow-root"
|
29
29
|
stdout, stderr, status = Dir.chdir(project_path) { Cmd.run(command) }
|
30
30
|
raise "Command '#{command}' failed to execute: #{stderr}" unless status.success?
|
31
31
|
|
@@ -10,7 +10,7 @@ module LicenseFinder
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
def
|
13
|
+
def package_management_command
|
14
14
|
'cargo'
|
15
15
|
end
|
16
16
|
|
@@ -25,7 +25,7 @@ module LicenseFinder
|
|
25
25
|
private
|
26
26
|
|
27
27
|
def cargo_output
|
28
|
-
command = "#{
|
28
|
+
command = "#{package_management_command} metadata --format-version=1"
|
29
29
|
|
30
30
|
stdout, stderr, status = Dir.chdir(project_path) { Cmd.run(command) }
|
31
31
|
raise "Command '#{command}' failed to execute: #{stderr}" unless status.success?
|
@@ -71,12 +71,12 @@ module LicenseFinder
|
|
71
71
|
Dir[project_path.join('**/project.assets.json')]
|
72
72
|
end
|
73
73
|
|
74
|
-
def
|
74
|
+
def package_management_command
|
75
75
|
'dotnet'
|
76
76
|
end
|
77
77
|
|
78
78
|
def prepare_command
|
79
|
-
"#{
|
79
|
+
"#{package_management_command} restore"
|
80
80
|
end
|
81
81
|
end
|
82
82
|
end
|
@@ -4,7 +4,7 @@ module LicenseFinder
|
|
4
4
|
class Mix < PackageManager
|
5
5
|
def initialize(options = {})
|
6
6
|
super
|
7
|
-
@command = options[:mix_command] ||
|
7
|
+
@command = options[:mix_command] || package_management_command
|
8
8
|
@elixir_command = options[:elixir_command] || 'elixir'
|
9
9
|
@deps_path = Pathname(options[:mix_deps_dir] || 'deps')
|
10
10
|
end
|
@@ -26,7 +26,7 @@ module LicenseFinder
|
|
26
26
|
licenses_by_package.fetch(name, ['license is not in deps'])
|
27
27
|
end
|
28
28
|
|
29
|
-
def
|
29
|
+
def package_management_command
|
30
30
|
'mix'
|
31
31
|
end
|
32
32
|
|
@@ -42,15 +42,15 @@ module LicenseFinder
|
|
42
42
|
[project_path.join('mix.exs')]
|
43
43
|
end
|
44
44
|
|
45
|
-
def
|
45
|
+
def installed?(logger = Core.default_logger)
|
46
46
|
if package_management_command.nil?
|
47
|
-
logger.debug self, 'no command defined'
|
47
|
+
logger.debug self.class, 'no command defined'
|
48
48
|
true
|
49
49
|
elsif command_exists?('elixir') && command_exists?('mix')
|
50
|
-
logger.debug self, 'is installed', color: :green
|
50
|
+
logger.debug self.class, 'is installed', color: :green
|
51
51
|
true
|
52
52
|
else
|
53
|
-
logger.info self, '(elixir) is not installed', color: :red
|
53
|
+
logger.info self.class, '(elixir) is not installed', color: :red
|
54
54
|
false
|
55
55
|
end
|
56
56
|
end
|
@@ -9,7 +9,7 @@ module LicenseFinder
|
|
9
9
|
NpmPackage.packages_from_json(npm_json, detected_package_path)
|
10
10
|
end
|
11
11
|
|
12
|
-
def
|
12
|
+
def package_management_command
|
13
13
|
'npm'
|
14
14
|
end
|
15
15
|
|
@@ -34,7 +34,7 @@ module LicenseFinder
|
|
34
34
|
private
|
35
35
|
|
36
36
|
def npm_json
|
37
|
-
command = "#{
|
37
|
+
command = "#{package_management_command} list --json --long#{production_flag}"
|
38
38
|
stdout, stderr, status = Dir.chdir(project_path) { Cmd.run(command) }
|
39
39
|
# we can try and continue if we got an exit status 1 - unmet peer dependency
|
40
40
|
raise "Command '#{command}' failed to execute: #{stderr}" if !status.success? && status.exitstatus != 1
|
@@ -71,27 +71,27 @@ module LicenseFinder
|
|
71
71
|
assemblies.flat_map(&:dependencies)
|
72
72
|
end
|
73
73
|
|
74
|
-
def
|
74
|
+
def package_management_command
|
75
75
|
return 'nuget' if LicenseFinder::Platform.windows?
|
76
76
|
|
77
77
|
'mono /usr/local/bin/nuget.exe'
|
78
78
|
end
|
79
79
|
|
80
80
|
def prepare_command
|
81
|
-
"#{
|
81
|
+
"#{package_management_command} restore"
|
82
82
|
end
|
83
83
|
|
84
|
-
def
|
84
|
+
def installed?(logger = Core.default_logger)
|
85
85
|
_stdout, _stderr, status = Cmd.run(nuget_check)
|
86
86
|
if status.success?
|
87
|
-
logger.debug self, 'is installed', color: :green
|
87
|
+
logger.debug self.class, 'is installed', color: :green
|
88
88
|
else
|
89
|
-
logger.info self, 'is not installed', color: :red
|
89
|
+
logger.info self.class, 'is not installed', color: :red
|
90
90
|
end
|
91
91
|
status.success?
|
92
92
|
end
|
93
93
|
|
94
|
-
def
|
94
|
+
def nuget_check
|
95
95
|
return 'where nuget' if LicenseFinder::Platform.windows?
|
96
96
|
|
97
97
|
'which mono && ls /usr/local/bin/nuget.exe'
|
@@ -4,10 +4,12 @@ require 'json'
|
|
4
4
|
|
5
5
|
module LicenseFinder
|
6
6
|
class Pip < PackageManager
|
7
|
+
DEFAULT_VERSION = '2'
|
8
|
+
|
7
9
|
def initialize(options = {})
|
8
10
|
super
|
9
11
|
@requirements_path = options[:pip_requirements_path] || Pathname('requirements.txt')
|
10
|
-
@python_version = options[:python_version] ||
|
12
|
+
@python_version = options[:python_version] || DEFAULT_VERSION
|
11
13
|
raise "Invalid python version \'#{@python_version}\'. Valid versions are '2' or '3'." unless %w[2 3].include?(@python_version)
|
12
14
|
end
|
13
15
|
|
@@ -24,12 +26,8 @@ module LicenseFinder
|
|
24
26
|
end
|
25
27
|
end
|
26
28
|
|
27
|
-
|
28
|
-
|
29
|
-
# isn't installed. The Dockerfile now installs both versions so using the image is safe.
|
30
|
-
# TODO: Refactor PackageManager.installed?() to pass in the options?
|
31
|
-
def self.package_management_command
|
32
|
-
'pip2'
|
29
|
+
def package_management_command
|
30
|
+
"pip#{@python_version}"
|
33
31
|
end
|
34
32
|
|
35
33
|
def prepare_command
|
@@ -4,7 +4,7 @@ module LicenseFinder
|
|
4
4
|
class Rebar < PackageManager
|
5
5
|
def initialize(options = {})
|
6
6
|
super
|
7
|
-
@command = options[:rebar_command] ||
|
7
|
+
@command = options[:rebar_command] || package_management_command
|
8
8
|
@deps_path = Pathname(options[:rebar_deps_dir] || 'deps')
|
9
9
|
end
|
10
10
|
|
@@ -20,7 +20,7 @@ module LicenseFinder
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
-
def
|
23
|
+
def package_management_command
|
24
24
|
'rebar'
|
25
25
|
end
|
26
26
|
|
@@ -32,7 +32,7 @@ module LicenseFinder
|
|
32
32
|
|
33
33
|
def active_packages
|
34
34
|
package_managers = active_package_managers
|
35
|
-
installed_package_managers = package_managers.select { |pm| pm.
|
35
|
+
installed_package_managers = package_managers.select { |pm| pm.installed?(@logger) }
|
36
36
|
installed_package_managers.flat_map(&:current_packages_with_relations)
|
37
37
|
end
|
38
38
|
|
data/license_finder.gemspec
CHANGED
@@ -26,7 +26,8 @@ Gem::Specification.new do |s|
|
|
26
26
|
'David Dening',
|
27
27
|
'Geoff Pleiss',
|
28
28
|
'Mike Chinigo',
|
29
|
-
'Mike Dalessio'
|
29
|
+
'Mike Dalessio',
|
30
|
+
'Jeff Jun'
|
30
31
|
]
|
31
32
|
|
32
33
|
s.email = ['labs-commoncode@pivotal.io']
|
@@ -42,28 +43,28 @@ Gem::Specification.new do |s|
|
|
42
43
|
|
43
44
|
s.license = 'MIT'
|
44
45
|
|
45
|
-
s.add_dependency 'bundler'
|
46
|
+
s.add_dependency 'bundler', '~> 2.1.0'
|
46
47
|
s.add_dependency 'rubyzip', '>=1', '<3'
|
47
|
-
s.add_dependency 'thor'
|
48
|
+
s.add_dependency 'thor', '~> 1.0.1'
|
48
49
|
s.add_dependency 'toml', '0.2.0'
|
49
50
|
s.add_dependency 'with_env', '1.1.0'
|
50
|
-
s.add_dependency 'xml-simple'
|
51
|
+
s.add_dependency 'xml-simple', '~> 1.1.5'
|
51
52
|
|
52
53
|
s.add_development_dependency 'addressable', '2.7.0'
|
53
54
|
s.add_development_dependency 'capybara', '~> 3.15.0'
|
54
55
|
s.add_development_dependency 'cocoapods', '>= 1.0.0' if RUBY_PLATFORM =~ /darwin/
|
55
56
|
s.add_development_dependency 'fakefs', '~> 1.0.0'
|
56
57
|
s.add_development_dependency 'mime-types', '3.3.1'
|
57
|
-
s.add_development_dependency 'pry'
|
58
|
-
s.add_development_dependency 'rake'
|
58
|
+
s.add_development_dependency 'pry', '~> 0.12.2'
|
59
|
+
s.add_development_dependency 'rake', '~> 13.0.1'
|
59
60
|
s.add_development_dependency 'rspec', '~> 3'
|
60
|
-
s.add_development_dependency 'rspec-its'
|
61
|
+
s.add_development_dependency 'rspec-its', '~> 1.3.0'
|
61
62
|
s.add_development_dependency 'rubocop', '~> 0.79.0'
|
62
63
|
s.add_development_dependency 'rubocop-performance', '~> 1.5.0'
|
63
64
|
s.add_development_dependency 'webmock', '~> 3.5'
|
64
65
|
|
65
|
-
s.add_development_dependency 'rack', '> 1.6'
|
66
|
-
s.add_development_dependency 'rack-test', '> 0.7'
|
66
|
+
s.add_development_dependency 'rack', '~> 2.0.7', '> 1.6'
|
67
|
+
s.add_development_dependency 'rack-test', '~> 1.1.0', '> 0.7'
|
67
68
|
|
68
69
|
s.files = `git ls-files`.split("\n").reject { |f| f.start_with?('spec', 'features') }
|
69
70
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: license_finder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Collins
|
@@ -23,25 +23,26 @@ authors:
|
|
23
23
|
- Geoff Pleiss
|
24
24
|
- Mike Chinigo
|
25
25
|
- Mike Dalessio
|
26
|
+
- Jeff Jun
|
26
27
|
autorequire:
|
27
28
|
bindir: bin
|
28
29
|
cert_chain: []
|
29
|
-
date: 2020-
|
30
|
+
date: 2020-02-21 00:00:00.000000000 Z
|
30
31
|
dependencies:
|
31
32
|
- !ruby/object:Gem::Dependency
|
32
33
|
name: bundler
|
33
34
|
requirement: !ruby/object:Gem::Requirement
|
34
35
|
requirements:
|
35
|
-
- - "
|
36
|
+
- - "~>"
|
36
37
|
- !ruby/object:Gem::Version
|
37
|
-
version:
|
38
|
+
version: 2.1.0
|
38
39
|
type: :runtime
|
39
40
|
prerelease: false
|
40
41
|
version_requirements: !ruby/object:Gem::Requirement
|
41
42
|
requirements:
|
42
|
-
- - "
|
43
|
+
- - "~>"
|
43
44
|
- !ruby/object:Gem::Version
|
44
|
-
version:
|
45
|
+
version: 2.1.0
|
45
46
|
- !ruby/object:Gem::Dependency
|
46
47
|
name: rubyzip
|
47
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,16 +67,16 @@ dependencies:
|
|
66
67
|
name: thor
|
67
68
|
requirement: !ruby/object:Gem::Requirement
|
68
69
|
requirements:
|
69
|
-
- - "
|
70
|
+
- - "~>"
|
70
71
|
- !ruby/object:Gem::Version
|
71
|
-
version:
|
72
|
+
version: 1.0.1
|
72
73
|
type: :runtime
|
73
74
|
prerelease: false
|
74
75
|
version_requirements: !ruby/object:Gem::Requirement
|
75
76
|
requirements:
|
76
|
-
- - "
|
77
|
+
- - "~>"
|
77
78
|
- !ruby/object:Gem::Version
|
78
|
-
version:
|
79
|
+
version: 1.0.1
|
79
80
|
- !ruby/object:Gem::Dependency
|
80
81
|
name: toml
|
81
82
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,16 +109,16 @@ dependencies:
|
|
108
109
|
name: xml-simple
|
109
110
|
requirement: !ruby/object:Gem::Requirement
|
110
111
|
requirements:
|
111
|
-
- - "
|
112
|
+
- - "~>"
|
112
113
|
- !ruby/object:Gem::Version
|
113
|
-
version:
|
114
|
+
version: 1.1.5
|
114
115
|
type: :runtime
|
115
116
|
prerelease: false
|
116
117
|
version_requirements: !ruby/object:Gem::Requirement
|
117
118
|
requirements:
|
118
|
-
- - "
|
119
|
+
- - "~>"
|
119
120
|
- !ruby/object:Gem::Version
|
120
|
-
version:
|
121
|
+
version: 1.1.5
|
121
122
|
- !ruby/object:Gem::Dependency
|
122
123
|
name: addressable
|
123
124
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,30 +179,30 @@ dependencies:
|
|
178
179
|
name: pry
|
179
180
|
requirement: !ruby/object:Gem::Requirement
|
180
181
|
requirements:
|
181
|
-
- - "
|
182
|
+
- - "~>"
|
182
183
|
- !ruby/object:Gem::Version
|
183
|
-
version:
|
184
|
+
version: 0.12.2
|
184
185
|
type: :development
|
185
186
|
prerelease: false
|
186
187
|
version_requirements: !ruby/object:Gem::Requirement
|
187
188
|
requirements:
|
188
|
-
- - "
|
189
|
+
- - "~>"
|
189
190
|
- !ruby/object:Gem::Version
|
190
|
-
version:
|
191
|
+
version: 0.12.2
|
191
192
|
- !ruby/object:Gem::Dependency
|
192
193
|
name: rake
|
193
194
|
requirement: !ruby/object:Gem::Requirement
|
194
195
|
requirements:
|
195
|
-
- - "
|
196
|
+
- - "~>"
|
196
197
|
- !ruby/object:Gem::Version
|
197
|
-
version:
|
198
|
+
version: 13.0.1
|
198
199
|
type: :development
|
199
200
|
prerelease: false
|
200
201
|
version_requirements: !ruby/object:Gem::Requirement
|
201
202
|
requirements:
|
202
|
-
- - "
|
203
|
+
- - "~>"
|
203
204
|
- !ruby/object:Gem::Version
|
204
|
-
version:
|
205
|
+
version: 13.0.1
|
205
206
|
- !ruby/object:Gem::Dependency
|
206
207
|
name: rspec
|
207
208
|
requirement: !ruby/object:Gem::Requirement
|
@@ -220,16 +221,16 @@ dependencies:
|
|
220
221
|
name: rspec-its
|
221
222
|
requirement: !ruby/object:Gem::Requirement
|
222
223
|
requirements:
|
223
|
-
- - "
|
224
|
+
- - "~>"
|
224
225
|
- !ruby/object:Gem::Version
|
225
|
-
version:
|
226
|
+
version: 1.3.0
|
226
227
|
type: :development
|
227
228
|
prerelease: false
|
228
229
|
version_requirements: !ruby/object:Gem::Requirement
|
229
230
|
requirements:
|
230
|
-
- - "
|
231
|
+
- - "~>"
|
231
232
|
- !ruby/object:Gem::Version
|
232
|
-
version:
|
233
|
+
version: 1.3.0
|
233
234
|
- !ruby/object:Gem::Dependency
|
234
235
|
name: rubocop
|
235
236
|
requirement: !ruby/object:Gem::Requirement
|
@@ -276,6 +277,9 @@ dependencies:
|
|
276
277
|
name: rack
|
277
278
|
requirement: !ruby/object:Gem::Requirement
|
278
279
|
requirements:
|
280
|
+
- - "~>"
|
281
|
+
- !ruby/object:Gem::Version
|
282
|
+
version: 2.0.7
|
279
283
|
- - ">"
|
280
284
|
- !ruby/object:Gem::Version
|
281
285
|
version: '1.6'
|
@@ -283,6 +287,9 @@ dependencies:
|
|
283
287
|
prerelease: false
|
284
288
|
version_requirements: !ruby/object:Gem::Requirement
|
285
289
|
requirements:
|
290
|
+
- - "~>"
|
291
|
+
- !ruby/object:Gem::Version
|
292
|
+
version: 2.0.7
|
286
293
|
- - ">"
|
287
294
|
- !ruby/object:Gem::Version
|
288
295
|
version: '1.6'
|
@@ -290,6 +297,9 @@ dependencies:
|
|
290
297
|
name: rack-test
|
291
298
|
requirement: !ruby/object:Gem::Requirement
|
292
299
|
requirements:
|
300
|
+
- - "~>"
|
301
|
+
- !ruby/object:Gem::Version
|
302
|
+
version: 1.1.0
|
293
303
|
- - ">"
|
294
304
|
- !ruby/object:Gem::Version
|
295
305
|
version: '0.7'
|
@@ -297,6 +307,9 @@ dependencies:
|
|
297
307
|
prerelease: false
|
298
308
|
version_requirements: !ruby/object:Gem::Requirement
|
299
309
|
requirements:
|
310
|
+
- - "~>"
|
311
|
+
- !ruby/object:Gem::Version
|
312
|
+
version: 1.1.0
|
300
313
|
- - ">"
|
301
314
|
- !ruby/object:Gem::Version
|
302
315
|
version: '0.7'
|