license_scout 2.1.1 → 2.1.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e473b91a8ecd48f0f275b6d5e9ac7093adcafb244ab1237b5b5474f4fce24d8
|
4
|
+
data.tar.gz: 6a376513496e154780cae375fac9aa6b897117dcd418f847e84225eacdc46b68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ba5829b5be0cda80d42b58c2f09151ccf592b3006699d49edf790aa2a6d6aea41b696293e60992055c995ad4c1ef97c8804804e50ab30ffe25f17248466ed2b
|
7
|
+
data.tar.gz: 3dbc221cc0f6c2bd9dbdecd96c1c539c0188e43d8bf55ce791a5854bc9766b6d8a1b0feb324bdaa91e8d19521ae3a3d85b94a02fc9acc0701034e4c7363b9dd0
|
@@ -35,6 +35,10 @@ module LicenseScout
|
|
35
35
|
dependency_managers.each { |d| collect_licenses_from(d) }
|
36
36
|
|
37
37
|
LicenseScout::Log.info("[collector] All licenses successfully collected")
|
38
|
+
rescue Exceptions::UpstreamFetchError => e
|
39
|
+
LicenseScout::Log.error("[collector] Encountered an error attempting to fetch package metadata from upstream source:")
|
40
|
+
LicenseScout::Log.error("[collector] #{e}")
|
41
|
+
raise Exceptions::FailExit.new(e)
|
38
42
|
rescue Exceptions::PackageNotFound => e
|
39
43
|
LicenseScout::Log.error("[collector] One of the project's transitive dependencies could not be found:")
|
40
44
|
LicenseScout::Log.error("[collector] #{e}")
|
@@ -18,7 +18,7 @@
|
|
18
18
|
require "license_scout/dependency_manager/base"
|
19
19
|
require "license_scout/exceptions"
|
20
20
|
|
21
|
-
require "
|
21
|
+
require "net/http"
|
22
22
|
require "mixlib/shellout"
|
23
23
|
|
24
24
|
module LicenseScout
|
@@ -74,10 +74,6 @@ module LicenseScout
|
|
74
74
|
end.compact
|
75
75
|
end
|
76
76
|
|
77
|
-
def fetched_urls
|
78
|
-
@fetched_urls ||= {}
|
79
|
-
end
|
80
|
-
|
81
77
|
private
|
82
78
|
|
83
79
|
def license_from_manifest(manifest_content)
|
@@ -144,11 +140,18 @@ module LicenseScout
|
|
144
140
|
end
|
145
141
|
|
146
142
|
LicenseScout::Log.debug("[habitat] Fetching pkg_info from #{base_api_uri}")
|
147
|
-
|
148
|
-
|
143
|
+
response = Net::HTTP.get_response(URI(base_api_uri))
|
144
|
+
|
145
|
+
if response.is_a?(Net::HTTPSuccess)
|
146
|
+
FFI_Yajl::Parser.parse(response.body)
|
147
|
+
else
|
148
|
+
case response.code
|
149
|
+
when "404"
|
150
|
+
nil
|
151
|
+
else
|
152
|
+
raise LicenseScout::Exceptions::UpstreamFetchError.new("Received \"#{response.code} #{response.msg}\" when attempting to fetch package information for the #{origin}/#{name} Habitat package")
|
153
|
+
end
|
149
154
|
end
|
150
|
-
rescue OpenURI::HTTPError
|
151
|
-
nil
|
152
155
|
end
|
153
156
|
|
154
157
|
def channel_for_origin(pkg_origin)
|
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.2
|
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-09-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi-yajl
|