lib/redis_ring/configuration.rb in redis_ring-0.0.2 vs lib/redis_ring/configuration.rb in redis_ring-0.1.0

- old
+ new

@@ -5,11 +5,11 @@ class UnknownConfigurationParameter < ConfigurationError; end class Configuration PARAMETERS = [:host_name, :base_port, :ring_size, :redis_path, :redis_config_template_path, - :total_vm_size, :base_directory, :password, :total_max_memory, :vm_page_size] + :total_vm_size, :base_directory, :password, :total_max_memory, :vm_page_size, :zookeeper_address] attr_reader *PARAMETERS def initialize(params = {}) set_params(params) @@ -48,9 +48,10 @@ self.redis_config_template_path ||= default_redis_config_template_path self.total_vm_size ||= 8 * 1024 * 1024 * 1024 # 8GB self.base_directory ||= "/var/lib/redis" self.total_max_memory ||= 1024 * 1024 * 1024 # 1GB self.vm_page_size ||= 32 + self.zookeeper_address ||= "localhost:2181" end def validate! raise RedisNotFound.new("redis_path is invalid (not found)") unless File.file?(redis_path) end