license_finder 5.7.1 → 5.8.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 +9 -0
- data/Dockerfile +11 -14
- data/README.md +3 -2
- data/VERSION +1 -1
- data/ci/pipelines/release.yml.erb +1 -1
- data/ci/scripts/run-rubocop.sh +6 -3
- data/ci/scripts/run-tests.sh +1 -1
- data/lib/license_finder/package_manager.rb +1 -0
- data/lib/license_finder/package_managers/bundler.rb +11 -0
- data/lib/license_finder/package_managers/go_modules.rb +1 -2
- data/lib/license_finder/package_managers/govendor.rb +1 -1
- data/lib/license_finder/package_managers/trash.rb +38 -0
- data/lib/license_finder/scanner.rb +1 -1
- data/license_finder.gemspec +7 -6
- metadata +29 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3ddaa44514959c64554705bd86e147b70ca1067e3a0949549b18a0431204999
|
4
|
+
data.tar.gz: '07853ae9c40dee27d37946ed1ae1f0a9300e440184926037a18169cab0a8d696'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d213c171689b5839d5ea00beced104e6e4a33346e658390005d2a6c786d5a06c3da578e2fa0edcea290b457260e90305d0129be25530efa19858fc594f38671
|
7
|
+
data.tar.gz: 7f56df207a2d49adff14d8855e6ac2bf218f6934115afafd47f2066d45fe88041082052d5cf07a73dde596589a432074099d6d0336d19f4b16268f705194f4df
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
# [5.8.0] / 2019-05-22
|
2
|
+
|
3
|
+
### Added
|
4
|
+
* Trash Package Manager - [3a3d854](https://github.com/pivotal-legacy/LicenseFinder/commit/3a3d8541c4ea64607df6b120111aff324f93778d)
|
5
|
+
|
6
|
+
### Fixed
|
7
|
+
* Prefer to use `origin` over `path` for govendor - [31c6041](https://github.com/pivotal-legacy/LicenseFinder/commit/31c6041926a27b61c35c05c6433a87d0af78c1e5)
|
8
|
+
|
1
9
|
# [5.7.1] / 2019-03-08
|
2
10
|
|
3
11
|
# [5.7.0] / 2019-03-01
|
@@ -700,3 +708,4 @@ Bugfixes:
|
|
700
708
|
[5.6.2]: https://github.com/pivotal-legacy/LicenseFinder/compare/v5.6.1...v5.6.2
|
701
709
|
[5.7.0]: https://github.com/pivotal-legacy/LicenseFinder/compare/v5.6.2...v5.7.0
|
702
710
|
[5.7.1]: https://github.com/pivotal-legacy/LicenseFinder/compare/v5.7.0...v5.7.1
|
711
|
+
[5.8.0]: https://github.com/pivotal-legacy/LicenseFinder/compare/v5.7.1...v5.8.0
|
data/Dockerfile
CHANGED
@@ -8,6 +8,7 @@ ENV SBT_VERSION 1.1.1
|
|
8
8
|
ENV GRADLE_VERSION 4.10.3
|
9
9
|
ENV RUBY_VERSION 2.6.1
|
10
10
|
ENV MIX_VERSION 1.0
|
11
|
+
ENV JDK_VERISON 8u211
|
11
12
|
|
12
13
|
# programs needed for building
|
13
14
|
RUN apt-get update && apt-get install -y \
|
@@ -34,18 +35,13 @@ RUN npm install -g bower && \
|
|
34
35
|
|
35
36
|
#install java 8
|
36
37
|
#http://askubuntu.com/questions/521145/how-to-install-oracle-java-on-ubuntu-14-04
|
37
|
-
RUN
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
ENV J2SDKDIR=/usr/lib/jvm/oracle_jdk8
|
45
|
-
ENV J2REDIR=/usr/lib/jvm/oracle_jdk8/jre
|
46
|
-
ENV PATH=$PATH:/usr/lib/jvm/oracle_jdk8/bin:/usr/lib/jvm/oracle_jdk8/db/bin:/usr/lib/jvm/oracle_jdk8/jre/bin
|
47
|
-
ENV JAVA_HOME=/usr/lib/jvm/oracle_jdk8
|
48
|
-
ENV DERBY_HOME=/usr/lib/jvm/oracle_jdk8/db
|
38
|
+
RUN apt-get install -y openjdk-8-jdk
|
39
|
+
RUN JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
|
40
|
+
|
41
|
+
ENV J2SDKDIR=/usr/lib/jvm/java-8-openjdk-amd64
|
42
|
+
ENV J2REDIR=/usr/lib/jvm/java-8-openjdk-amd64/jre
|
43
|
+
ENV PATH=$PATH:/usr/lib/jvm/java-8-openjdk-amd64/bin:/usr/lib/jvm/java-8-openjdk-amd64/jre/bin
|
44
|
+
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
|
49
45
|
|
50
46
|
RUN java -version
|
51
47
|
|
@@ -96,7 +92,8 @@ RUN mkdir /gopath && \
|
|
96
92
|
go get github.com/FiloSottile/gvt && \
|
97
93
|
go get github.com/Masterminds/glide && \
|
98
94
|
go get github.com/kardianos/govendor && \
|
99
|
-
go get github.com/golang/dep/cmd/dep
|
95
|
+
go get github.com/golang/dep/cmd/dep && \
|
96
|
+
go get -u github.com/rancher/trash
|
100
97
|
|
101
98
|
# Fix the locale
|
102
99
|
RUN apt-get install -y locales
|
@@ -106,7 +103,7 @@ ENV LANGUAGE=en_US:en
|
|
106
103
|
ENV LC_ALL=en_US.UTF-8
|
107
104
|
|
108
105
|
#install rvm
|
109
|
-
RUN gpg --keyserver hkp://
|
106
|
+
RUN gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB && \
|
110
107
|
curl -sSL https://rvm.io/mpapis.asc | gpg --import && \
|
111
108
|
curl -sSL https://get.rvm.io | sudo bash -s stable --ruby=$RUBY_VERSION
|
112
109
|
ENV PATH=/usr/local/rvm/bin:$PATH
|
data/README.md
CHANGED
@@ -36,7 +36,7 @@ report.
|
|
36
36
|
| Nuget (without license discovery) | nuget | 4.7.1.5393 |
|
37
37
|
| Godep | Godep | 80 |
|
38
38
|
| Go workspace (via a `.envrc` file) | Go lang | 1.11.5 |
|
39
|
-
| Go
|
39
|
+
| Go modules | Go lang | 1.11.5 |
|
40
40
|
| Java | maven | 3.6.0 |
|
41
41
|
| Java | gradle | 4.10.3 |
|
42
42
|
|
@@ -46,7 +46,7 @@ report.
|
|
46
46
|
* Objective-C, Swift (via Carthage or CocoaPods \[0.39 and below. See [CocoaPods Specs Repo Sharding](http://blog.cocoapods.org/Sharding/)\])
|
47
47
|
* Objective-C (+ CocoaPods 0.39 and below. See [CocoaPods Specs Repo Sharding](http://blog.cocoapods.org/Sharding/))
|
48
48
|
* Elixir (via `mix`)
|
49
|
-
* Golang (via `gvt`, `glide`,`dep`, and `govendor`)
|
49
|
+
* Golang (via `gvt`, `glide`,`dep`, `trash` and `govendor`)
|
50
50
|
* JavaScript (via `yarn`)
|
51
51
|
* C++/C (via `conan`)
|
52
52
|
* Scala (via `sbt`)
|
@@ -181,6 +181,7 @@ languages, as long as that language has a package definition in the project dire
|
|
181
181
|
* `vendor/vendor.json` file (for `govendor`)
|
182
182
|
* `Gopkg.lock` file (for `dep`)
|
183
183
|
* `go.sum` file (for `go mod`)
|
184
|
+
* `vendor.conf` file (for `trash`)
|
184
185
|
* `yarn.lock` file (for `yarn`)
|
185
186
|
* `conanfile.txt` file (for `conan`)
|
186
187
|
* `build.sbt` file (for `sbt`)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.
|
1
|
+
5.8.0
|
data/ci/scripts/run-rubocop.sh
CHANGED
@@ -4,8 +4,11 @@ cd LicenseFinder
|
|
4
4
|
|
5
5
|
bundle install --without runtime default
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
rubocop_version=`cat Gemfile.lock | grep ' rubocop' | awk -F'[\(*\)]' '{print $2;exit}'`
|
8
|
+
rubocop_performance_version=`cat Gemfile.lock | grep ' rubocop-performance' | awk -F'[\(*\)]' '{print $2;exit}'`
|
9
|
+
|
10
|
+
gem install rubocop --version $rubocop_version
|
11
|
+
gem install rubocop-performance --version $rubocop_performance_version
|
9
12
|
|
10
13
|
echo "Running Rubocop ..."
|
11
|
-
/usr/local/bundle/bin/rubocop
|
14
|
+
/usr/local/bundle/bin/rubocop --require rubocop-performance
|
data/ci/scripts/run-tests.sh
CHANGED
@@ -143,6 +143,7 @@ require 'license_finder/package_managers/gvt'
|
|
143
143
|
require 'license_finder/package_managers/glide'
|
144
144
|
require 'license_finder/package_managers/govendor'
|
145
145
|
require 'license_finder/package_managers/go_modules'
|
146
|
+
require 'license_finder/package_managers/trash'
|
146
147
|
require 'license_finder/package_managers/bundler'
|
147
148
|
require 'license_finder/package_managers/npm'
|
148
149
|
require 'license_finder/package_managers/yarn'
|
@@ -37,6 +37,9 @@ module LicenseFinder
|
|
37
37
|
|
38
38
|
def definition
|
39
39
|
# DI
|
40
|
+
ENV['BUNDLE_PATH'] = project_path.to_s
|
41
|
+
ENV['BUNDLE_GEMFILE'] = "#{project_path}/Gemfile"
|
42
|
+
|
40
43
|
@definition ||= ::Bundler::Definition.build(detected_package_path, lockfile_path, nil)
|
41
44
|
end
|
42
45
|
|
@@ -52,6 +55,10 @@ module LicenseFinder
|
|
52
55
|
|
53
56
|
# clear gem paths before runninng specs_for
|
54
57
|
Gem.clear_paths
|
58
|
+
if File.exist?(bundler_config_path)
|
59
|
+
::Bundler.reset!
|
60
|
+
::Bundler.configure
|
61
|
+
end
|
55
62
|
@gem_details = definition.specs_for(included_groups)
|
56
63
|
end
|
57
64
|
|
@@ -67,6 +74,10 @@ module LicenseFinder
|
|
67
74
|
project_path.join('Gemfile.lock')
|
68
75
|
end
|
69
76
|
|
77
|
+
def bundler_config_path
|
78
|
+
project_path.join('.bundle')
|
79
|
+
end
|
80
|
+
|
70
81
|
def log_package_dependencies(package)
|
71
82
|
dependencies = package.children
|
72
83
|
if dependencies.empty?
|
@@ -12,7 +12,7 @@ module LicenseFinder
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def prepare_command
|
15
|
-
'GO111MODULE=on go mod vendor'
|
15
|
+
'GO111MODULE=on go mod tidy && GO111MODULE=on go mod vendor'
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
@@ -30,7 +30,6 @@ module LicenseFinder
|
|
30
30
|
packages.reject do |package|
|
31
31
|
Pathname(package.install_path).cleanpath == Pathname(project_path).cleanpath
|
32
32
|
end
|
33
|
-
# binding.pry
|
34
33
|
end
|
35
34
|
|
36
35
|
private
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module LicenseFinder
|
4
|
+
class Trash < PackageManager
|
5
|
+
class << self
|
6
|
+
def package_management_command
|
7
|
+
'trash'
|
8
|
+
end
|
9
|
+
|
10
|
+
def prepare_command
|
11
|
+
'trash'
|
12
|
+
end
|
13
|
+
|
14
|
+
def takes_priority_over
|
15
|
+
Go15VendorExperiment
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def possible_package_paths
|
20
|
+
[project_path.join('vendor.conf')]
|
21
|
+
end
|
22
|
+
|
23
|
+
def current_packages
|
24
|
+
dependencies_path = project_path.join('trash.lock')
|
25
|
+
|
26
|
+
YAML.load_file(dependencies_path).fetch('import').map do |package_hash|
|
27
|
+
import_path = package_hash.fetch('package')
|
28
|
+
license_path = project_path.join('vendor', import_path)
|
29
|
+
|
30
|
+
GoPackage.from_dependency({
|
31
|
+
'ImportPath' => import_path,
|
32
|
+
'InstallPath' => license_path,
|
33
|
+
'Rev' => package_hash.fetch('version')
|
34
|
+
}, nil, true)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module LicenseFinder
|
4
4
|
class Scanner
|
5
|
-
PACKAGE_MANAGERS = [GoModules, GoDep, GoWorkspace, Go15VendorExperiment, Glide, Gvt, Govendor, Dep, Bundler, NPM, Pip,
|
5
|
+
PACKAGE_MANAGERS = [GoModules, GoDep, GoWorkspace, Go15VendorExperiment, Glide, Gvt, Govendor, Trash, Dep, Bundler, NPM, Pip,
|
6
6
|
Yarn, Bower, Maven, Gradle, CocoaPods, Rebar, Nuget, Carthage, Mix, Conan, Sbt, Cargo, Dotnet].freeze
|
7
7
|
|
8
8
|
def initialize(config = { project_path: Pathname.new('') })
|
data/license_finder.gemspec
CHANGED
@@ -50,17 +50,18 @@ Gem::Specification.new do |s|
|
|
50
50
|
s.add_dependency 'with_env', '1.1.0'
|
51
51
|
s.add_dependency 'xml-simple'
|
52
52
|
|
53
|
-
s.add_development_dependency 'addressable', '2.
|
54
|
-
s.add_development_dependency 'capybara', '~> 3.
|
53
|
+
s.add_development_dependency 'addressable', '2.6.0'
|
54
|
+
s.add_development_dependency 'capybara', '~> 3.15.0'
|
55
55
|
s.add_development_dependency 'cocoapods', '>= 1.0.0' if RUBY_PLATFORM =~ /darwin/
|
56
|
-
s.add_development_dependency 'fakefs', '~> 0.
|
57
|
-
s.add_development_dependency 'mime-types', '3.
|
56
|
+
s.add_development_dependency 'fakefs', '~> 0.20.0'
|
57
|
+
s.add_development_dependency 'mime-types', '3.2.2'
|
58
58
|
s.add_development_dependency 'pry'
|
59
59
|
s.add_development_dependency 'rake'
|
60
60
|
s.add_development_dependency 'rspec', '~> 3'
|
61
61
|
s.add_development_dependency 'rspec-its'
|
62
|
-
s.add_development_dependency 'rubocop', '~> 0.
|
63
|
-
s.add_development_dependency '
|
62
|
+
s.add_development_dependency 'rubocop', '~> 0.70.0'
|
63
|
+
s.add_development_dependency 'rubocop-performance', '~> 1.3.0'
|
64
|
+
s.add_development_dependency 'webmock', '~> 3.5'
|
64
65
|
|
65
66
|
# to preserve ruby < 2.2.2 support.
|
66
67
|
s.add_development_dependency 'rack', (RUBY_VERSION < '2.2.2' ? '1.6.0' : '> 1.6')
|
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: 5.
|
4
|
+
version: 5.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Collins
|
@@ -27,7 +27,7 @@ authors:
|
|
27
27
|
autorequire:
|
28
28
|
bindir: bin
|
29
29
|
cert_chain: []
|
30
|
-
date: 2019-
|
30
|
+
date: 2019-05-22 00:00:00.000000000 Z
|
31
31
|
dependencies:
|
32
32
|
- !ruby/object:Gem::Dependency
|
33
33
|
name: bundler
|
@@ -119,56 +119,56 @@ dependencies:
|
|
119
119
|
requirements:
|
120
120
|
- - '='
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version: 2.
|
122
|
+
version: 2.6.0
|
123
123
|
type: :development
|
124
124
|
prerelease: false
|
125
125
|
version_requirements: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
127
|
- - '='
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
version: 2.
|
129
|
+
version: 2.6.0
|
130
130
|
- !ruby/object:Gem::Dependency
|
131
131
|
name: capybara
|
132
132
|
requirement: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
134
|
- - "~>"
|
135
135
|
- !ruby/object:Gem::Version
|
136
|
-
version: 3.
|
136
|
+
version: 3.15.0
|
137
137
|
type: :development
|
138
138
|
prerelease: false
|
139
139
|
version_requirements: !ruby/object:Gem::Requirement
|
140
140
|
requirements:
|
141
141
|
- - "~>"
|
142
142
|
- !ruby/object:Gem::Version
|
143
|
-
version: 3.
|
143
|
+
version: 3.15.0
|
144
144
|
- !ruby/object:Gem::Dependency
|
145
145
|
name: fakefs
|
146
146
|
requirement: !ruby/object:Gem::Requirement
|
147
147
|
requirements:
|
148
148
|
- - "~>"
|
149
149
|
- !ruby/object:Gem::Version
|
150
|
-
version: 0.
|
150
|
+
version: 0.20.0
|
151
151
|
type: :development
|
152
152
|
prerelease: false
|
153
153
|
version_requirements: !ruby/object:Gem::Requirement
|
154
154
|
requirements:
|
155
155
|
- - "~>"
|
156
156
|
- !ruby/object:Gem::Version
|
157
|
-
version: 0.
|
157
|
+
version: 0.20.0
|
158
158
|
- !ruby/object:Gem::Dependency
|
159
159
|
name: mime-types
|
160
160
|
requirement: !ruby/object:Gem::Requirement
|
161
161
|
requirements:
|
162
162
|
- - '='
|
163
163
|
- !ruby/object:Gem::Version
|
164
|
-
version:
|
164
|
+
version: 3.2.2
|
165
165
|
type: :development
|
166
166
|
prerelease: false
|
167
167
|
version_requirements: !ruby/object:Gem::Requirement
|
168
168
|
requirements:
|
169
169
|
- - '='
|
170
170
|
- !ruby/object:Gem::Version
|
171
|
-
version:
|
171
|
+
version: 3.2.2
|
172
172
|
- !ruby/object:Gem::Dependency
|
173
173
|
name: pry
|
174
174
|
requirement: !ruby/object:Gem::Requirement
|
@@ -231,28 +231,42 @@ dependencies:
|
|
231
231
|
requirements:
|
232
232
|
- - "~>"
|
233
233
|
- !ruby/object:Gem::Version
|
234
|
-
version: 0.
|
234
|
+
version: 0.70.0
|
235
235
|
type: :development
|
236
236
|
prerelease: false
|
237
237
|
version_requirements: !ruby/object:Gem::Requirement
|
238
238
|
requirements:
|
239
239
|
- - "~>"
|
240
240
|
- !ruby/object:Gem::Version
|
241
|
-
version: 0.
|
241
|
+
version: 0.70.0
|
242
|
+
- !ruby/object:Gem::Dependency
|
243
|
+
name: rubocop-performance
|
244
|
+
requirement: !ruby/object:Gem::Requirement
|
245
|
+
requirements:
|
246
|
+
- - "~>"
|
247
|
+
- !ruby/object:Gem::Version
|
248
|
+
version: 1.3.0
|
249
|
+
type: :development
|
250
|
+
prerelease: false
|
251
|
+
version_requirements: !ruby/object:Gem::Requirement
|
252
|
+
requirements:
|
253
|
+
- - "~>"
|
254
|
+
- !ruby/object:Gem::Version
|
255
|
+
version: 1.3.0
|
242
256
|
- !ruby/object:Gem::Dependency
|
243
257
|
name: webmock
|
244
258
|
requirement: !ruby/object:Gem::Requirement
|
245
259
|
requirements:
|
246
260
|
- - "~>"
|
247
261
|
- !ruby/object:Gem::Version
|
248
|
-
version: '
|
262
|
+
version: '3.5'
|
249
263
|
type: :development
|
250
264
|
prerelease: false
|
251
265
|
version_requirements: !ruby/object:Gem::Requirement
|
252
266
|
requirements:
|
253
267
|
- - "~>"
|
254
268
|
- !ruby/object:Gem::Version
|
255
|
-
version: '
|
269
|
+
version: '3.5'
|
256
270
|
- !ruby/object:Gem::Dependency
|
257
271
|
name: rack
|
258
272
|
requirement: !ruby/object:Gem::Requirement
|
@@ -394,6 +408,7 @@ files:
|
|
394
408
|
- lib/license_finder/package_managers/pip.rb
|
395
409
|
- lib/license_finder/package_managers/rebar.rb
|
396
410
|
- lib/license_finder/package_managers/sbt.rb
|
411
|
+
- lib/license_finder/package_managers/trash.rb
|
397
412
|
- lib/license_finder/package_managers/yarn.rb
|
398
413
|
- lib/license_finder/package_utils/activation.rb
|
399
414
|
- lib/license_finder/package_utils/conan_info_parser.rb
|