module Bibliothecary
Known shortcomings and unimplemented Maven features:
pom.xml <exclusions> cannot be taken into account (because it requires knowledge of transitive deps) <properties> are the only thing inherited from parent poms currenly
Constants
- INVALID_UTF8_ERROR_REGEXP
- VERSION
- VERSION_OPERATORS
Attributes
configuration[W]
Public Class Methods
analyse(path, ignore_unparseable_files: true)
click to toggle source
# File lib/bibliothecary.rb, line 24 def self.analyse(path, ignore_unparseable_files: true) runner.analyse(path, ignore_unparseable_files: ignore_unparseable_files) end
Also aliased as: analyze
analyse_file(file_path, contents)
click to toggle source
# File lib/bibliothecary.rb, line 49 def self.analyse_file(file_path, contents) runner.analyse_file(file_path, contents) end
Also aliased as: analyze_file
applicable_package_managers(info)
click to toggle source
# File lib/bibliothecary.rb, line 33 def self.applicable_package_managers(info) runner.applicable_package_managers(info) end
configuration()
click to toggle source
# File lib/bibliothecary.rb, line 103 def self.configuration @configuration ||= Configuration.new @runner = Runner.new(@configuration) @configuration end
configure() { |configuration| ... }
click to toggle source
# File lib/bibliothecary.rb, line 114 def self.configure yield(configuration) end
find_manifests(path)
click to toggle source
# File lib/bibliothecary.rb, line 61 def self.find_manifests(path) runner.find_manifests(path) end
find_manifests_from_contents(file_path_contents_hash)
click to toggle source
# File lib/bibliothecary.rb, line 69 def self.find_manifests_from_contents(file_path_contents_hash) runner.find_manifests_from_contents(file_path_contents_hash) end
find_manifests_from_paths(paths)
click to toggle source
# File lib/bibliothecary.rb, line 65 def self.find_manifests_from_paths(paths) runner.find_manifests_from_paths(paths) end
identify_manifests(file_list)
click to toggle source
# File lib/bibliothecary.rb, line 53 def self.identify_manifests(file_list) runner.identify_manifests(file_list) end
ignored_dirs()
click to toggle source
# File lib/bibliothecary.rb, line 73 def self.ignored_dirs configuration.ignored_dirs end
ignored_files()
click to toggle source
# File lib/bibliothecary.rb, line 77 def self.ignored_files configuration.ignored_files end
load_file_info_list(path)
click to toggle source
# File lib/bibliothecary.rb, line 37 def self.load_file_info_list(path) runner.load_file_info_list(path) end
load_file_info_list_from_contents(file_path_contents_hash)
click to toggle source
# File lib/bibliothecary.rb, line 45 def self.load_file_info_list_from_contents(file_path_contents_hash) runner.load_file_info_list_from_contents(file_path_contents_hash) end
load_file_info_list_from_paths(paths)
click to toggle source
# File lib/bibliothecary.rb, line 41 def self.load_file_info_list_from_paths(paths) runner.load_file_info_list_from_paths(paths) end
load_file_list(path)
click to toggle source
deprecated; use load_file_info_list.
# File lib/bibliothecary.rb, line 29 def self.load_file_list(path) runner.load_file_list(path) end
package_managers()
click to toggle source
# File lib/bibliothecary.rb, line 57 def self.package_managers runner.package_managers end
reset()
click to toggle source
# File lib/bibliothecary.rb, line 109 def self.reset @configuration = Configuration.new @runner = Runner.new(@configuration) end
runner()
click to toggle source
# File lib/bibliothecary.rb, line 98 def self.runner configuration @runner end
utf8_string(string)
click to toggle source
# File lib/bibliothecary.rb, line 81 def self.utf8_string(string) string .dup # ensure we don't have a frozen string .force_encoding("UTF-8") # treat all strings as utf8 .sub(/^\xEF\xBB\xBF/, "") # remove any Byte Order Marks so JSON, etc don't fail while parsing them. rescue ArgumentError => e # Bibliothecary doesn't need to analyze non-UTF8 files like binary files, so just return blank. return "" if e.message.match?(INVALID_UTF8_ERROR_REGEXP) raise e end