license_scout 2.1.3 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/gemfile_json +4 -1
- data/lib/license_scout/dependency_manager/bundler.rb +9 -8
- data/lib/license_scout/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef0c0a457de60ff29759a124e7ceda10b6823130c9fdff4dd0cd7b79fc26073f
|
4
|
+
data.tar.gz: 371933f9a69600f7943615e89d6350b353a4b3d78f806b8c6fa2c4f2a06252bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2eaa5c12c0e362ee7ae6d91e7f1005e5a2d14568bf7cdbef4f14f33e49a4c8d8017833700293e37d493f85a778179c9f511745b989c21940d4c0d481d4be4cbf
|
7
|
+
data.tar.gz: a37901f1b2716366900af58f92a45ff5c57a1d4f4921bac49a88bd4976a7b8babb1e0c5ec3fb7966f27fb08d9d47e995c686293ef72d02e7d466f750c7119848
|
data/bin/gemfile_json
CHANGED
@@ -36,11 +36,14 @@ require "json"
|
|
36
36
|
dependencies = []
|
37
37
|
|
38
38
|
Bundler.load.specs.each do |gem_spec|
|
39
|
+
gem_license = gem_spec.licenses.nil? ? gem_spec.license : gem_spec.licenses.first
|
40
|
+
|
39
41
|
dependencies << {
|
40
42
|
name: gem_spec.name,
|
41
43
|
version: gem_spec.version.to_s,
|
42
|
-
license:
|
44
|
+
license: gem_license,
|
43
45
|
path: gem_spec.full_gem_path,
|
46
|
+
homepage: gem_spec.homepage,
|
44
47
|
}
|
45
48
|
end
|
46
49
|
|
@@ -51,6 +51,7 @@ module LicenseScout
|
|
51
51
|
dependency_data.map do |gem_data|
|
52
52
|
dep_name = gem_data["name"]
|
53
53
|
dep_version = gem_data["version"]
|
54
|
+
dep_license = gem_data["license"]
|
54
55
|
|
55
56
|
dep_path = if dep_name == "bundler"
|
56
57
|
# Bundler is weird. It inserts itself as a dependency, but is a
|
@@ -58,18 +59,18 @@ module LicenseScout
|
|
58
59
|
# Additionally, rubygems reports the gem path as a path inside
|
59
60
|
# bundler's lib/ dir, so we have to munge it.
|
60
61
|
"https://github.com/bundler/bundler"
|
61
|
-
elsif dep_name == "json"
|
62
|
-
# json is different weird. When project is using the json that is prepackaged with
|
63
|
-
# Ruby, its included not as a full fledged gem but an *.rb file at:
|
64
|
-
# /opt/opscode/embedded/lib/ruby/2.2.0/json.rb
|
65
|
-
# Because of this its license is reported as nil and its license files can not be
|
66
|
-
# found. That is why we need to provide them manually here.
|
67
|
-
"https://github.com/flori/json"
|
68
62
|
else
|
69
63
|
gem_data["path"]
|
70
64
|
end
|
71
65
|
|
72
|
-
new_dependency(dep_name, dep_version, dep_path)
|
66
|
+
dependency = new_dependency(dep_name, dep_version, dep_path)
|
67
|
+
|
68
|
+
# If the gemspec has defined a license, include that as well.
|
69
|
+
unless dep_license.nil?
|
70
|
+
dependency.add_license(dep_license, "https://rubygems.org/gems/#{dep_name}/versions/#{dep_version}")
|
71
|
+
end
|
72
|
+
|
73
|
+
dependency
|
73
74
|
end.compact
|
74
75
|
end
|
75
76
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: license_scout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Serdar Sutay
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-10-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi-yajl
|