Skip to content
/ configus Public
forked from kaize/configus

Configus helps you easily manage environment specific settings

Notifications You must be signed in to change notification settings

zzet/configus

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Configus

Gem Version Build Status Dependency Status Code Climate Coverage Status Gem Version

Summary

Configus helps you easily manage environment specific settings

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
  # settings
end

reload

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

Similar

About

Configus helps you easily manage environment specific settings

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%