Sha256: a430794b3e84797f80e25e8ff461338ee3a174d544f2bdd1e559363167d736d8

Contents?: true

Size: 845 Bytes

Versions: 2

Compression:

Stored size: 845 Bytes

Contents

require "redis"
require "resque"
require "resque-loner"

# What class will be liking/disliking objects and receiving recommendations?
Recommendable.user_class = "<%= user_class %>"

# Recommendable requires a connection to a running redis-server. Either create
# a new instance based on a host/port or UNIX socket, or pass in an existing
# Redis client instance.
<% if options.redis_socket %># <% end %>Recommendable.redis = Redis.new(:host => "<%= redis_host %>", :port => <%= redis_port %>)

# Connect to Redis via a UNIX socket instead
<% unless options.redis_socket %># <% end %>Recommendable.redis = Redis.new(:sock => "<%= options.redis_socket %>")

# Tell Redis which database to use (usually between 0 and 15). The default of 0
# is most likely okay unless you have another application using that database.
Recommendable.redis.select "0"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
recommendable-0.1.3 lib/generators/recommendable/templates/initializer.rb
recommendable-0.1.2 lib/generators/recommendable/templates/initializer.rb