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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 02430edc2ee6cbf3fd57c4dd7048b79b96d2beae7819d97aca2cee02c7af47de
4
- data.tar.gz: 3300b012f31cedfec976bd63668ceca809ef227b8550849770fcf687968ca4df
3
+ metadata.gz: ef0c0a457de60ff29759a124e7ceda10b6823130c9fdff4dd0cd7b79fc26073f
4
+ data.tar.gz: 371933f9a69600f7943615e89d6350b353a4b3d78f806b8c6fa2c4f2a06252bd
5
5
  SHA512:
6
- metadata.gz: 0555665a7c23cef578a0ba945f3eb41d2cef091355b6245cbde76da1735970cdc718d68a95b1e018304b39d0dee9f54039b2c1f282fa68522781a9befc596dde
7
- data.tar.gz: d623ac0b7b744c1f014cbadf1d432c694acfff968e02149e037f684a52491c116dbff70070af7e7f24d70bebcd7a009ea21f0b64bfdd3e1f11fa8fae17bd7e42
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: gem_spec.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
 
@@ -16,5 +16,5 @@
16
16
  #
17
17
 
18
18
  module LicenseScout
19
- VERSION = "2.1.3"
19
+ VERSION = "2.1.4"
20
20
  end
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.3
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-09-17 00:00:00.000000000 Z
12
+ date: 2018-10-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi-yajl