Skip to content

Instantly share code, notes, and snippets.

@s6577t
Created September 30, 2011 17:20
Show Gist options
  • Select an option

  • Save s6577t/1254403 to your computer and use it in GitHub Desktop.

Select an option

Save s6577t/1254403 to your computer and use it in GitHub Desktop.
Blobject for configuration
MyApplication::Config = ->(config_path) do
if Rails.env.development?
require 'rb-fsevent'
fsevent = FSEvent.new
fsevent.watch config_path do
suppress_warnings do
MyApplication::Config = Blobject.read(config_path)
end
end
fsevent.run
else
MyApplication::Config = Blobject.read(config_path)
end.('config/config.yml')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment