class Minimart::Commands::Mirror

Mirror is the main entrance point for the mirroring portion of Minimart. Given a directory, and a path to a config file, this class will generate an inventory.

Attributes

inventory_config[R]
inventory_directory[R]
load_deps[R]

Public Class Methods

new(opts) click to toggle source

@param [Hash] opts @option opts [String] :inventory_directory The directory to store the inventory. @option opts [String] :inventory_config The path to the inventory configuration file.

# File lib/minimart/commands/mirror.rb, line 13
def initialize(opts)
  @inventory_directory = opts[:inventory_directory]
  Minimart::Configuration.load_deps = opts[:load_deps] if opts[:load_deps]
  @inventory_config    = Minimart::Mirror::InventoryConfiguration.new(opts[:inventory_config])
end

Public Instance Methods

execute!() click to toggle source

Generate the inventory.

# File lib/minimart/commands/mirror.rb, line 20
def execute!
  builder = Minimart::Mirror::InventoryBuilder.new(inventory_directory, inventory_config)
  builder.build!
end