class RedisFixtures::Configuration

Holds the configuration

Attributes

app_root[RW]

Root directory of the app (where the test or spec directory exists) Defaults to Rails.root or ‘pwd`, use only if using this gem in a non-Rails environment

connection[RW]

Already established connection to Redis for the library to use One of :connection_pool, :connection_block, :connection_settings or :connection must be set

connection_pool[RW]

Connection Pool used to get a new Redis connection One of :connection_pool, :connection_block, :connection_settings or :connection must be set

connection_proc[RW]

Proc that yields a connection object when needed One of :connection_pool, :connection_block, :connection_settings or :connection must be set

connection_settings[RW]

Hash specifying the settings to connect to Redis. Gets passed to ‘Redis.new` One of :connection_pool, :connection_block, :connection_settings or :connection must be set Defaults to localhost:6379

fixture_filename[RW]

Filename where to store the Redis fixtures. (Will be stored in regular fixtures path) Defaults to ‘redis.fixture’ Do not set a .yml extension, or it may get cleared out by other tools

Public Class Methods

new() click to toggle source
# File lib/redis_fixtures/config.rb, line 33
def initialize
  @connection_settings = {host: 'localhost', port: 6379}
  @fixture_filename = "redis.fixture"
  @app_root = defined?(::Rails) ? ::Rails.root : Dir.pwd
end