This commit is contained in:
Wiibaa 2014-04-15 12:54:22 +02:00
parent 8eed4a9233
commit 3369335acd

View file

@ -7,8 +7,8 @@ module LogStash
LOGSTASH_HOME = ::File.expand_path(::File.join(::File.dirname(__FILE__), "/../.."))
JAR_DIR = ::File.join(LOGSTASH_HOME, "/vendor/jar")
# loads currenly embedded elasticsearch jars
# @raise LogStash::EnvironmentError if not runnig under JRuby or if no jar files found
# loads currently embedded elasticsearch jars
# @raise LogStash::EnvironmentError if not running under JRuby or if no jar files are found
def load_elasticsearch_jars!
raise(LogStash::EnvironmentError, "JRuby is required") unless jruby?
@ -16,7 +16,7 @@ module LogStash
jars_path = ::File.join(JAR_DIR, "/elasticsearch*/lib/*.jar")
jar_files = Dir.glob(jars_path)
raise(LogStash::EnvironmentError, "Could not find Elasticsearh jar files under #{JAR_DIR}") if jar_files.empty?
raise(LogStash::EnvironmentError, "Could not find Elasticsearch jar files under #{JAR_DIR}") if jar_files.empty?
jar_files.each do |jar|
loaded = require jar
@ -28,4 +28,4 @@ module LogStash
RUBY_PLATFORM == "java"
end
end
end
end