Rake Task: Configatron to Javascript!
Configatron is a “super cool, simple, and feature rich configuration system for Ruby apps”. It’s a great tool for keeping your apps DRY and your configuration free-spirited. But today it gets even better! This rake task exports your configatron config to a JSON hash and sticks in a native JS object, making it easy to give your static javascript files access to your app’s entire configatron config.
Remember: Given the public-facing nature of javascript, this practice will expose all the values in your config file to the world. If you have secret infoz in ur configatronz, work around it by moving the private stuff to a file that’s not loaded by the rake task.