Object
# File lib/chef/solr/solr_installer.rb, line 67 def self.configurable(value, default=nil) configurables << value attr_accessor value default_values[value] = default if default end
# File lib/chef/solr/solr_installer.rb, line 63 def self.configurables @configurables ||= [] end
# File lib/chef/solr/solr_installer.rb, line 153 def apply_hash(hash) hash.each do |key, value| method_for_key = "#{key}=".to_sym if respond_to?(method_for_key) send(method_for_key, value) else STDERR.puts("Configuration setting #{key} is unknown and will be ignored") end end end
# File lib/chef/solr/solr_installer.rb, line 134 def configure_from(argv) cli_config = CLI.parse_options(argv) #pp :cli_config => cli_config.to_hash config_file_config = CompatConfig.new.from_file(cli_config.config_file).to_hash #pp :config_file_config => config_file_config apply_hash(config_file_config) apply_hash(cli_config.to_hash) #pp :combined_config => self.to_hash self end
# File lib/chef/solr/solr_installer.rb, line 73 def each_configurable self.class.configurables.each do |config_param| yield [config_param, send(config_param)] end end
# File lib/chef/solr/solr_installer.rb, line 84 def solr_base_path @solr_base_path || '/var/chef' end
Sets the solr_base_path. Also resets solr_home_path, solr_jetty_path, and solr_data_path.
# File lib/chef/solr/solr_installer.rb, line 90 def solr_base_path=(base_path) @solr_home_path, @solr_jetty_path, @solr_data_path = nil,nil,nil @solr_base_path = base_path end
# File lib/chef/solr/solr_installer.rb, line 113 def solr_data_path @solr_data_path || File.join(solr_base_path, 'solr', 'data') end
# File lib/chef/solr/solr_installer.rb, line 99 def solr_home_path @solr_home_path || File.join(solr_base_path, 'solr') end
Generated with the Darkfish Rdoc Generator 2.