Home
RC is a configuration management system for Ruby tools. It can configure all your tools in a single multi-tenant file.
Getting started with RC is easy.
$ gem install rc
To use RC for all projects, add the -rc
bootstrap feature to your systems RUBYOPT environment variable. You will want to add this to you start up scripts, depending on your system that will be .bashrc
or .profile
, or what have you.
$ export RUBYOPT="-rc $RUBYOPT"
Alternately, you can add RC to your project's Gemfile, then is will work when ever you use bundle exec.
gem 'rc'
Now you can specify tool configurations in your project's Config.rb file.
config 'qed', profile: 'coverage' do
require 'simplecov'
SimpleCov.start do
coverage_dir('log/coverage')
end
end
Learn more about writing configs...
When the tool is run, with the corresponding profile, the configuration will be applied.
$ profile=coverage qed
Or more concisely,
$ p=coverage qed
As long as a tool is Ruby-based and has some means of global configuration, then RC can be used to configure it.
Tool developers can add direct support for Courtier to their project's with a simple snippet of code.
require 'rc/api'
configure 'mytool' do |config|
MyTool.configure(&config)
end