module Kleiber

Constants

DEFAULT_SETTINGS_PATH
ROOT
VERSION

Public Class Methods

configure() { |settings| ... } click to toggle source

Provides blockparam settings for configure @yieldparam [Settings] settings

# File lib/kleiber.rb, line 44
def configure
  yield settings
end
perform(symphony_name, projects, options) click to toggle source

Returns performer with defined options @param [String] symphony_name name of symphony to perform @param [Array] projects list of projects names to run only @param [Hash] options options of perfomance @return [Performer] return performer object

# File lib/kleiber.rb, line 21
def perform(symphony_name, projects, options)
  Performer.new(symphonies[symphony_name], projects, options)
end
projects() click to toggle source

Returns projects which kleiber can operate @return [Array] projects

# File lib/kleiber.rb, line 27
def projects
  settings.projects.map do |project_settings|
    Project.new(project_settings)
  end
end
settings() click to toggle source

Returns settings if library @return [Settings] settings

# File lib/kleiber.rb, line 50
def settings
  @settings ||= Settings.new(DEFAULT_SETTINGS_PATH)
end
symphonies() click to toggle source

Returns symphonies which kleiber can control @return [Hash] symphonies

# File lib/kleiber.rb, line 35
def symphonies
  settings.symphonies.each_with_object({}) do |(symphony_name, symphony_settings), result|
    symp_projects = projects.select { |p| symphony_settings[:projects].include?(p.name) }
    result[symphony_name] = Symphony.new(symphony_name, symp_projects, symphony_settings)
  end
end
terminal() click to toggle source

Returns current terminal object @return [Terminal] current terminal

# File lib/kleiber.rb, line 56
def terminal
  @terminal ||= Terminal.new(settings.terminal)
end