0.0
No commit activity in last 3 years
No release in over 3 years
Gem allows to define config constants for different Rails environments.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

Kredentials

Gem allows to define config constants for different Rails environments.

Installation

Add this line to your application's Gemfile:

gem 'kredentials'

And then execute:

$ bundle

Or install it yourself as:

$ gem install kredentials

Usage

class HostConfig
  extend Kredentials

  @@development = {
      :my_host => 'www.local.myhost.com',
      :my_subdomain => 'www.local',
  }

  @@test = {
      :my_host => 'mobi.test.myhost.com',
      :my_subdomain => 'mobi.test',
  }

  @@production = {
      :my_host => 'www.myhost.com',
      :my_subdomain => 'www',
  }
end


HostConfig.my_host  # will return my_host based on the Rails environment you are in

Credits

Oha_extensions is maintained by Bookrenter/Rafter and is funded by BookRenter.com.

BookRenter.com Logo

Copyright

Copyright (c) 2012 Bookrenter.com. See LICENSE.txt for further details.