Module: Bibliothecary
- Defined in:
- lib/bibliothecary.rb,
lib/bibliothecary/version.rb,
lib/bibliothecary/analyser.rb,
lib/bibliothecary/parsers/go.rb,
lib/bibliothecary/parsers/dub.rb,
lib/bibliothecary/parsers/elm.rb,
lib/bibliothecary/parsers/hex.rb,
lib/bibliothecary/parsers/npm.rb,
lib/bibliothecary/parsers/pub.rb,
lib/bibliothecary/parsers/cpan.rb,
lib/bibliothecary/parsers/cran.rb,
lib/bibliothecary/parsers/pypi.rb,
lib/bibliothecary/parsers/bower.rb,
lib/bibliothecary/parsers/cargo.rb,
lib/bibliothecary/parsers/julia.rb,
lib/bibliothecary/parsers/maven.rb,
lib/bibliothecary/parsers/nuget.rb,
lib/bibliothecary/parsers/shard.rb,
lib/bibliothecary/parsers/swift.rb,
lib/bibliothecary/parsers/meteor.rb,
lib/bibliothecary/parsers/clojars.rb,
lib/bibliothecary/parsers/carthage.rb,
lib/bibliothecary/parsers/rubygems.rb,
lib/bibliothecary/parsers/cocoapods.rb,
lib/bibliothecary/parsers/packagist.rb
Defined Under Namespace
Modules: Analyser, Parsers
Constant Summary
collapse
- VERSION =
"3.0.1"
Class Method Summary
collapse
Class Method Details
.analyse(path) ⇒ Object
9
10
11
12
13
|
# File 'lib/bibliothecary.rb', line 9
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
|
.ignored_files ⇒ Object
19
20
21
|
# File 'lib/bibliothecary.rb', line 19
def self.ignored_files
['.git', 'node_modules', 'bower_components'].join('|')
end
|
.package_managers ⇒ Object
15
16
17
|
# File 'lib/bibliothecary.rb', line 15
def self.package_managers
Bibliothecary::Parsers.constants.map{|c| Bibliothecary::Parsers.const_get(c) }.sort_by{|c| c.to_s.downcase }
end
|