lib/redis_ring/configuration.rb in redis_ring-0.1.1 vs lib/redis_ring/configuration.rb in redis_ring-0.1.2
- old
+ new
@@ -4,11 +4,11 @@
class RedisNotFound < ConfigurationError; end
class UnknownConfigurationParameter < ConfigurationError; end
class Configuration
- PARAMETERS = [:host_name, :base_port, :ring_size, :redis_path, :redis_config_template_path,
+ PARAMETERS = [:cluster_name, :host_name, :base_port, :ring_size, :redis_path, :redis_config_template_path,
:total_vm_size, :base_directory, :password, :total_max_memory, :vm_page_size, :zookeeper_address]
attr_reader *PARAMETERS
def initialize(params = {})
@@ -39,9 +39,10 @@
end
end
end
def set_defaults
+ self.cluster_name ||= "redis-ring"
self.host_name ||= guess_host_name
self.base_port ||= 6400
self.ring_size ||= 32
self.redis_path ||= locate_redis
self.redis_config_template_path ||= default_redis_config_template_path