vysakh0/submify — pull request #5 by csaurav (2013-02-20 12:47:17+00:00)
Title: made changes for redis configuration -- added a new module

Made changes for Redis

1. Created redis.yml which will have config level data for Redis
2. Created a new module called RedisConnection

With these changes we can do the following:

1. in config/initializers/redis.rb, we can simply write:
$redis = RedisConnection.new_connection (instead of hard coding the host and port)
2. in config/session_store.rb,
Submify::Application.config.session_store :redis_store, servers: { host: RedisConnection.host, port: RedisConnection.port }

3. in config/sidekiq.rb, we can simply do this
Sidekiq.configure_server do |config|
config.redis = { url: RedisConnection.url}
end
######################################################
Sidekiq.configure_client do |config|
config.redis = { url: RedisConnection.url}
end

4. in config/soulmate.rb, we can do this

Soulmate.redis = RedisConnection.url