sif

Sif is a Ruby library that complements Thor by adding external configuration to your Thor applications.

Usage

A common Thor usage pattern is to write a class which extends the Thor class. If you instead extend Sif::Loader, your app will now load a YAML file located at ~/.config, parse it, and add all the data in it as instance variables for your class to do what it will with.

Options

Override the config filename

You can override the default config filename like this

config_file '.my_sif_app'

Additionally, users can point your app at alternative config files

$ app do stuff --config=/path/to/config.file
$ app do stuff -c=/path/to/config.file

Additional config

By overriding the load_configuration method - don’t forget to call ‘super’ - you can do further configuration yourself. For instance, creating a member variable derived from several config options.

Contributing to sif

Copyright © 2013 George McIntosh. See LICENSE.txt for further details.