lib/boom/storage/redis.rb in boom-0.1.0 vs lib/boom/storage/redis.rb in boom-0.1.1
- old
+ new
@@ -1,18 +1,24 @@
# coding: utf-8
#
# Sup, Redis.
#
-require 'digest'
-require 'redis'
+begin
+ require 'digest'
+ require 'redis'
+rescue LoadError
+end
module Boom
module Storage
class Redis < Base
def redis
@redis ||= ::Redis.new :host => Boom.config.attributes["redis"]["host"],
:port => Boom.config.attributes["redis"]["port"]
+ rescue NameError => e
+ puts "You don't have Redis installed yet:\n gem install redis"
+ exit
end
def bootstrap
end