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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 55f3b8b100c7062b5bf99ae28ed96a3ec829d84b
4
- data.tar.gz: c0335df69f289ad093a836bf594283a59e135928
3
+ metadata.gz: 0a5cc5449d7443099fcde55774751889cc87d20a
4
+ data.tar.gz: a4a956f924440d5e17374fdd0d633d20e56e51a6
5
5
  SHA512:
6
- metadata.gz: 030ed2e020f7d72a8ef1ea37ad5d709a080d04f7d8ee7b6fb36de87d1b6a583a0ce6235c777ce726f3b150be7b5b835e0a22bd8ac7c39a03669cfa9ac6d12f75
7
- data.tar.gz: c16e95e0eec887b7972c56e02d91de4b62747d4bb89bf7e72826755cb42040073ed8686dc16989bc318596317554b463df9c283c821de20bdd160d506d488bb8
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 "#{ignored_files}"`
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
- file_list.select do |file_path|
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'].join('|')
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
@@ -1,3 +1,3 @@
1
1
  module Bibliothecary
2
- VERSION = "5.4.0"
2
+ VERSION = "5.5.0"
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: 5.4.0
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-12 00:00:00.000000000 Z
11
+ date: 2017-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: toml-rb