Sha256: 90d8917b6f904938f212b95f4acc409647f449bf0d52610057e6a850522934b7

Contents?: true

Size: 632 Bytes

Versions: 8

Compression:

Stored size: 632 Bytes

Contents

require "bibliothecary/version"
require "bibliothecary/analyser"

Dir[File.expand_path('../bibliothecary/parsers/*.rb', __FILE__)].each do |file|
  require file
end

module Bibliothecary
  def self.analyse(path)
    cmd = `find #{path} -type f | grep -vE "#{ignored_files}"`
    file_list = cmd.split("\n")
    package_managers.map{|pm| pm.analyse(path, file_list) }.flatten.compact
  end

  def self.package_managers
    Bibliothecary::Parsers.constants.map{|c| Bibliothecary::Parsers.const_get(c) }.sort_by{|c| c.to_s.downcase }
  end

  def self.ignored_files
    ['.git', 'node_modules', 'bower_components'].join('|')
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bibliothecary-4.0.4 lib/bibliothecary.rb
bibliothecary-4.0.3 lib/bibliothecary.rb
bibliothecary-4.0.2 lib/bibliothecary.rb
bibliothecary-4.0.1 lib/bibliothecary.rb
bibliothecary-4.0.0 lib/bibliothecary.rb
bibliothecary-3.0.1 lib/bibliothecary.rb
bibliothecary-3.0.0 lib/bibliothecary.rb
bibliothecary-2.0.1 lib/bibliothecary.rb