lib/sunspot/solr/server.rb in sunspot_solr-2.2.5 vs lib/sunspot/solr/server.rb in sunspot_solr-2.2.6
- old
+ new
@@ -21,13 +21,12 @@
attr_accessor :memory, :bind_address, :port, :log_file
attr_writer :pid_dir, :pid_file, :solr_home, :solr_executable
- def initialize(*args)
- ensure_java_installed
- super(*args)
+ def initialize
+ Sunspot::Solr::Java.ensure_install!
end
#
# Bootstrap a new solr_home by creating all required
# directories.
@@ -192,19 +191,9 @@
FileUtils.mkdir_p(path) unless File.exists?(path)
end
end
private
-
- def ensure_java_installed
- unless defined?(@java_installed)
- @java_installed = Sunspot::Solr::Java.installed?
- unless @java_installed
- raise JavaMissing.new("You need a Java Runtime Environment to run the Solr server")
- end
- end
- @java_installed
- end
def logging_config_path
return @logging_config_path if defined?(@logging_config_path)
@logging_config_path =
if log_file