license_finder 6.6.2 → 6.7.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 +11 -2
- data/README.md +4 -3
- data/Rakefile +0 -9
- data/VERSION +1 -1
- data/lib/license_finder/package.rb +1 -0
- data/lib/license_finder/package_manager.rb +1 -0
- data/lib/license_finder/package_managers/erlangmk.rb +40 -0
- data/lib/license_finder/packages/erlangmk_package.rb +107 -0
- data/lib/license_finder/scanner.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b24945564259115c89ce1e2891676e85757074f15e38485ca498f5344b543ebd
|
4
|
+
data.tar.gz: 2ecc05295033dde8a53cb45d76b024e9acd06ba650cb8e83f991be74c0f2ea3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74e0144f9834798f971f024d167ce42afd653e29a2f279ef1b67ace4949ca1bd7ce8375264eb6d14a3bad67d2f4a5d7df5ee5a851cbb5b16df79c4c26555d471
|
7
|
+
data.tar.gz: 9c04d6fb15c1f84d41391dbed3a391f20cafe3511213632d7733c943dbb10d63709ced8ef520308b49421ae21fe2d519c5e38e1efb50fe6d70fb74a041218bf7
|
data/CHANGELOG.md
CHANGED
@@ -1,13 +1,21 @@
|
|
1
|
+
# [6.7.0] / 2020-07-23
|
2
|
+
|
1
3
|
# [6.6.2] / 2020-07-09
|
2
4
|
|
3
5
|
### Added
|
4
|
-
* support for rebar3
|
6
|
+
* support for rebar3 - [b20e7444](https://github.com/pivotal/LicenseFinder/commit/b20e7444c147d8dbfa46eb4e8e549e03be751e02) - Jeff Jun
|
7
|
+
* Support for Go modules projects outside of the current working directory - [56b3bec6](https://github.com/pivotal/LicenseFinder/commit/56b3bec632b3884ce4cad538742b4a13c55fd7c5)
|
8
|
+
|
9
|
+
### Changed
|
10
|
+
* Change Go modules to only report imported packages (as with other Go package managers) - [34361fda](https://github.com/pivotal/LicenseFinder/commit/34361fdab2dc3f197f7aec6408175018dee3b453) and [dffae4ab](https://github.com/pivotal/LicenseFinder/commit/dffae4ab95e34115b6a54bf681fc0966a8611f01)
|
11
|
+
* Detect Go modules based on `go.mod` (instead of `go.sum`) - [667f6be7](https://github.com/pivotal/LicenseFinder/commit/667f6be716504a53ccc2824daae08af085566546)
|
5
12
|
|
6
13
|
### Fixed
|
7
14
|
* handle empty case for mix dependencies [#173637843] - [fc34b281](https://github.com/pivotal/LicenseFinder/commit/fc34b2813925a709addde675849e199b05fc4a23) - Jeff Jun
|
8
15
|
|
9
16
|
### Removed
|
10
|
-
|
17
|
+
* support for rebar2 [#173637980] - [b20e7444](https://github.com/pivotal/LicenseFinder/commit/b20e7444c147d8dbfa46eb4e8e549e03be751e02) - Jeff Jun
|
18
|
+
* Removed the unnecessary prepare command for Go modules - [284cc5c8](https://github.com/pivotal/LicenseFinder/commit/284cc5c821270a6e56275e32bac836a3e451f46b)
|
11
19
|
|
12
20
|
# [6.6.1] / 2020-06-30
|
13
21
|
|
@@ -897,3 +905,4 @@ Bugfixes:
|
|
897
905
|
[6.6.0]: https://github.com/pivotal/LicenseFinder/compare/v6.5.0...v6.6.0
|
898
906
|
[6.6.1]: https://github.com/pivotal/LicenseFinder/compare/v6.6.0...v6.6.1
|
899
907
|
[6.6.2]: https://github.com/pivotal/LicenseFinder/compare/v6.6.1...v6.6.2
|
908
|
+
[6.7.0]: https://github.com/pivotal/LicenseFinder/compare/v6.6.2...v6.7.0
|
data/README.md
CHANGED
@@ -43,7 +43,7 @@ and give you an actionable exception report.
|
|
43
43
|
|
44
44
|
### Experimental project types
|
45
45
|
|
46
|
-
* Erlang (via `
|
46
|
+
* Erlang (via `rebar` and `Erlang.mk`)
|
47
47
|
* Objective-C, Swift (via Carthage or CocoaPods \[0.39 and below. See [CocoaPods Specs Repo Sharding](http://blog.cocoapods.org/Sharding/)\])
|
48
48
|
* Objective-C (+ CocoaPods 0.39 and below. See [CocoaPods Specs Repo Sharding](http://blog.cocoapods.org/Sharding/))
|
49
49
|
* Elixir (via `mix`)
|
@@ -175,7 +175,8 @@ languages, as long as that language has a package definition in the project dire
|
|
175
175
|
* `bower.json` (for `bower`)
|
176
176
|
* `Podfile` (for `pod`)
|
177
177
|
* `Cartfile` (for `carthage`)
|
178
|
-
* `rebar.config` (for `
|
178
|
+
* `rebar.config` (for `rebar`)
|
179
|
+
* `Erlang.mk` or `erlang.mk` file (for `Erlang.mk`)
|
179
180
|
* `mix.exs` (for `mix`)
|
180
181
|
* `packages/` directory (for `nuget`)
|
181
182
|
* `*.csproj` (for `dotnet`)
|
@@ -327,7 +328,7 @@ you should manually research what the actual license is. When you
|
|
327
328
|
have established the real license, you can record it with:
|
328
329
|
|
329
330
|
```sh
|
330
|
-
$ license_finder
|
331
|
+
$ license_finder licenses add my_unknown_dependency MIT --homepage="www.unknown-code.org"
|
331
332
|
```
|
332
333
|
|
333
334
|
This command would assign the MIT license to the dependency
|
data/Rakefile
CHANGED
@@ -6,15 +6,6 @@ Bundler::GemHelper.install_tasks
|
|
6
6
|
require './lib/license_finder/platform'
|
7
7
|
require 'rspec/core/rake_task'
|
8
8
|
|
9
|
-
namespace :spec do
|
10
|
-
desc 'Run test tagged \'focus\''
|
11
|
-
RSpec::Core::RakeTask.new(:focus) do |t|
|
12
|
-
t.fail_on_error = true
|
13
|
-
t.pattern = './spec/**/*_spec.rb'
|
14
|
-
t.rspec_opts = %w[--color --tag focus]
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
9
|
desc 'Run all specs in spec/'
|
19
10
|
RSpec::Core::RakeTask.new(:spec) do |t|
|
20
11
|
t.fail_on_error = true
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
6.
|
1
|
+
6.7.0
|
@@ -189,6 +189,7 @@ require 'license_finder/packages/gradle_package'
|
|
189
189
|
require 'license_finder/packages/cocoa_pods_package'
|
190
190
|
require 'license_finder/packages/carthage_package'
|
191
191
|
require 'license_finder/packages/rebar_package'
|
192
|
+
require 'license_finder/packages/erlangmk_package'
|
192
193
|
require 'license_finder/packages/mix_package'
|
193
194
|
require 'license_finder/packages/merged_package'
|
194
195
|
require 'license_finder/packages/nuget_package'
|
@@ -163,6 +163,7 @@ require 'license_finder/package_managers/cocoa_pods'
|
|
163
163
|
require 'license_finder/package_managers/carthage'
|
164
164
|
require 'license_finder/package_managers/gradle'
|
165
165
|
require 'license_finder/package_managers/rebar'
|
166
|
+
require 'license_finder/package_managers/erlangmk'
|
166
167
|
require 'license_finder/package_managers/nuget'
|
167
168
|
require 'license_finder/package_managers/dotnet'
|
168
169
|
require 'license_finder/package_managers/dep'
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module LicenseFinder
|
4
|
+
class Erlangmk < PackageManager
|
5
|
+
def package_management_command
|
6
|
+
'make'
|
7
|
+
end
|
8
|
+
|
9
|
+
def package_management_command_with_path
|
10
|
+
"#{package_management_command} --directory=#{project_path} --no-print-directory"
|
11
|
+
end
|
12
|
+
|
13
|
+
def prepare_command
|
14
|
+
"#{package_management_command_with_path} fetch-deps"
|
15
|
+
end
|
16
|
+
|
17
|
+
def possible_package_paths
|
18
|
+
[
|
19
|
+
project_path.join('Erlang.mk'),
|
20
|
+
project_path.join('erlang.mk')
|
21
|
+
]
|
22
|
+
end
|
23
|
+
|
24
|
+
def current_packages
|
25
|
+
deps.map do |dep|
|
26
|
+
ErlangmkPackage.new(dep)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def deps
|
33
|
+
command = "#{package_management_command_with_path} QUERY='name fetch_method repo version absolute_path' query-deps"
|
34
|
+
stdout, stderr, status = Cmd.run(command)
|
35
|
+
raise "Command '#{command}' failed to execute: #{stderr}" unless status.success?
|
36
|
+
|
37
|
+
stdout.each_line.map(&:strip).reject { |line| line.start_with?('make') }
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,107 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
|
5
|
+
class InvalidErlangmkPackageError < ArgumentError
|
6
|
+
end
|
7
|
+
|
8
|
+
module LicenseFinder
|
9
|
+
class ErlangmkPackage < Package
|
10
|
+
attr_reader :dep_parent,
|
11
|
+
:dep_name,
|
12
|
+
:dep_fetch_method,
|
13
|
+
:dep_repo_unformatted,
|
14
|
+
:dep_version_unformatted,
|
15
|
+
:dep_absolute_path
|
16
|
+
|
17
|
+
def initialize(dep_string_from_query_deps)
|
18
|
+
@dep_parent,
|
19
|
+
@dep_name,
|
20
|
+
@dep_fetch_method,
|
21
|
+
@dep_repo_unformatted,
|
22
|
+
@dep_version_unformatted,
|
23
|
+
@dep_absolute_path = dep_string_from_query_deps.split
|
24
|
+
|
25
|
+
raise_invalid(dep_string_from_query_deps) unless all_parts_valid?
|
26
|
+
|
27
|
+
super(
|
28
|
+
dep_name,
|
29
|
+
dep_version,
|
30
|
+
homepage: dep_repo,
|
31
|
+
install_path: dep_absolute_path
|
32
|
+
)
|
33
|
+
end
|
34
|
+
|
35
|
+
def package_manager
|
36
|
+
'Erlangmk'
|
37
|
+
end
|
38
|
+
|
39
|
+
def dep_version
|
40
|
+
@dep_version ||= begin
|
41
|
+
version_prefix_re = Regexp.new('^v')
|
42
|
+
dep_version_unformatted.sub(version_prefix_re, '')
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def dep_repo
|
47
|
+
@dep_repo ||= dep_repo_unformatted
|
48
|
+
.chomp('.git')
|
49
|
+
.sub('git@github.com:', 'https://github.com/')
|
50
|
+
end
|
51
|
+
|
52
|
+
def raise_invalid(dep_string)
|
53
|
+
invalid_dep_message = "'#{dep_string}' does not look like a valid Erlank.mk dependency"
|
54
|
+
valid_dep_example = "A valid dependency example: 'lager: goldrush git https://github.com/DeadZen/goldrush.git 0.1.9 /absolute/path/to/dep'"
|
55
|
+
raise(InvalidErlangmkPackageError, "#{invalid_dep_message}. #{valid_dep_example}")
|
56
|
+
end
|
57
|
+
|
58
|
+
def all_parts_valid?
|
59
|
+
dep_part_valid?(dep_parent) &&
|
60
|
+
dep_part_valid?(dep_name) &&
|
61
|
+
set?(dep_fetch_method) &&
|
62
|
+
dep_repo_valid? &&
|
63
|
+
dep_version_valid? &&
|
64
|
+
set?(dep_absolute_path)
|
65
|
+
end
|
66
|
+
|
67
|
+
private
|
68
|
+
|
69
|
+
def dep_part_valid?(dep_part)
|
70
|
+
set?(dep_part) &&
|
71
|
+
word?(dep_part)
|
72
|
+
end
|
73
|
+
|
74
|
+
def set?(dep_part)
|
75
|
+
!dep_part.nil? &&
|
76
|
+
!dep_part.empty?
|
77
|
+
end
|
78
|
+
|
79
|
+
def word?(dep_part)
|
80
|
+
dep = dep_part.chomp(':')
|
81
|
+
dep =~ word_re
|
82
|
+
end
|
83
|
+
|
84
|
+
def word_re
|
85
|
+
@word_re ||= Regexp.new('^\w+$')
|
86
|
+
end
|
87
|
+
|
88
|
+
def dep_repo_valid?
|
89
|
+
set?(dep_repo_unformatted) &&
|
90
|
+
URI.parse(dep_repo)
|
91
|
+
end
|
92
|
+
|
93
|
+
def dep_version_valid?
|
94
|
+
return false unless set?(dep_version_unformatted)
|
95
|
+
|
96
|
+
if dep_version =~ version_re
|
97
|
+
Gem::Version.correct?(dep_version)
|
98
|
+
else
|
99
|
+
dep_version =~ word_re
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
def version_re
|
104
|
+
@version_re ||= Regexp.new('\d+\.\d+\.\d+')
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
@@ -4,7 +4,7 @@ module LicenseFinder
|
|
4
4
|
class Scanner
|
5
5
|
PACKAGE_MANAGERS = [
|
6
6
|
GoModules, GoDep, GoWorkspace, Go15VendorExperiment, Glide, Gvt, Govendor, Trash, Dep, Bundler, NPM, Pip,
|
7
|
-
Yarn, Bower, Maven, Gradle, CocoaPods, Rebar, Nuget, Carthage, Mix, Conan, Sbt, Cargo, Dotnet, Composer, Pipenv
|
7
|
+
Yarn, Bower, Maven, Gradle, CocoaPods, Rebar, Erlangmk, Nuget, Carthage, Mix, Conan, Sbt, Cargo, Dotnet, Composer, Pipenv
|
8
8
|
].freeze
|
9
9
|
|
10
10
|
class << self
|
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.7.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: 2020-07-
|
30
|
+
date: 2020-07-23 00:00:00.000000000 Z
|
31
31
|
dependencies:
|
32
32
|
- !ruby/object:Gem::Dependency
|
33
33
|
name: bundler
|
@@ -414,6 +414,7 @@ files:
|
|
414
414
|
- lib/license_finder/package_managers/conan.rb
|
415
415
|
- lib/license_finder/package_managers/dep.rb
|
416
416
|
- lib/license_finder/package_managers/dotnet.rb
|
417
|
+
- lib/license_finder/package_managers/erlangmk.rb
|
417
418
|
- lib/license_finder/package_managers/glide.rb
|
418
419
|
- lib/license_finder/package_managers/go_15vendorexperiment.rb
|
419
420
|
- lib/license_finder/package_managers/go_dep.rb
|
@@ -449,6 +450,7 @@ files:
|
|
449
450
|
- lib/license_finder/packages/cocoa_pods_package.rb
|
450
451
|
- lib/license_finder/packages/composer_package.rb
|
451
452
|
- lib/license_finder/packages/conan_package.rb
|
453
|
+
- lib/license_finder/packages/erlangmk_package.rb
|
452
454
|
- lib/license_finder/packages/go_package.rb
|
453
455
|
- lib/license_finder/packages/gradle_package.rb
|
454
456
|
- lib/license_finder/packages/manual_package.rb
|