bibliothecary 6.8.0 → 6.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bibliothecary/parsers/conda.rb +22 -4
- data/lib/bibliothecary/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eba49f95b74f689cbe73561342e6bb17c6e46a6ff29b3fce387d58d16b681e4c
|
4
|
+
data.tar.gz: 4e7c6979cd79bca265bb22561fe4ab401d77ac6233019e6a9a0bb0e40e5fbd34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99ed7c075636c3899a69116c24ada3a60564346703bed2271e41a0d2e587a91387fbcddae515a04d53c882ed2540d4574860104fdab4dd87421d5b56c5ecadd5
|
7
|
+
data.tar.gz: 89bffd86e5fc0ff5c4bf04829a287158f60b86ca4f6f686e0773267e27f48bfda910a403e791e6388efd078eeabd868a47804aa1a8fde04892297ada507692d5
|
@@ -19,8 +19,17 @@ module Bibliothecary
|
|
19
19
|
|
20
20
|
# Overrides Analyser.analyse_contents_from_info
|
21
21
|
def self.analyse_contents_from_info(info)
|
22
|
-
|
22
|
+
[parse_conda(info), parse_pip(info)].flatten.compact
|
23
|
+
rescue Bibliothecary::RemoteParsingError => e
|
24
|
+
Bibliothecary::Analyser::create_error_analysis(platform_name, info.relative_path, "runtime", e.message)
|
25
|
+
rescue Psych::SyntaxError => e
|
26
|
+
Bibliothecary::Analyser::create_error_analysis(platform_name, info.relative_path, "runtime", e.message)
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
23
30
|
|
31
|
+
def self.parse_conda(info)
|
32
|
+
results = call_conda_parser_web(info.contents)
|
24
33
|
FILE_KINDS.map do |kind|
|
25
34
|
Bibliothecary::Analyser.create_analysis(
|
26
35
|
"conda",
|
@@ -29,11 +38,20 @@ module Bibliothecary
|
|
29
38
|
results[kind].map { |dep| dep.slice(:name, :requirement).merge(type: "runtime") }
|
30
39
|
)
|
31
40
|
end
|
32
|
-
rescue Bibliothecary::RemoteParsingError => e
|
33
|
-
Bibliothecary::Analyser::create_error_analysis(platform_name, info.relative_path, "runtime", e.message)
|
34
41
|
end
|
35
42
|
|
36
|
-
|
43
|
+
def self.parse_pip(info)
|
44
|
+
dependencies = YAML.load(info.contents)["dependencies"]
|
45
|
+
pip = dependencies.find { |dep| dep.is_a?(Hash) && dep["pip"]}
|
46
|
+
return unless pip
|
47
|
+
|
48
|
+
Bibliothecary::Analyser.create_analysis(
|
49
|
+
"pypi",
|
50
|
+
info.relative_path,
|
51
|
+
"manifest",
|
52
|
+
Pypi.parse_requirements_txt(pip["pip"].join("\n"))
|
53
|
+
)
|
54
|
+
end
|
37
55
|
|
38
56
|
def self.call_conda_parser_web(file_contents)
|
39
57
|
host = Bibliothecary.configuration.conda_parser_host
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bibliothecary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.8.
|
4
|
+
version: 6.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Nesbitt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: toml-rb
|
@@ -302,8 +302,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
302
302
|
- !ruby/object:Gem::Version
|
303
303
|
version: '0'
|
304
304
|
requirements: []
|
305
|
-
|
306
|
-
rubygems_version: 2.7.6
|
305
|
+
rubygems_version: 3.0.4
|
307
306
|
signing_key:
|
308
307
|
specification_version: 4
|
309
308
|
summary: Find and parse manifests
|