Class | Rudy::Config |
In: |
lib/rudy/config/objects.rb
lib/rudy/config.rb |
Parent: | Object |
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.