bibliothecary 6.8.1 → 6.8.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: 378e983675d94e76e43f46f817d52a998117ae5087eafd7560d59332331f984b
|
4
|
+
data.tar.gz: e0b15d4f98ee40e47419ac2e28cbc916ec8d3f2349d3823f45bc71e20b8b31f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca1645d2941bb6098cabb01faedb1a2a25eb1888c4b87d078108a7bd6cae6ff7b93e2dfc852f4cbb239f70d63e36baabdbe3cb8afdd90b6107181f86c30cf0e1
|
7
|
+
data.tar.gz: de5e4d546172d0e661d52e8f951624b134ec9ad2cf4a04bdbecbe7f5aa23305f8f42df25c4e8fba3888a477109e5707b43e44d422c923bad3b6c3bb598d8d3c4
|
@@ -4,7 +4,7 @@ module Bibliothecary
|
|
4
4
|
module Parsers
|
5
5
|
class Conda
|
6
6
|
include Bibliothecary::Analyser
|
7
|
-
FILE_KINDS = %
|
7
|
+
FILE_KINDS = %w[manifest lockfile]
|
8
8
|
|
9
9
|
def self.mapping
|
10
10
|
{
|
@@ -34,14 +34,14 @@ module Bibliothecary
|
|
34
34
|
Bibliothecary::Analyser.create_analysis(
|
35
35
|
"conda",
|
36
36
|
info.relative_path,
|
37
|
-
kind
|
38
|
-
results[kind].map { |dep| dep.slice(:name, :requirement).merge(type: "runtime") }
|
37
|
+
kind,
|
38
|
+
results[kind.to_sym].map { |dep| dep.slice(:name, :requirement).merge(type: "runtime") }
|
39
39
|
)
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
43
|
def self.parse_pip(info)
|
44
|
-
dependencies = YAML.
|
44
|
+
dependencies = YAML.safe_load(info.contents)["dependencies"]
|
45
45
|
pip = dependencies.find { |dep| dep.is_a?(Hash) && dep["pip"]}
|
46
46
|
return unless pip
|
47
47
|
|
@@ -21,8 +21,9 @@ module Bibliothecary
|
|
21
21
|
package_manager = file_infos.first.package_manager
|
22
22
|
@platform = package_manager.platform_name
|
23
23
|
@path = Pathname.new(File.dirname(file_infos.first.relative_path)).cleanpath.to_path
|
24
|
-
|
25
|
-
@
|
24
|
+
# `package_manager.determine_kind_from_info(info)` can be an Array, so use include? which also works for string
|
25
|
+
@manifests = file_infos.select { |info| package_manager.determine_kind_from_info(info).include? "manifest" }.map { |info| File.basename(info.relative_path) }
|
26
|
+
@lockfiles = file_infos.select { |info| package_manager.determine_kind_from_info(info).include? "lockfile" }.map { |info| File.basename(info.relative_path) }
|
26
27
|
end
|
27
28
|
end
|
28
29
|
end
|
data/lib/bibliothecary/runner.rb
CHANGED
@@ -62,7 +62,7 @@ module Bibliothecary
|
|
62
62
|
end
|
63
63
|
|
64
64
|
def find_manifests(path)
|
65
|
-
|
65
|
+
RelatedFilesInfo.create_from_file_infos(load_file_info_list(path).reject { |info| info.package_manager.nil? })
|
66
66
|
end
|
67
67
|
|
68
68
|
def analyse_file(file_path, contents)
|
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.2
|
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-
|
11
|
+
date: 2019-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: toml-rb
|