Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: c41bbf4be5
Fetching contributors…

Cannot retrieve contributors at this time

file 67 lines (48 sloc) 1.321 kb

Configus

Summary

Configus helps you easily manage environment specific settings

Build Status

Installing

Add this to your Gemfile:

gem "configus"

Examples

Definition

Configus.build :development do # set current environment
  env :production do
    website_url 'http://example.com'
    email do
      pop do
        address 'pop.example.com'
        port    110
      end
      smtp do
        address 'smtp.example.com'
        port    25
      end
    end
  end

  env :development, :parent => :production do
    website_url 'http://text.example.com'
    email do
      smtp do
        address 'smpt.text.example.com'
      end
    end
  end
end

Usage

configus.website_url # => 'http://text.example.com'
configus.email.pop.port # => 110

Rails

define your config in lib/configus.rb

Configus.build Rails.env do
  # settigns
end

reload

# config/environments/development.rb
ActionDispatch::Reloader.to_prepare do
  load Rails.root.join('lib/configus.rb')
end

Similar

Something went wrong with that request. Please try again.