license_scout 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/license_scout/dependency_manager/base.rb +11 -0
- data/lib/license_scout/dependency_manager/bundler.rb +0 -5
- data/lib/license_scout/dependency_manager/cpanm.rb +0 -4
- data/lib/license_scout/dependency_manager/dep.rb +0 -3
- data/lib/license_scout/dependency_manager/glide.rb +0 -1
- data/lib/license_scout/dependency_manager/godep.rb +0 -1
- data/lib/license_scout/dependency_manager/habitat.rb +0 -4
- data/lib/license_scout/dependency_manager/mix.rb +13 -8
- data/lib/license_scout/dependency_manager/npm.rb +0 -2
- data/lib/license_scout/dependency_manager/rebar.rb +0 -4
- data/lib/license_scout/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02430edc2ee6cbf3fd57c4dd7048b79b96d2beae7819d97aca2cee02c7af47de
|
4
|
+
data.tar.gz: 3300b012f31cedfec976bd63668ceca809ef227b8550849770fcf687968ca4df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0555665a7c23cef578a0ba945f3eb41d2cef091355b6245cbde76da1735970cdc718d68a95b1e018304b39d0dee9f54039b2c1f282fa68522781a9befc596dde
|
7
|
+
data.tar.gz: d623ac0b7b744c1f014cbadf1d432c694acfff968e02149e037f684a52491c116dbff70070af7e7f24d70bebcd7a009ea21f0b64bfdd3e1f11fa8fae17bd7e42
|
@@ -17,6 +17,17 @@
|
|
17
17
|
|
18
18
|
require "licensee"
|
19
19
|
require "license_scout/dependency"
|
20
|
+
require "license_scout/exceptions"
|
21
|
+
|
22
|
+
require "bundler"
|
23
|
+
require "ffi_yajl"
|
24
|
+
require "net/http"
|
25
|
+
require "mixlib/shellout"
|
26
|
+
require "pathname"
|
27
|
+
require "psych"
|
28
|
+
require "set"
|
29
|
+
require "toml-rb"
|
30
|
+
require "yaml"
|
20
31
|
|
21
32
|
module LicenseScout
|
22
33
|
# The DependencyManager module (or more accurately, implementations of it) are responsible for recognizing
|
@@ -16,10 +16,6 @@
|
|
16
16
|
#
|
17
17
|
|
18
18
|
require "license_scout/dependency_manager/base"
|
19
|
-
require "license_scout/exceptions"
|
20
|
-
|
21
|
-
require "mixlib/shellout"
|
22
|
-
require "ffi_yajl"
|
23
19
|
|
24
20
|
module LicenseScout
|
25
21
|
module DependencyManager
|
@@ -95,10 +91,19 @@ module LicenseScout
|
|
95
91
|
end
|
96
92
|
|
97
93
|
def hex_info(package_name)
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
94
|
+
response = Net::HTTP.get_response(URI("https://hex.pm/api/packages/#{package_name}"))
|
95
|
+
|
96
|
+
if response.is_a?(Net::HTTPSuccess)
|
97
|
+
FFI_Yajl::Parser.parse(response.body)
|
98
|
+
else
|
99
|
+
case response.code
|
100
|
+
when "404"
|
101
|
+
LicenseScout::Log.debug("[elixir] Unable to download hex.pm info for #{package_name}")
|
102
|
+
{}
|
103
|
+
else
|
104
|
+
raise LicenseScout::Exceptions::UpstreamFetchError.new("Received \"#{response.code} #{response.msg}\" when attempting to fetch package information for the #{package_name} Hex package")
|
105
|
+
end
|
106
|
+
end
|
102
107
|
end
|
103
108
|
end
|
104
109
|
end
|