Finding Information
Getting Started
Getting started with R.C. is take only a few minutes. Assuming you have a typical
Ruby-ready system, simply install the rc
gem.
$ gem install rc
To use R.C. 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 R.C. to your project's Gemfile:
gem 'rc'
Then is will work when ever you use bundle exec
.
Now you can then specify tool configurations in a project's Config.rb file.
# Config.rb
config 'qed', profile: 'coverage' do
require 'simplecov'
SimpleCov.start do
coverage_dir('log/coverage')
end
end
When the tool is run, with the coresponding profile, the configuration will be applied.
$ profile=coverage qed
As long as a tool is Ruby-based and has some means of global configuration, then R.C. can be used to configure it.
Tool developers can add dedicated support for R.C. to their project's with a simple snippet of code.
require 'rc/api'
configure 'mytool' do |config|
MyTool.configure(&config) if config.profile?
end