Sha256: 9a4f168cedda342b372953964f8da8b8cb83e23e429be32b31902eef5df92028

Contents?: true

Size: 1.61 KB

Versions: 20

Compression:

Stored size: 1.61 KB

Contents

require "bibliothecary/version"
require "bibliothecary/analyser"
require "bibliothecary/configuration"
require "bibliothecary/runner"
require "bibliothecary/exceptions"
require "bibliothecary/file_info"
require "bibliothecary/related_files_info"
require "find"

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

module Bibliothecary
  def self.analyse(path, ignore_unparseable_files: true)
    runner.analyse(path, ignore_unparseable_files: ignore_unparseable_files)
  end

  # deprecated; use load_file_info_list.
  def self.load_file_list(path)
    runner.load_file_list(path)
  end

  def self.init_package_manager(info)
    runner.init_package_manager(info)
  end

  def self.load_file_info_list(path)
    runner.load_file_info_list(path)
  end

  def self.analyse_file(file_path, contents)
    runner.analyse_file(file_path, contents)
  end

  def self.identify_manifests(file_list)
    runner.identify_manifests(file_list)
  end

  def self.package_managers
    runner.package_managers
  end

  def self.find_manifests(path)
    runner.find_manifests(path)
  end

  def self.ignored_dirs
    configuration.ignored_dirs
  end

  def self.ignored_files
    configuration.ignored_files
  end

  class << self
    attr_writer :configuration
  end

  def self.runner
    configuration
    @runner
  end

  def self.configuration
    @configuration ||= Configuration.new
    @runner = Runner.new(@configuration)
    @configuration
  end

  def self.reset
    @configuration = Configuration.new
    @runner = Runner.new(@configuration)
  end

  def self.configure
    yield(configuration)
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
bibliothecary-6.9.3 lib/bibliothecary.rb
bibliothecary-6.9.2 lib/bibliothecary.rb
bibliothecary-6.9.1 lib/bibliothecary.rb
bibliothecary-6.9.0 lib/bibliothecary.rb
bibliothecary-6.8.10 lib/bibliothecary.rb
bibliothecary-6.8.9 lib/bibliothecary.rb
bibliothecary-6.8.8 lib/bibliothecary.rb
bibliothecary-6.8.7 lib/bibliothecary.rb
bibliothecary-6.8.6 lib/bibliothecary.rb
bibliothecary-6.8.5 lib/bibliothecary.rb
bibliothecary-6.8.4 lib/bibliothecary.rb
bibliothecary-6.8.3 lib/bibliothecary.rb
bibliothecary-6.8.2 lib/bibliothecary.rb
bibliothecary-6.8.1 lib/bibliothecary.rb
bibliothecary-6.8.0 lib/bibliothecary.rb
bibliothecary-6.7.4 lib/bibliothecary.rb
bibliothecary-6.7.3 lib/bibliothecary.rb
bibliothecary-6.7.2 lib/bibliothecary.rb
bibliothecary-6.7.1 lib/bibliothecary.rb
bibliothecary-6.6.0 lib/bibliothecary.rb