Class Rudy::Config
In: lib/rudy/config/objects.rb
lib/rudy/config.rb
Parent: Object

Methods

Classes and Modules

Class Rudy::Config::Accounts
Class Rudy::Config::Commands
Class Rudy::Config::Defaults
Class Rudy::Config::Error
Class Rudy::Config::Machines
Class Rudy::Config::Routines

Public Class methods

Public Instance methods

Looks for a loads configuration files from standard locations.

    ./.rudy/config
    ~/.rudy/config

    ~/.rudy/*.rb
    ./Rudyfile
    ./machines.rb, ./routines.rb, ./commands.rb
    ./config/rudy/*.rb
    ./.rudy/*.rb
    /etc/rudy/*.rb

When multuple files are found, the configuration is NOT OVERRIDDEN, it‘s ADDED or APPENDED depending on context. This means you can split configuration across as many files as you please.

There are five sections: accounts, defaults, machines, commands and routines.

By convention, accounts go in ./.rudy/config or ~/.rudy/config machines, commands, routines, and defaults configuration go in ./Rudyfile or into separate files in ./.rudy or ./config/rudy (machines.rb, commands.rb, …)

If adhoc_path is supplied (e.g. rudy -C config/file/path routines), this method will look for ~/.rudy/config or ./.rudy/config but none of the other default file locations other than the supplied path. If it‘s an Array, all paths will be loaded.

This method is called by Caesars::Config.refresh for every DSL file that is loaded and parsed. If we want to run processing for a particular config (machines, @routines, etc…) we can do it here. Just wait until the instance variable is not nil.

[Validate]