Permalink
Browse files

Add redis to Sveglia

  • Loading branch information...
1 parent cd60364 commit a97c763cad40230f50d4818341b13078d362d8c4 @bugant bugant committed Apr 3, 2012
Showing with 16 additions and 4 deletions.
  1. +6 −3 Gemfile
  2. +4 −0 Gemfile.lock
  3. +6 −1 config/sveglia.rb
View
9 Gemfile
@@ -3,18 +3,21 @@ source :gemcutter
gem 'goliath', :git => 'git://github.com/postrank-labs/goliath.git'
gem 'em-http-request', :git => 'git://github.com/igrigorik/em-http-request.git'
gem 'em-synchrony', :git => 'git://github.com/igrigorik/em-synchrony.git'
-gem 'yajl-ruby'
+gem 'yajl-ruby', :require => 'yajl'
+
+gem 'hiredis'
+gem 'redis', :require => ['redis/connection/synchrony', 'redis']
gem 'pusher'
gem 'rake'
group :assets do
- gem 'sprockets'
+ gem 'sprockets', :require => 'sprockets'
end
group :development, :test do
gem 'rspec'
gem 'jasmine'
gem 'foreman'
-end
+end
View
4 Gemfile.lock
@@ -53,6 +53,7 @@ GEM
foreman (0.41.0)
thor (>= 0.13.6)
hike (1.2.1)
+ hiredis (0.4.5)
http_parser.rb (0.5.3)
http_router (0.9.7)
rack (>= 1.0.0)
@@ -76,6 +77,7 @@ GEM
rack-respond_to (0.9.8)
rack-accept-media-types (>= 0.6)
rake (0.9.2.2)
+ redis (2.2.2)
rspec (2.8.0)
rspec-core (~> 2.8.0)
rspec-expectations (~> 2.8.0)
@@ -112,9 +114,11 @@ DEPENDENCIES
em-synchrony!
foreman
goliath!
+ hiredis
jasmine
pusher
rake
+ redis
rspec
sprockets
yajl-ruby
View
7 config/sveglia.rb
@@ -18,4 +18,9 @@
environment :test do
logger.info 'test.example.org'
-end
+end
+
+pool_size = ENV['REDIS_POOL_SIZE'] || 1
+config['redis_pool'] = EM::Synchrony::ConnectionPool.new(size: pool_size) do
+ Redis.new
+end

0 comments on commit a97c763

Please sign in to comment.