Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: cf246cf616
Fetching contributors…

Cannot retrieve contributors at this time

60 lines (40 sloc) 0.801 kb

TimedConfig

Load a YAML config every X minutes

Requirements

gem install timed_config

Install

Rails 2

config/environment.rb

config.gem 'timed_config'

Rails 3

Gemfile

gem 'timed_config'

Other

require 'timed_config'

Defaults

If you are using Rails, TimedConfig will try to locate the YAML config at config/timed_config.yml.

By default, the refresh period is set to 1 minute.

Changing defaults

TimedConfig.period = 120 # change period to two minutes
TimedConfig.path = "path/to/yaml.yml"

The config will reload any time a setting changes.

Accessing the config

TimedConfig.config
Jump to Line
Something went wrong with that request. Please try again.