bibliothecary 6.9.3 → 6.9.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: eddf54931d180a739e69e33150ff5b105994976ff9436eae7765a88d7a5d7169
4
- data.tar.gz: 8f53292f1e7c7be586f9810dc723fb39dd145b8f436b6d82c6eb984cf7a726da
3
+ metadata.gz: f57d8637d49aae8bd8f583109656fb0d350cfc158fc1361ed7402d3a6fba99e1
4
+ data.tar.gz: b85cb6e9c207463d3fa866c6ce5f9d2e6fd9f53db5da13ed1a7ef3d692bf8c63
5
5
  SHA512:
6
- metadata.gz: bc54928770a24ef0214a11ca1cb9400875cf752ce28c907651cdc1ac879736e2e1c3860f71a5ebfda275d860dff4c495fcafb2f44cfd6c2b3f8f252b404dc7bc
7
- data.tar.gz: 9886c713649ec7503b7106c91fb1b5242d898ccb1fbd65462494c4d80b56186f08b536fa321fba6658e4c7ba183d624cc974e20c29b7e4bd6ffd3e8c3756661d
6
+ metadata.gz: 1a7983ac7b9dfb8b17bab91a9a30afce59dc4ae0b7c6c9259eadd2bd0dfb4354aa77a01193bd02737c4bf57c3b58ab2c7c2ad44c3106eef4a5a3e9a377a336fa
7
+ data.tar.gz: a824e5fb5bcba3393c4f75e26a79c63b75127419777b287a1e3870a659b1d35b345e40fb7a4e19a3cffbc98b72543eac0d27f9c3064f1006f6200d6e2f0be1e5
@@ -29,6 +29,10 @@ module Bibliothecary
29
29
  runner.load_file_info_list(path)
30
30
  end
31
31
 
32
+ def self.load_file_info_list_from_paths(paths)
33
+ runner.load_file_info_list_from_paths(paths)
34
+ end
35
+
32
36
  def self.analyse_file(file_path, contents)
33
37
  runner.analyse_file(file_path, contents)
34
38
  end
@@ -45,6 +49,10 @@ module Bibliothecary
45
49
  runner.find_manifests(path)
46
50
  end
47
51
 
52
+ def self.find_manifests_from_paths(paths)
53
+ runner.find_manifests_from_paths(paths)
54
+ end
55
+
48
56
  def self.ignored_dirs
49
57
  configuration.ignored_dirs
50
58
  end
@@ -46,6 +46,19 @@ module Bibliothecary
46
46
  Bibliothecary::Parsers.constants.map{|c| Bibliothecary::Parsers.const_get(c) }.sort_by{|c| c.to_s.downcase }
47
47
  end
48
48
 
49
+ def load_file_info_list_from_paths(paths)
50
+ file_list = []
51
+ paths.each do |path|
52
+ info = FileInfo.new(nil, path)
53
+
54
+ next if ignored_files.include?(info.relative_path)
55
+
56
+ init_package_manager(info)
57
+ file_list.push(info)
58
+ end
59
+ file_list
60
+ end
61
+
49
62
  def load_file_info_list(path)
50
63
  file_list = []
51
64
  Find.find(path) do |subpath|
@@ -65,6 +78,10 @@ module Bibliothecary
65
78
  RelatedFilesInfo.create_from_file_infos(load_file_info_list(path).reject { |info| info.package_manager.nil? })
66
79
  end
67
80
 
81
+ def find_manifests_from_paths(paths)
82
+ RelatedFilesInfo.create_from_file_infos(load_file_info_list_from_paths(paths).reject { |info| info.package_manager.nil? })
83
+ end
84
+
68
85
  def analyse_file(file_path, contents)
69
86
  package_managers.select { |pm| pm.match?(file_path, contents) }.map do |pm|
70
87
  pm.analyse_contents(file_path, contents)
@@ -1,3 +1,3 @@
1
1
  module Bibliothecary
2
- VERSION = "6.9.3"
2
+ VERSION = "6.9.4"
3
3
  end
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.9.3
4
+ version: 6.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Nesbitt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-24 00:00:00.000000000 Z
11
+ date: 2020-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: toml-rb