ryanb / private_pub

Handle pub/sub messaging through private channels in Rails using Faye.
MIT License
863 stars 226 forks source link

Use an initializer instead of an yaml file for configurations #64

Closed volmer closed 10 years ago

volmer commented 11 years ago

First of all, thanks for this awesome gem!

In this commit I've moved the PrivatePub.load_config call to an initalizer .rb file, generated by running rails generate private_pub:install. I think an intializer under your project tree is a better approach than an initializer in a Rails::Engine, because it enables you to perform several customizations in the way the settings are loaded. Think about a rails app that already defines its own config file and you want to avoid duplicates, and so on.

Well, it's just an idea. Even if you don't approve these changes, I would appreciate your comments.

Thanks.

volmer commented 11 years ago

So, I've restored the .yml file in the second commit in order to keep backwards compatibility, specially regarding the rackup file.