bibliothecary 5.4.0 → 5.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bibliothecary.rb +8 -3
- data/lib/bibliothecary/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a5cc5449d7443099fcde55774751889cc87d20a
|
4
|
+
data.tar.gz: a4a956f924440d5e17374fdd0d633d20e56e51a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 585965a69e2f449d481326f4a32f9a253892f68da94f056d8ac4cd152e01b4641ad1c3d76a41d3d3af9590f35cb7550c949c4fa4774c491ce00f55e968308879
|
7
|
+
data.tar.gz: 592ca94fd6c5cfa1f1da47dc590d4199f2228cce1909f8d294e13c8dd5d135233b1f907725837260c2b692a0bec337c1ec46089a558df441b56d5d93b4c643f6
|
data/lib/bibliothecary.rb
CHANGED
@@ -7,7 +7,7 @@ end
|
|
7
7
|
|
8
8
|
module Bibliothecary
|
9
9
|
def self.analyse(path)
|
10
|
-
cmd = `find #{path} -type f | grep -vE "#{
|
10
|
+
cmd = `find #{path} -type f | grep -vE "#{ignored_files_regex}"`
|
11
11
|
file_list = cmd.split("\n").sort
|
12
12
|
package_managers.map{|pm| pm.analyse(path, file_list) }.flatten.compact
|
13
13
|
end
|
@@ -19,8 +19,9 @@ module Bibliothecary
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def self.identify_manifests(file_list)
|
22
|
+
allowed_file_list = file_list.reject{|f| f.start_with?(*ignored_files) }
|
22
23
|
package_managers.map do |pm|
|
23
|
-
|
24
|
+
allowed_file_list.select do |file_path|
|
24
25
|
pm.match?(file_path)
|
25
26
|
end
|
26
27
|
end.flatten.uniq.compact
|
@@ -31,6 +32,10 @@ module Bibliothecary
|
|
31
32
|
end
|
32
33
|
|
33
34
|
def self.ignored_files
|
34
|
-
['.git', 'node_modules', 'bower_components', 'spec/fixtures', 'vendor/bundle'
|
35
|
+
['.git', 'node_modules', 'bower_components', 'spec/fixtures', 'vendor/bundle', 'dist']
|
36
|
+
end
|
37
|
+
|
38
|
+
def self.ignored_files_regex
|
39
|
+
ignored_files.join('|')
|
35
40
|
end
|
36
41
|
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: 5.
|
4
|
+
version: 5.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Nesbitt
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: toml-rb
|